Jelajahi Sumber

Fixed minor issue with LOVE Loader launcher.

Miku AuahDark 2 tahun lalu
induk
melakukan
11d99352dc

+ 1 - 1
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" >

+ 1 - 1
love/src/normal/java/org/love2d/android/SelectorActivity.java

@@ -41,6 +41,7 @@ public class SelectorActivity extends AppCompatActivity {
         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<String[]> openFileLauncher = registerForActivityResult(
@@ -49,7 +50,6 @@ public class SelectorActivity extends AppCompatActivity {
                 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);
                 }