From 2728d44f8caf5650555044b1369732d198ebfba7 Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Sun, 1 Dec 2019 11:25:24 -0800 Subject: [PATCH] Fix bug in system disk chooser where orientation event prevented actual selection --- .../java/org/deadc0de/apple2ix/Apple2DiskChooserActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Android/app/src/main/java/org/deadc0de/apple2ix/Apple2DiskChooserActivity.java b/Android/app/src/main/java/org/deadc0de/apple2ix/Apple2DiskChooserActivity.java index 99196df2..5b2c3bba 100644 --- a/Android/app/src/main/java/org/deadc0de/apple2ix/Apple2DiskChooserActivity.java +++ b/Android/app/src/main/java/org/deadc0de/apple2ix/Apple2DiskChooserActivity.java @@ -24,7 +24,6 @@ import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import android.provider.OpenableColumns; -import android.util.Log; import java.util.concurrent.atomic.AtomicBoolean; @@ -117,13 +116,14 @@ public class Apple2DiskChooserActivity extends AppCompatActivity { } boolean ran = b.getBoolean("ran"); + /* -- Android onCreate() can be called multiple times, for example, on an orientation change ... this codepath was aborting the disk selection process when an orientation event occurred... if (ran) { Apple2Activity.logMessage(Apple2Activity.LogType.ERROR, TAG, "OOPS, already ran..."); finish(); return; } + */ - ////Intent pickIntent = new Intent(Intent.ACTION_GET_CONTENT); Intent pickIntent = new Intent(Intent.ACTION_OPEN_DOCUMENT); try {