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

Commit 11070ba7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[Settings] Can not launch SIMs page correctly"

parents dcc1ee42 0d89c09b
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -118,15 +118,19 @@ public class MobileNetworkSettings extends AbstractMobileNetworkSettings {

    @Override
    protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
        if (getArguments() == null) {
            Intent intent = getIntent();
            if (intent != null) {
                mSubId = intent.getIntExtra(Settings.EXTRA_SUB_ID,
                        MobileNetworkUtils.getSearchableSubscriptionId(context));
            Log.i(LOG_TAG, "display subId from intent: " + mSubId);
                Log.d(LOG_TAG, "display subId from intent: " + mSubId);
            } else {
                Log.d(LOG_TAG, "intent is null, can not get the subId from intent.");
            }
        } else {
            mSubId = getArguments().getInt(Settings.EXTRA_SUB_ID,
                    MobileNetworkUtils.getSearchableSubscriptionId(context));
            Log.i(LOG_TAG, "display subId from getArguments(): " + mSubId);
            Log.d(LOG_TAG, "display subId from getArguments(): " + mSubId);
        }

        if (!SubscriptionManager.isValidSubscriptionId(mSubId)) {
+2 −1
Original line number Diff line number Diff line
@@ -1014,10 +1014,11 @@ public class MobileNetworkUtils {
    public static void launchMobileNetworkSettings(Context context, SubscriptionInfo info) {
        final int subId = info.getSubscriptionId();
        if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
            Log.d(TAG, "launchMobileNetworkSettings fail, subId is invalid");
            Log.d(TAG, "launchMobileNetworkSettings fail, subId is invalid.");
            return;
        }

        Log.d(TAG, "launchMobileNetworkSettings for subId: " + subId);
        final Bundle extra = new Bundle();
        extra.putInt(Settings.EXTRA_SUB_ID, subId);
        new SubSettingLauncher(context)