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

Commit d3ce331b authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Protect against monkey crash" into nyc-dev

parents 99a88eca fd41b424
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@ public class UnrestrictedDataAccess extends SettingsPreferenceFragment

    @Override
    public void onRebuildComplete(ArrayList<AppEntry> apps) {
        if (getContext() == null) return;
        cacheRemoveAllPrefs(getPreferenceScreen());
        final int N = apps.size();
        for (int i = 0; i < N; i++) {
@@ -159,7 +160,7 @@ public class UnrestrictedDataAccess extends SettingsPreferenceFragment
            String key = entry.info.packageName + "|" + entry.info.uid;
            AccessPreference preference = (AccessPreference) getCachedPreference(key);
            if (preference == null) {
                preference = new AccessPreference(getContext(), entry);
                preference = new AccessPreference(getPrefContext(), entry);
                preference.setKey(key);
                preference.setOnPreferenceChangeListener(this);
                getPreferenceScreen().addPreference(preference);