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

Commit 6ef6f183 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Stability fixes for Settings. Asynchronous callbacks causing NPEs.

Bug: 4598717
Change-Id: I7f1c5bf6e079bb36301e81085096c5b82615814b
parent d2a6f28f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@ public class ManageAccountsSettings extends AccountPreferenceBase
    }

    private void setBackgroundDataInt(boolean enabled) {
        if (getActivity() == null) return;
        final ConnectivityManager connManager = (ConnectivityManager)
                getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);
        connManager.setBackgroundDataSetting(enabled);
@@ -315,6 +316,7 @@ public class ManageAccountsSettings extends AccountPreferenceBase

    @Override
    public void onAccountsUpdated(Account[] accounts) {
        if (getActivity() == null) return;
        mManageAccountsCategory.removeAll();
        for (int i = 0, n = accounts.length; i < n; i++) {
            final Account account = accounts[i];