Ignore IllegalStateException in removeDialogs
@@ -232,6 +232,7 @@ public class MainPreferenceFragment extends PreferenceFragmentCompat {
}
private void removeDialogs() {
+ try {
FragmentTransaction ft = getFragmentManager().beginTransaction();
Fragment prev = getFragmentManager().findFragmentByTag(TAG_DIALOG);
if (prev != null) {
@@ -239,6 +240,9 @@ public class MainPreferenceFragment extends PreferenceFragmentCompat {
}
ft.disallowAddToBackStack();
ft.commit();
+ } catch (IllegalStateException e) {
+ // Ignored
+ }
}
private class LibraryConfigServiceReceiver extends BroadcastReceiver {
