mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
Android: Prevent app lockup when revoking write access
This commit is contained in:
parent
3f6795f5e8
commit
a91e47899d
@ -26,7 +26,9 @@ import org.dolphinemu.dolphinemu.utils.AfterDirectoryInitializationRunner;
|
||||
import org.dolphinemu.dolphinemu.utils.BooleanSupplier;
|
||||
import org.dolphinemu.dolphinemu.utils.CompletableFuture;
|
||||
import org.dolphinemu.dolphinemu.utils.ContentHandler;
|
||||
import org.dolphinemu.dolphinemu.utils.DirectoryInitialization;
|
||||
import org.dolphinemu.dolphinemu.utils.FileBrowserHelper;
|
||||
import org.dolphinemu.dolphinemu.utils.PermissionsHandler;
|
||||
import org.dolphinemu.dolphinemu.utils.ThreadUtil;
|
||||
import org.dolphinemu.dolphinemu.utils.WiiUtils;
|
||||
|
||||
@ -56,6 +58,10 @@ public final class MainPresenter
|
||||
|
||||
public void onCreate()
|
||||
{
|
||||
// Ask the user to grant write permission if relevant and not already granted
|
||||
if (DirectoryInitialization.isWaitingForWriteAccess(mActivity))
|
||||
PermissionsHandler.requestWritePermission(mActivity);
|
||||
|
||||
String versionName = BuildConfig.VERSION_NAME;
|
||||
mView.setVersionString(versionName);
|
||||
|
||||
|
@ -26,10 +26,6 @@ public final class StartupHandler
|
||||
|
||||
public static void HandleInit(FragmentActivity parent)
|
||||
{
|
||||
// Ask the user to grant write permission if relevant and not already granted
|
||||
if (DirectoryInitialization.isWaitingForWriteAccess(parent))
|
||||
PermissionsHandler.requestWritePermission(parent);
|
||||
|
||||
// Ask the user if he wants to enable analytics if we haven't yet.
|
||||
Analytics.checkAnalyticsInit(parent);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user