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

Commit 036496e2 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fixed NullPointerException" am: 5fb16be9 am: cbe5bbdc am: 456b2bf8 am: b301288c

Change-Id: I52b931de8009f876020bdebe867d178962829e88
parents 5020254e b301288c
Loading
Loading
Loading
Loading
+13 −10
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.os.Message;
import android.os.PersistableBundle;
import android.telephony.CarrierConfigManager;
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
@@ -231,15 +232,18 @@ public class IccLockSettings extends SettingsPreferenceFragment
        for (int i = 0; i < numSims; ++i) {
            final SubscriptionInfo subInfo =
                    getActiveSubscriptionInfoForSimSlotIndex(subInfoList, i);
            if (subInfo != null) {
                final CarrierConfigManager carrierConfigManager = getContext().getSystemService(
                        CarrierConfigManager.class);
                final PersistableBundle bundle = carrierConfigManager.getConfigForSubId(
                        subInfo.getSubscriptionId());
                if (bundle != null
                    && !bundle.getBoolean(CarrierConfigManager.KEY_HIDE_SIM_LOCK_SETTINGS_BOOL)) {
                        && !bundle.getBoolean(CarrierConfigManager
                        .KEY_HIDE_SIM_LOCK_SETTINGS_BOOL)) {
                    componenterList.add(subInfo);
                }
            }
        }

        if (componenterList.size() == 0) {
            Log.e(TAG, "onCreateView: no sim info");
@@ -292,7 +296,8 @@ public class IccLockSettings extends SettingsPreferenceFragment
        final List<SubscriptionInfo> subInfoList =
                mProxySubscriptionMgr.getActiveSubscriptionsInfo();
        final SubscriptionInfo sir = getActiveSubscriptionInfoForSimSlotIndex(subInfoList, mSlotId);
        mSubId = sir.getSubscriptionId();
        mSubId = (sir == null) ? SubscriptionManager.INVALID_SUBSCRIPTION_ID
            : sir.getSubscriptionId();

        if (mPinDialog != null) {
            mPinDialog.setEnabled(sir != null);
@@ -679,8 +684,6 @@ public class IccLockSettings extends SettingsPreferenceFragment
        @Override
        public void onTabChanged(String tabId) {
            mSlotId = Integer.parseInt(tabId);
            final SubscriptionInfo sir = getActiveSubscriptionInfoForSimSlotIndex(
                    mProxySubscriptionMgr.getActiveSubscriptionsInfo(), mSlotId);

            // The User has changed tab; update the body.
            updatePreferences();