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

Commit 48e33031 authored by Jordan Liu's avatar Jordan Liu Committed by android-build-merger
Browse files

Merge "Add null guard and wtf log to getSubId" am: c70a5888

am: 65fe84e4

Change-Id: Ica1156104486e47a73e50d8d33c064faebad6894
parents 8f91ca10 65fe84e4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -3134,6 +3134,13 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * Returns the subscription id.
     */
    public int getSubId() {
        if (SubscriptionController.getInstance() == null) {
            // TODO b/78359408 getInstance sometimes returns null in Treehugger tests, which causes
            // flakiness. Even though we haven't seen this crash in the wild we should keep this
            // check in until we've figured out the root cause.
            Rlog.e(LOG_TAG, "SubscriptionController.getInstance = null! Returning default subId");
            return SubscriptionManager.DEFAULT_SUBSCRIPTION_ID;
        }
        return SubscriptionController.getInstance().getSubIdUsingPhoneId(mPhoneId);
    }