[Settings] Avoid non-owner from crash mobile data settings

Some instance not been initialized under non-owner user mode.

Bug: 146562321
Test: manual
Change-Id: I4f8ac955754cbd8692727a1d0adf283ef3ff512c
This commit is contained in:
Bonian Chen
2020-01-31 00:33:11 +08:00
parent 634044dc0b
commit eb2b87aa39

View File

@@ -118,6 +118,9 @@ public class MobileNetworkActivity extends SettingsBaseActivity
@Override
protected void onDestroy() {
super.onDestroy();
if (mProxySubscriptionMgr == null) {
return;
}
mProxySubscriptionMgr.removeActiveSubscriptionsListener(this);
}