diff --git a/src/android/app/src/main/java/org/citra/citra_emu/ui/main/MainActivity.java b/src/android/app/src/main/java/org/citra/citra_emu/ui/main/MainActivity.java index 2f14fb554..e959163d2 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/ui/main/MainActivity.java +++ b/src/android/app/src/main/java/org/citra/citra_emu/ui/main/MainActivity.java @@ -184,6 +184,10 @@ protected void onCreate(Bundle savedInstanceState) { requestNotificationPermissionLauncher.launch(Manifest.permission.POST_NOTIFICATIONS); } } + if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) { + // Request permission if it's not granted + ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.RECORD_AUDIO}, 0); + } // Check for the TWO_INSTANCES string extra if (getIntent().getBooleanExtra(VrActivity.EXTRA_ERROR_TWO_INSTANCES, false)) { Log.error("Error: two instances of CitraVr::VrActivity were running at the same time!"); @@ -214,10 +218,6 @@ protected void onSaveInstanceState(@NonNull Bundle outState) { @Override protected void onResume() { super.onResume(); - if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) { - // Request permission if it's not granted - ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.RECORD_AUDIO}, 0); - } mPresenter.addDirIfNeeded(new AddDirectoryHelper(this)); ThemeUtil.setSystemBarMode(this, ThemeUtil.getIsLightMode(getResources()));