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

Commit 1eb75899 authored by Diogo Ferreira's avatar Diogo Ferreira Committed by Clark Scheff
Browse files

SIM: Only trigger sub updates if the lifecycle isn't ending

This broadcast would cause a re-rendering of the sim preferences
but the activity context is actually tearing down at that point
which causes common context items such as resources items to be
null.

Change-Id: I5cb23f941c9ace6382dbc324c8e1820f54853eda
TICKET:CYNGNOS-1918
parent 55abf844
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.settings.sim;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
@@ -168,8 +169,11 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable
        @Override
        public void onSubscriptionsChanged() {
            if (DBG) log("onSubscriptionsChanged:");
            Activity activity = getActivity();
            if (activity != null && !activity.isFinishing()) {
                updateSubscriptions();
            }
        }
    };

    private void updateSubscriptions() {