Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd45c3cb authored by Jason Monk's avatar Jason Monk
Browse files

Handle monkey crash

Don't create dialog if we don't have one to create, and make sure
that storage-related prefs are removed when they aren't needed.

Bug: 22571238
Change-Id: I452cbf75313cd14572fc7b57bd6164292cf17209
parent bf9a425d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
                  android:title="@string/application_info_label">

    <com.android.settings.applications.SpacePreference
        android:key="storage_space"
        android:layout_height="8dp" />

    <Preference
+3 −1
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ public class AppStorageSettings extends AppInfoWithHeader

    private static final String KEY_STORAGE_USED = "storage_used";
    private static final String KEY_CHANGE_STORAGE = "change_storage_button";
    private static final String KEY_STORAGE_SPACE = "storage_space";
    private static final String KEY_STORAGE_CATEGORY = "storage_category";

    private static final String KEY_TOTAL_SIZE = "total_size";
@@ -182,7 +183,7 @@ public class AppStorageSettings extends AppInfoWithHeader
            } else {
                showDialogInner(DLG_CLEAR_DATA, 0);
            }
        } else if (v == mChangeStorageButton) {
        } else if (v == mChangeStorageButton && mDialogBuilder != null) {
            mDialogBuilder.show();
        }
    }
@@ -350,6 +351,7 @@ public class AppStorageSettings extends AppInfoWithHeader
        } else {
            removePreference(KEY_STORAGE_USED);
            removePreference(KEY_CHANGE_STORAGE);
            removePreference(KEY_STORAGE_SPACE);
        }
    }