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

Commit b576cec2 authored by Wink Saville's avatar Wink Saville Committed by Android (Google) Code Review
Browse files

Merge "Empty triangle displayed for radio signal but calls & data work"

parents 5adf8ee4 eeacf937
Loading
Loading
Loading
Loading
+10 −6
Original line number Original line Diff line number Diff line
@@ -89,7 +89,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {


        @Override
        @Override
        public String toString() {
        public String toString() {
            return "{pkgForDebug=" + pkgForDebug + " callerUid=" + callerUid +
            return "{pkgForDebug=" + pkgForDebug + " callerUid=" + callerUid + " subId=" + subId +
                    " events=" + Integer.toHexString(events) + "}";
                    " events=" + Integer.toHexString(events) + "}";
        }
        }
    }
    }
@@ -208,11 +208,13 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
            String action = intent.getAction();
            String action = intent.getAction();
            Slog.d(TAG, "mBroadcastReceiver: action=" + action);
            Slog.d(TAG, "mBroadcastReceiver: action=" + action);
            if (Intent.ACTION_USER_SWITCHED.equals(action)) {
            if (Intent.ACTION_USER_SWITCHED.equals(action)) {
                mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_SWITCHED,
                int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0);
                       intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0), 0));
                if (DBG) Slog.d(TAG, "onReceive: userHandle=" + userHandle);
                mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_SWITCHED, userHandle, 0));
            } else if (action.equals(TelephonyIntents.ACTION_DEFAULT_SUBSCRIPTION_CHANGED)) {
            } else if (action.equals(TelephonyIntents.ACTION_DEFAULT_SUBSCRIPTION_CHANGED)) {
                mDefaultSubId = intent.getLongExtra(PhoneConstants.SUBSCRIPTION_KEY,
                mDefaultSubId = intent.getLongExtra(PhoneConstants.SUBSCRIPTION_KEY,
                        SubscriptionManager.getDefaultSubId());
                        SubscriptionManager.getDefaultSubId());
                if (DBG) Slog.d(TAG, "onReceive: mDefaultSubId=" + mDefaultSubId);
                mHandler.sendMessage(mHandler.obtainMessage(MSG_UPDATE_DEFAULT_SUB, 0, 0));
                mHandler.sendMessage(mHandler.obtainMessage(MSG_UPDATE_DEFAULT_SUB, 0, 0));
            }
            }
        }
        }
@@ -340,18 +342,19 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
                    // the received subId value update the isLegacyApp field
                    // the received subId value update the isLegacyApp field
                    if ((r.subId <= 0) || (r.subId == SubscriptionManager.INVALID_SUB_ID)) {
                    if ((r.subId <= 0) || (r.subId == SubscriptionManager.INVALID_SUB_ID)) {
                        r.subId = mDefaultSubId;
                        r.subId = mDefaultSubId;
                        r.isLegacyApp = true; // FIXME: is this needed ??
                        r.isLegacyApp = true; // r.subId is to be update when default changes.
                    }
                    }
                    if (r.subId == SubscriptionManager.DEFAULT_SUB_ID) {
                    if (r.subId == SubscriptionManager.DEFAULT_SUB_ID) {
                        r.subId = mDefaultSubId;
                        r.subId = mDefaultSubId;
                        r.isLegacyApp = true; // r.subId is to be update when default changes.
                        if (DBG) Slog.i(TAG, "listen: DEFAULT_SUB_ID");
                        if (DBG) Slog.i(TAG, "listen: DEFAULT_SUB_ID");
                    }
                    }
                    mRecords.add(r);
                    mRecords.add(r);
                    if (DBG) Slog.i(TAG, "listen: add new record=" + r);
                    if (DBG) Slog.i(TAG, "listen: add new record");
                }
                }
                int phoneId = SubscriptionManager.getPhoneId(subId);
                int phoneId = SubscriptionManager.getPhoneId(subId);
                int send = events & (events ^ r.events);
                r.events = events;
                r.events = events;
                if (DBG) Slog.i(TAG, "listen: set events record=" + r);
                if (notifyNow && validatePhoneId(phoneId)) {
                if (notifyNow && validatePhoneId(phoneId)) {
                    if ((events & PhoneStateListener.LISTEN_SERVICE_STATE) != 0) {
                    if ((events & PhoneStateListener.LISTEN_SERVICE_STATE) != 0) {
                        try {
                        try {
@@ -1063,6 +1066,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
            pw.println("  mDataConnectionLinkProperties=" + mDataConnectionLinkProperties);
            pw.println("  mDataConnectionLinkProperties=" + mDataConnectionLinkProperties);
            pw.println("  mDataConnectionNetworkCapabilities=" +
            pw.println("  mDataConnectionNetworkCapabilities=" +
                    mDataConnectionNetworkCapabilities);
                    mDataConnectionNetworkCapabilities);
            pw.println("  mDefaultSubId=" + mDefaultSubId);
            pw.println("  mCellLocation=" + mCellLocation);
            pw.println("  mCellLocation=" + mCellLocation);
            pw.println("  mCellInfo=" + mCellInfo);
            pw.println("  mCellInfo=" + mCellInfo);
            pw.println("  mDcRtInfo=" + mDcRtInfo);
            pw.println("  mDcRtInfo=" + mDcRtInfo);
+7 −0
Original line number Original line Diff line number Diff line
@@ -105,4 +105,11 @@ public class SubInfoRecord implements Parcelable {
        return 0;
        return 0;
    }
    }


    public String toString() {
        return "{mSubId=" + mSubId + ", mIccId=" + mIccId + " mSlotId=" + mSlotId
                + " mDisplayName=" + mDisplayName + " mNameSource=" + mNameSource
                + " mColor=" + mColor + " mNumber=" + mNumber
                + " mDispalyNumberFormat=" + mDispalyNumberFormat + " mDataRoaming=" + mDataRoaming
                + " mSimIconRes=" + mSimIconRes + "}";
    }
}
}
+7 −3
Original line number Original line Diff line number Diff line
@@ -697,12 +697,16 @@ public class SubscriptionManager implements BaseColumns {
    public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId) {
    public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId) {
        long [] subId = SubscriptionManager.getSubId(phoneId);
        long [] subId = SubscriptionManager.getSubId(phoneId);
        if ((subId != null) && (subId.length >= 1)) {
        if ((subId != null) && (subId.length >= 1)) {
            if (VDBG) logd("putPhoneIdAndSubIdExtra: phoneId=" + phoneId + " subId=" + subId);
            putPhoneIdAndSubIdExtra(intent, phoneId, subId[0]);
            intent.putExtra(PhoneConstants.SLOT_KEY, phoneId); //FIXME: RENAME TO PHONE_ID_KEY ??
            intent.putExtra(PhoneConstants.SUBSCRIPTION_KEY, subId[0]);
        } else {
        } else {
            logd("putPhoneIdAndSubIdExtra: no valid subs");
            logd("putPhoneIdAndSubIdExtra: no valid subs");
        }
        }
    }
    }

    public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId, long subId) {
        if (VDBG) logd("putPhoneIdAndSubIdExtra: phoneId=" + phoneId + " subId=" + subId);
        intent.putExtra(PhoneConstants.SLOT_KEY, phoneId); //FIXME: RENAME TO PHONE_ID_KEY ??
        intent.putExtra(PhoneConstants.SUBSCRIPTION_KEY, subId);
    }
}
}