Add a missing java function (fix a little merge mistake)

This commit is contained in:
Henrik Rydgård 2021-07-26 21:54:23 +02:00
parent e5db962601
commit 3f1a5a148f

View File

@ -14,6 +14,7 @@ import android.os.storage.StorageManager;
import android.content.ContentResolver;
import android.database.Cursor;
import android.provider.DocumentsContract;
import android.os.Environment;
import androidx.documentfile.provider.DocumentFile;
import java.util.ArrayList;
import java.util.UUID;
@ -391,4 +392,14 @@ public class PpssppActivity extends NativeActivity {
return -1;
}
}
public boolean isExternalStoragePreservedLegacy() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
// In 29 and later, we can check whether we got preserved storage legacy.
return Environment.isExternalStorageLegacy();
} else {
// In 28 and earlier, we won't call this - we'll still request an exception.
return false;
}
}
}