aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJose Luis Marti <joseluis.marti@gmail.com>2022-09-26 17:13:10 +0200
committerJose Luis Marti <joseluis.marti@gmail.com>2022-09-26 17:13:10 +0200
commit9f9e9c2bfc4296e879f2431ebc341b5386881974 (patch)
tree5b829dc31580eeab18ee91e778790fe14e6675a7 /tools
parentf0c49f90ec433c528c0704cc829f451ee8cc2601 (diff)
[Android] Restore the RECORD_AUDIO permission request
Diffstat (limited to 'tools')
-rw-r--r--tools/android/packaging/xbmc/src/Splash.java.in17
1 files changed, 14 insertions, 3 deletions
diff --git a/tools/android/packaging/xbmc/src/Splash.java.in b/tools/android/packaging/xbmc/src/Splash.java.in
index 61e6c943ed..128e49ae7d 100644
--- a/tools/android/packaging/xbmc/src/Splash.java.in
+++ b/tools/android/packaging/xbmc/src/Splash.java.in
@@ -65,12 +65,14 @@ public class Splash extends Activity
private static final int CheckingPermissionsDone = 10;
private static final int CheckingPermissionsInfo = 11;
private static final int CheckExternalStorage = 12;
+ private static final int RecordAudioPermission = 13;
private static final int DownloadingObb = 90;
private static final int DownloadObbDone = 91;
private static final int StartingXBMC = 99;
private static final String TAG = "@APP_NAME@";
+ private static final int RECORDAUDIO_RESULT_CODE = 8946;
private static final int PERMISSION_RESULT_CODE = 8947;
private String mCpuinfo = "";
@@ -127,15 +129,19 @@ public class Splash extends Activity
@Override
public void onClick(DialogInterface dialog, int which)
{
- mStateMachine.sendEmptyMessage(CheckingPermissions);
+ mStateMachine.sendEmptyMessage(RecordAudioPermission);
}
});
dialog.show();
break;
- case CheckingPermissions:
+ case RecordAudioPermission:
mSplash.mTextView.setText("Asking for permissions...");
mSplash.mProgress.setVisibility(View.INVISIBLE);
+ requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO},
+ RECORDAUDIO_RESULT_CODE);
+ break;
+ case CheckingPermissions:
if ((Build.VERSION.SDK_INT >= 30) && !isAndroidTV())
{
try
@@ -786,9 +792,14 @@ public class Splash extends Activity
{
mPermissionOK = true;
}
+ mStateMachine.sendEmptyMessage(CheckingPermissionsDone);
+ break;
+ }
+ case RECORDAUDIO_RESULT_CODE:
+ {
+ mStateMachine.sendEmptyMessage(CheckingPermissions);
}
}
- mStateMachine.sendEmptyMessage(CheckingPermissionsDone);
}
@Override