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

Commit cdb08ee9 authored by SongFerng Wang's avatar SongFerng Wang Committed by Android (Google) Code Review
Browse files

Merge "[MEP] The condition of "null point check" is wrong" into tm-dev

parents 9ca62b22 ce8232d0
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -258,10 +258,11 @@ public class SimSlotChangeHandler {
        }
        }


        List<SubscriptionInfo> subscriptionInfos = getAvailableRemovableSubscription();
        List<SubscriptionInfo> subscriptionInfos = getAvailableRemovableSubscription();
        if (subscriptionInfos == null && subscriptionInfos.get(0) != null) {
        if (subscriptionInfos == null || subscriptionInfos.get(0) == null) {
            Log.e(TAG, "Unable to find the removable subscriptionInfo. Do nothing.");
            Log.e(TAG, "Unable to find the removable subscriptionInfo. Do nothing.");
            return;
            return;
        }
        }
        Log.d(TAG, "getAvailableRemovableSubscription:" + subscriptionInfos);
        startSimConfirmDialogActivity(subscriptionInfos.get(0).getSubscriptionId());
        startSimConfirmDialogActivity(subscriptionInfos.get(0).getSubscriptionId());
    }
    }


@@ -364,6 +365,7 @@ public class SimSlotChangeHandler {
            Log.i(TAG, "Unable to enable subscription due to invalid subscription ID.");
            Log.i(TAG, "Unable to enable subscription due to invalid subscription ID.");
            return;
            return;
        }
        }
        Log.d(TAG, "Start ToggleSubscriptionDialogActivity with " + subId + " under DSDS+Mep.");
        Intent intent = ToggleSubscriptionDialogActivity.getIntent(mContext, subId, true);
        Intent intent = ToggleSubscriptionDialogActivity.getIntent(mContext, subId, true);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        mContext.startActivity(intent);
        mContext.startActivity(intent);
@@ -372,7 +374,7 @@ public class SimSlotChangeHandler {
    private boolean isMultipleEnabledProfilesSupported() {
    private boolean isMultipleEnabledProfilesSupported() {
        List<UiccCardInfo> cardInfos = mTelMgr.getUiccCardsInfo();
        List<UiccCardInfo> cardInfos = mTelMgr.getUiccCardsInfo();
        if (cardInfos == null) {
        if (cardInfos == null) {
            Log.w(TAG, "UICC cards info list is empty.");
            Log.d(TAG, "UICC cards info list is empty.");
            return false;
            return false;
        }
        }
        return cardInfos.stream().anyMatch(
        return cardInfos.stream().anyMatch(