diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 360d19f8..ac818e1c 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -30,7 +30,7 @@ android:exported="true" android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden|navigation" android:label="${NAME}" - android:launchMode="singleTask" + android:launchMode="singleInstance" android:screenOrientation="${ORIENTATION}" android:resizeableActivity="false" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" > diff --git a/love/src/normal/java/org/love2d/android/SelectorActivity.java b/love/src/normal/java/org/love2d/android/SelectorActivity.java index 55e14bda..b354e11c 100644 --- a/love/src/normal/java/org/love2d/android/SelectorActivity.java +++ b/love/src/normal/java/org/love2d/android/SelectorActivity.java @@ -41,6 +41,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { if (android.os.Build.VERSION.SDK_INT < 19) { Toast.makeText(this, "This activity does not work on Android before KitKat!", Toast.LENGTH_SHORT).show(); finish(); + return; } final ActivityResultLauncher openFileLauncher = registerForActivityResult( @@ -49,7 +50,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { if (result != null) { Intent intent = new Intent(SelectorActivity.this, GameActivity.class); intent.setData(result); - intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); startActivity(intent); }