From ccb1a74422875b6812e7725399993e2c3a3e56b1 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 26 Jul 2016 23:13:37 +0200 Subject: [PATCH] fix a crash at first startup after granting storage permission --- .../simplemobiletools/filemanager/activities/MainActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/simplemobiletools/filemanager/activities/MainActivity.java b/app/src/main/java/com/simplemobiletools/filemanager/activities/MainActivity.java index 7b51f259..d2717805 100644 --- a/app/src/main/java/com/simplemobiletools/filemanager/activities/MainActivity.java +++ b/app/src/main/java/com/simplemobiletools/filemanager/activities/MainActivity.java @@ -61,7 +61,8 @@ public class MainActivity extends SimpleActivity implements ItemsFragment.ItemIn final ItemsFragment fragment = new ItemsFragment(); fragment.setArguments(bundle); fragment.setListener(this); - getSupportFragmentManager().beginTransaction().replace(R.id.fragment_holder, fragment).addToBackStack(path).commit(); + getSupportFragmentManager().beginTransaction().replace(R.id.fragment_holder, fragment).addToBackStack(path) + .commitAllowingStateLoss(); } @Override