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

Commit ae85478d authored by Wink Saville's avatar Wink Saville Committed by android-build-merger
Browse files

am 4dec130c: Merge "Change subId to int from long" into lmp-mr1-dev

automerge: e5b4c121

* commit 'e5b4c121':
  Change subId to int from long
parents 4d4b2cfd e5b4c121
Loading
Loading
Loading
Loading
+11 −11
Original line number Original line Diff line number Diff line
@@ -28715,8 +28715,8 @@ package android.telephony {
    method public void downloadMultimediaMessage(android.content.Context, java.lang.String, android.net.Uri, android.os.Bundle, android.app.PendingIntent);
    method public void downloadMultimediaMessage(android.content.Context, java.lang.String, android.net.Uri, android.os.Bundle, android.app.PendingIntent);
    method public android.os.Bundle getCarrierConfigValues();
    method public android.os.Bundle getCarrierConfigValues();
    method public static android.telephony.SmsManager getDefault();
    method public static android.telephony.SmsManager getDefault();
    method public static android.telephony.SmsManager getSmsManagerForSubscriber(long);
    method public static android.telephony.SmsManager getSmsManagerForSubscriber(int);
    method public long getSubId();
    method public int getSubId();
    method public void injectSmsPdu(byte[], java.lang.String, android.app.PendingIntent);
    method public void injectSmsPdu(byte[], java.lang.String, android.app.PendingIntent);
    method public void sendDataMessage(java.lang.String, java.lang.String, short, byte[], android.app.PendingIntent, android.app.PendingIntent);
    method public void sendDataMessage(java.lang.String, java.lang.String, short, byte[], android.app.PendingIntent, android.app.PendingIntent);
    method public void sendMultimediaMessage(android.content.Context, android.net.Uri, java.lang.String, android.os.Bundle, android.app.PendingIntent);
    method public void sendMultimediaMessage(android.content.Context, android.net.Uri, java.lang.String, android.os.Bundle, android.app.PendingIntent);
@@ -28834,7 +28834,7 @@ package android.telephony {
  public class SubInfoRecord implements android.os.Parcelable {
  public class SubInfoRecord implements android.os.Parcelable {
    ctor public SubInfoRecord();
    ctor public SubInfoRecord();
    ctor public SubInfoRecord(long, java.lang.String, int, java.lang.String, int, int, java.lang.String, int, int, int[], int, int);
    ctor public SubInfoRecord(int, java.lang.String, int, java.lang.String, int, int, java.lang.String, int, int, int[], int, int);
    method public int describeContents();
    method public int describeContents();
    method public int getColor();
    method public int getColor();
    method public android.graphics.drawable.BitmapDrawable getIconDrawable();
    method public android.graphics.drawable.BitmapDrawable getIconDrawable();
@@ -28852,22 +28852,22 @@ package android.telephony {
    field public java.lang.String number;
    field public java.lang.String number;
    field public int[] simIconRes;
    field public int[] simIconRes;
    field public int slotId;
    field public int slotId;
    field public long subId;
    field public int subId;
  }
  }
  public class SubscriptionManager implements android.provider.BaseColumns {
  public class SubscriptionManager implements android.provider.BaseColumns {
    method public static java.util.List<android.telephony.SubInfoRecord> getActiveSubInfoList();
    method public static java.util.List<android.telephony.SubInfoRecord> getActiveSubInfoList();
    method public static long getDefaultSmsSubId();
    method public static int getDefaultSmsSubId();
    method public static int getSlotId(long);
    method public static int getSlotId(int);
    method public static android.telephony.SubInfoRecord getSubInfoForSubscriber(long);
    method public static android.telephony.SubInfoRecord getSubInfoForSubscriber(int);
    method public static java.util.List<android.telephony.SubInfoRecord> getSubInfoUsingSlotId(int);
    method public static java.util.List<android.telephony.SubInfoRecord> getSubInfoUsingSlotId(int);
    method public static boolean isValidSubId(long);
    method public static boolean isValidSubId(int);
    field public static final long ASK_USER_SUB_ID = -1001L; // 0xfffffffffffffc17L
    field public static final int ASK_USER_SUB_ID = -1001; // 0xfffffc17
    field public static final int DEFAULT_PHONE_ID = 2147483647; // 0x7fffffff
    field public static final int DEFAULT_PHONE_ID = 2147483647; // 0x7fffffff
    field public static final long DEFAULT_SUB_ID = 9223372036854775807L; // 0x7fffffffffffffffL
    field public static final int DEFAULT_SUB_ID = 2147483647; // 0x7fffffff
    field public static final int INVALID_PHONE_ID = -1000; // 0xfffffc18
    field public static final int INVALID_PHONE_ID = -1000; // 0xfffffc18
    field public static final int INVALID_SLOT_ID = -1000; // 0xfffffc18
    field public static final int INVALID_SLOT_ID = -1000; // 0xfffffc18
    field public static final long INVALID_SUB_ID = -1000L; // 0xfffffffffffffc18L
    field public static final int INVALID_SUB_ID = -1000; // 0xfffffc18
    field public static final java.lang.String MCC = "mcc";
    field public static final java.lang.String MCC = "mcc";
    field public static final java.lang.String MNC = "mnc";
    field public static final java.lang.String MNC = "mnc";
    field public static final int SIM_NOT_INSERTED = -1; // 0xffffffff
    field public static final int SIM_NOT_INSERTED = -1; // 0xffffffff
+4 −4
Original line number Original line Diff line number Diff line
@@ -219,7 +219,7 @@ public class MmsServiceBroker extends SystemService {
    // Service API calls implementation, proxied to the real MmsService in "com.android.mms.service"
    // Service API calls implementation, proxied to the real MmsService in "com.android.mms.service"
    private final class BinderService extends IMms.Stub {
    private final class BinderService extends IMms.Stub {
        @Override
        @Override
        public void sendMessage(long subId, String callingPkg, Uri contentUri,
        public void sendMessage(int subId, String callingPkg, Uri contentUri,
                String locationUrl, Bundle configOverrides, PendingIntent sentIntent)
                String locationUrl, Bundle configOverrides, PendingIntent sentIntent)
                        throws RemoteException {
                        throws RemoteException {
            mContext.enforceCallingPermission(Manifest.permission.SEND_SMS, "Send MMS message");
            mContext.enforceCallingPermission(Manifest.permission.SEND_SMS, "Send MMS message");
@@ -232,7 +232,7 @@ public class MmsServiceBroker extends SystemService {
        }
        }


        @Override
        @Override
        public void downloadMessage(long subId, String callingPkg, String locationUrl,
        public void downloadMessage(int subId, String callingPkg, String locationUrl,
                Uri contentUri, Bundle configOverrides,
                Uri contentUri, Bundle configOverrides,
                PendingIntent downloadedIntent) throws RemoteException {
                PendingIntent downloadedIntent) throws RemoteException {
            mContext.enforceCallingPermission(Manifest.permission.RECEIVE_MMS,
            mContext.enforceCallingPermission(Manifest.permission.RECEIVE_MMS,
@@ -259,7 +259,7 @@ public class MmsServiceBroker extends SystemService {
        }
        }


        @Override
        @Override
        public Bundle getCarrierConfigValues(long subId) throws RemoteException {
        public Bundle getCarrierConfigValues(int subId) throws RemoteException {
            return getServiceGuarded().getCarrierConfigValues(subId);
            return getServiceGuarded().getCarrierConfigValues(subId);
        }
        }


@@ -360,7 +360,7 @@ public class MmsServiceBroker extends SystemService {
        }
        }


        @Override
        @Override
        public void sendStoredMessage(long subId, String callingPkg, Uri messageUri,
        public void sendStoredMessage(int subId, String callingPkg, Uri messageUri,
                Bundle configOverrides, PendingIntent sentIntent) throws RemoteException {
                Bundle configOverrides, PendingIntent sentIntent) throws RemoteException {
            mContext.enforceCallingPermission(Manifest.permission.SEND_SMS,
            mContext.enforceCallingPermission(Manifest.permission.SEND_SMS,
                    "Send stored MMS message");
                    "Send stored MMS message");
+27 −27
Original line number Original line Diff line number Diff line
@@ -72,7 +72,7 @@ import com.android.server.am.BatteryStatsService;
 * and 15973975 by saving the phoneId of the registrant and then using the
 * and 15973975 by saving the phoneId of the registrant and then using the
 * phoneId when deciding to to make a callback. This is necessary because
 * phoneId when deciding to to make a callback. This is necessary because
 * a subId changes from to a dummy value when a SIM is removed and thus won't
 * a subId changes from to a dummy value when a SIM is removed and thus won't
 * compare properly. Because SubscriptionManager.getPhoneId(long subId) handles
 * compare properly. Because SubscriptionManager.getPhoneId(int subId) handles
 * the dummy value conversion we properly do the callbacks.
 * the dummy value conversion we properly do the callbacks.
 *
 *
 * Eventually we may want to remove the notion of dummy value but for now this
 * Eventually we may want to remove the notion of dummy value but for now this
@@ -95,7 +95,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {


        int events;
        int events;


        long subId;
        int subId;


        int phoneId;
        int phoneId;


@@ -154,7 +154,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {


    private VoLteServiceState mVoLteServiceState = new VoLteServiceState();
    private VoLteServiceState mVoLteServiceState = new VoLteServiceState();


    private long mDefaultSubId = SubscriptionManager.INVALID_SUB_ID;
    private int mDefaultSubId = SubscriptionManager.INVALID_SUB_ID;


    private int mDefaultPhoneId = SubscriptionManager.INVALID_PHONE_ID;
    private int mDefaultPhoneId = SubscriptionManager.INVALID_PHONE_ID;


@@ -201,7 +201,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
                }
                }
                case MSG_UPDATE_DEFAULT_SUB: {
                case MSG_UPDATE_DEFAULT_SUB: {
                    int newDefaultPhoneId = msg.arg1;
                    int newDefaultPhoneId = msg.arg1;
                    long newDefaultSubId = (Long)(msg.obj);
                    int newDefaultSubId = (Integer)(msg.obj);
                    if (VDBG) {
                    if (VDBG) {
                        log("MSG_UPDATE_DEFAULT_SUB:current mDefaultSubId=" + mDefaultSubId
                        log("MSG_UPDATE_DEFAULT_SUB:current mDefaultSubId=" + mDefaultSubId
                            + " current mDefaultPhoneId=" + mDefaultPhoneId + " newDefaultSubId= "
                            + " current mDefaultPhoneId=" + mDefaultPhoneId + " newDefaultSubId= "
@@ -236,7 +236,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
                if (DBG) log("onReceive: userHandle=" + userHandle);
                if (DBG) log("onReceive: userHandle=" + userHandle);
                mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_SWITCHED, userHandle, 0));
                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)) {
                Long newDefaultSubIdObj = new Long(intent.getLongExtra(
                Integer newDefaultSubIdObj = new Integer(intent.getIntExtra(
                        PhoneConstants.SUBSCRIPTION_KEY, SubscriptionManager.getDefaultSubId()));
                        PhoneConstants.SUBSCRIPTION_KEY, SubscriptionManager.getDefaultSubId()));
                int newDefaultPhoneId = intent.getIntExtra(PhoneConstants.SLOT_KEY,
                int newDefaultPhoneId = intent.getIntExtra(PhoneConstants.SLOT_KEY,
                    SubscriptionManager.getPhoneId(mDefaultSubId));
                    SubscriptionManager.getPhoneId(mDefaultSubId));
@@ -332,13 +332,13 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
    }
    }


    @Override
    @Override
    public void listenForSubscriber(long subId, String pkgForDebug, IPhoneStateListener callback,
    public void listenForSubscriber(int subId, String pkgForDebug, IPhoneStateListener callback,
            int events, boolean notifyNow) {
            int events, boolean notifyNow) {
        listen(pkgForDebug, callback, events, notifyNow, subId);
        listen(pkgForDebug, callback, events, notifyNow, subId);
    }
    }


    private void listen(String pkgForDebug, IPhoneStateListener callback, int events,
    private void listen(String pkgForDebug, IPhoneStateListener callback, int events,
            boolean notifyNow, long subId) {
            boolean notifyNow, int subId) {
        int callerUid = UserHandle.getCallingUserId();
        int callerUid = UserHandle.getCallingUserId();
        int myUid = UserHandle.myUserId();
        int myUid = UserHandle.myUserId();
        if (VDBG) {
        if (VDBG) {
@@ -545,7 +545,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
        broadcastCallStateChanged(state, incomingNumber, SubscriptionManager.DEFAULT_SUB_ID);
        broadcastCallStateChanged(state, incomingNumber, SubscriptionManager.DEFAULT_SUB_ID);
    }
    }


    public void notifyCallStateForSubscriber(long subId, int state, String incomingNumber) {
    public void notifyCallStateForSubscriber(int subId, int state, String incomingNumber) {
        if (!checkNotifyPermission("notifyCallState()")) {
        if (!checkNotifyPermission("notifyCallState()")) {
            return;
            return;
        }
        }
@@ -575,7 +575,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
        broadcastCallStateChanged(state, incomingNumber, subId);
        broadcastCallStateChanged(state, incomingNumber, subId);
    }
    }


    public void notifyServiceStateForPhoneId(int phoneId, long subId, ServiceState state) {
    public void notifyServiceStateForPhoneId(int phoneId, int subId, ServiceState state) {
        if (!checkNotifyPermission("notifyServiceState()")){
        if (!checkNotifyPermission("notifyServiceState()")){
            return;
            return;
        }
        }
@@ -621,7 +621,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
        notifySignalStrengthForSubscriber(SubscriptionManager.DEFAULT_SUB_ID, signalStrength);
        notifySignalStrengthForSubscriber(SubscriptionManager.DEFAULT_SUB_ID, signalStrength);
    }
    }


    public void notifySignalStrengthForSubscriber(long subId, SignalStrength signalStrength) {
    public void notifySignalStrengthForSubscriber(int subId, SignalStrength signalStrength) {
        if (!checkNotifyPermission("notifySignalStrength()")) {
        if (!checkNotifyPermission("notifySignalStrength()")) {
            return;
            return;
        }
        }
@@ -681,7 +681,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
         notifyCellInfoForSubscriber(SubscriptionManager.DEFAULT_SUB_ID, cellInfo);
         notifyCellInfoForSubscriber(SubscriptionManager.DEFAULT_SUB_ID, cellInfo);
    }
    }


    public void notifyCellInfoForSubscriber(long subId, List<CellInfo> cellInfo) {
    public void notifyCellInfoForSubscriber(int subId, List<CellInfo> cellInfo) {
        if (!checkNotifyPermission("notifyCellInfo()")) {
        if (!checkNotifyPermission("notifyCellInfo()")) {
            return;
            return;
        }
        }
@@ -738,7 +738,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
    }
    }


    @Override
    @Override
    public void notifyMessageWaitingChangedForPhoneId(int phoneId, long subId, boolean mwi) {
    public void notifyMessageWaitingChangedForPhoneId(int phoneId, int subId, boolean mwi) {
        if (!checkNotifyPermission("notifyMessageWaitingChanged()")) {
        if (!checkNotifyPermission("notifyMessageWaitingChanged()")) {
            return;
            return;
        }
        }
@@ -768,7 +768,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
        notifyCallForwardingChangedForSubscriber(SubscriptionManager.DEFAULT_SUB_ID, cfi);
        notifyCallForwardingChangedForSubscriber(SubscriptionManager.DEFAULT_SUB_ID, cfi);
    }
    }


    public void notifyCallForwardingChangedForSubscriber(long subId, boolean cfi) {
    public void notifyCallForwardingChangedForSubscriber(int subId, boolean cfi) {
        if (!checkNotifyPermission("notifyCallForwardingChanged()")) {
        if (!checkNotifyPermission("notifyCallForwardingChanged()")) {
            return;
            return;
        }
        }
@@ -799,7 +799,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
        notifyDataActivityForSubscriber(SubscriptionManager.DEFAULT_SUB_ID, state);
        notifyDataActivityForSubscriber(SubscriptionManager.DEFAULT_SUB_ID, state);
    }
    }


    public void notifyDataActivityForSubscriber(long subId, int state) {
    public void notifyDataActivityForSubscriber(int subId, int state) {
        if (!checkNotifyPermission("notifyDataActivity()" )) {
        if (!checkNotifyPermission("notifyDataActivity()" )) {
            return;
            return;
        }
        }
@@ -827,7 +827,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
            networkCapabilities, networkType, roaming);
            networkCapabilities, networkType, roaming);
    }
    }


    public void notifyDataConnectionForSubscriber(long subId, int state,
    public void notifyDataConnectionForSubscriber(int subId, int state,
            boolean isDataConnectivityPossible, String reason, String apn, String apnType,
            boolean isDataConnectivityPossible, String reason, String apn, String apnType,
            LinkProperties linkProperties, NetworkCapabilities networkCapabilities,
            LinkProperties linkProperties, NetworkCapabilities networkCapabilities,
            int networkType, boolean roaming) {
            int networkType, boolean roaming) {
@@ -916,7 +916,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
                 reason, apnType);
                 reason, apnType);
    }
    }


    public void notifyDataConnectionFailedForSubscriber(long subId,
    public void notifyDataConnectionFailedForSubscriber(int subId,
            String reason, String apnType) {
            String reason, String apnType) {
        if (!checkNotifyPermission("notifyDataConnectionFailed()")) {
        if (!checkNotifyPermission("notifyDataConnectionFailed()")) {
            return;
            return;
@@ -949,7 +949,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
         notifyCellLocationForSubscriber(SubscriptionManager.DEFAULT_SUB_ID, cellLocation);
         notifyCellLocationForSubscriber(SubscriptionManager.DEFAULT_SUB_ID, cellLocation);
    }
    }


    public void notifyCellLocationForSubscriber(long subId, Bundle cellLocation) {
    public void notifyCellLocationForSubscriber(int subId, Bundle cellLocation) {
        log("notifyCellLocationForSubscriber: subId=" + subId
        log("notifyCellLocationForSubscriber: subId=" + subId
                + " cellLocation=" + cellLocation);
                + " cellLocation=" + cellLocation);
        if (!checkNotifyPermission("notifyCellLocation()")) {
        if (!checkNotifyPermission("notifyCellLocation()")) {
@@ -1096,7 +1096,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
        }
        }
    }
    }


    public void notifyOemHookRawEventForSubscriber(long subId, byte[] rawData) {
    public void notifyOemHookRawEventForSubscriber(int subId, byte[] rawData) {
        if (!checkNotifyPermission("notifyOemHookRawEventForSubscriber")) {
        if (!checkNotifyPermission("notifyOemHookRawEventForSubscriber")) {
            return;
            return;
        }
        }
@@ -1162,7 +1162,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
    // the legacy intent broadcasting
    // the legacy intent broadcasting
    //
    //


    private void broadcastServiceStateChanged(ServiceState state, long subId) {
    private void broadcastServiceStateChanged(ServiceState state, int subId) {
        long ident = Binder.clearCallingIdentity();
        long ident = Binder.clearCallingIdentity();
        try {
        try {
            mBatteryStats.notePhoneState(state.getState());
            mBatteryStats.notePhoneState(state.getState());
@@ -1181,7 +1181,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
        mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
        mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
    }
    }


    private void broadcastSignalStrengthChanged(SignalStrength signalStrength, long subId) {
    private void broadcastSignalStrengthChanged(SignalStrength signalStrength, int subId) {
        long ident = Binder.clearCallingIdentity();
        long ident = Binder.clearCallingIdentity();
        try {
        try {
            mBatteryStats.notePhoneSignalStrength(signalStrength);
            mBatteryStats.notePhoneSignalStrength(signalStrength);
@@ -1200,7 +1200,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
        mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
        mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
    }
    }


    private void broadcastCallStateChanged(int state, String incomingNumber, long subId) {
    private void broadcastCallStateChanged(int state, String incomingNumber, int subId) {
        long ident = Binder.clearCallingIdentity();
        long ident = Binder.clearCallingIdentity();
        try {
        try {
            if (state == TelephonyManager.CALL_STATE_IDLE) {
            if (state == TelephonyManager.CALL_STATE_IDLE) {
@@ -1228,7 +1228,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
    private void broadcastDataConnectionStateChanged(int state,
    private void broadcastDataConnectionStateChanged(int state,
            boolean isDataConnectivityPossible,
            boolean isDataConnectivityPossible,
            String reason, String apn, String apnType, LinkProperties linkProperties,
            String reason, String apn, String apnType, LinkProperties linkProperties,
            NetworkCapabilities networkCapabilities, boolean roaming, long subId) {
            NetworkCapabilities networkCapabilities, boolean roaming, int subId) {
        // Note: not reporting to the battery stats service here, because the
        // Note: not reporting to the battery stats service here, because the
        // status bar takes care of that after taking into account all of the
        // status bar takes care of that after taking into account all of the
        // required info.
        // required info.
@@ -1260,7 +1260,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
    }
    }


    private void broadcastDataConnectionFailed(String reason, String apnType,
    private void broadcastDataConnectionFailed(String reason, String apnType,
            long subId) {
            int subId) {
        Intent intent = new Intent(TelephonyIntents.ACTION_DATA_CONNECTION_FAILED);
        Intent intent = new Intent(TelephonyIntents.ACTION_DATA_CONNECTION_FAILED);
        intent.putExtra(PhoneConstants.FAILURE_REASON_KEY, reason);
        intent.putExtra(PhoneConstants.FAILURE_REASON_KEY, reason);
        intent.putExtra(PhoneConstants.DATA_APN_TYPE_KEY, apnType);
        intent.putExtra(PhoneConstants.DATA_APN_TYPE_KEY, apnType);
@@ -1376,11 +1376,11 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
    private static class LogSSC {
    private static class LogSSC {
        private Time mTime;
        private Time mTime;
        private String mS;
        private String mS;
        private long mSubId;
        private int mSubId;
        private int mPhoneId;
        private int mPhoneId;
        private ServiceState mState;
        private ServiceState mState;


        public void set(Time t, String s, long subId, int phoneId, ServiceState state) {
        public void set(Time t, String s, int subId, int phoneId, ServiceState state) {
            mTime = t; mS = s; mSubId = subId; mPhoneId = phoneId; mState = state;
            mTime = t; mS = s; mSubId = subId; mPhoneId = phoneId; mState = state;
        }
        }


@@ -1393,7 +1393,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
    private LogSSC logSSC [] = new LogSSC[10];
    private LogSSC logSSC [] = new LogSSC[10];
    private int next = 0;
    private int next = 0;


    private void logServiceStateChanged(String s, long subId, int phoneId, ServiceState state) {
    private void logServiceStateChanged(String s, int subId, int phoneId, ServiceState state) {
        if (logSSC == null || logSSC.length == 0) {
        if (logSSC == null || logSSC.length == 0) {
            return;
            return;
        }
        }
@@ -1429,7 +1429,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
        }
        }
    }
    }


    boolean subIdMatch(long rSubId, long subId) {
    boolean subIdMatch(int rSubId, int subId) {
        if(rSubId == SubscriptionManager.DEFAULT_SUB_ID) {
        if(rSubId == SubscriptionManager.DEFAULT_SUB_ID) {
            return (subId == mDefaultSubId);
            return (subId == mDefaultSubId);
        } else {
        } else {
+11 −11
Original line number Original line Diff line number Diff line
@@ -1570,7 +1570,7 @@ public class PhoneNumberUtils
     *         listed in the RIL / SIM, otherwise return false.
     *         listed in the RIL / SIM, otherwise return false.
     * @hide
     * @hide
     */
     */
    public static boolean isEmergencyNumber(long subId, String number) {
    public static boolean isEmergencyNumber(int subId, String number) {
        // Return true only if the specified number *exactly* matches
        // Return true only if the specified number *exactly* matches
        // one of the emergency numbers listed by the RIL / SIM.
        // one of the emergency numbers listed by the RIL / SIM.
        return isEmergencyNumberInternal(subId, number, true /* useExactMatch */);
        return isEmergencyNumberInternal(subId, number, true /* useExactMatch */);
@@ -1620,7 +1620,7 @@ public class PhoneNumberUtils
     *         same digits as any of those emergency numbers.
     *         same digits as any of those emergency numbers.
     * @hide
     * @hide
     */
     */
    public static boolean isPotentialEmergencyNumber(long subId, String number) {
    public static boolean isPotentialEmergencyNumber(int subId, String number) {
        // Check against the emergency numbers listed by the RIL / SIM,
        // Check against the emergency numbers listed by the RIL / SIM,
        // and *don't* require an exact match.
        // and *don't* require an exact match.
        return isEmergencyNumberInternal(subId, number, false /* useExactMatch */);
        return isEmergencyNumberInternal(subId, number, false /* useExactMatch */);
@@ -1669,7 +1669,7 @@ public class PhoneNumberUtils
     * @return true if the number is in the list of emergency numbers
     * @return true if the number is in the list of emergency numbers
     *         listed in the RIL / sim, otherwise return false.
     *         listed in the RIL / sim, otherwise return false.
     */
     */
    private static boolean isEmergencyNumberInternal(long subId, String number,
    private static boolean isEmergencyNumberInternal(int subId, String number,
            boolean useExactMatch) {
            boolean useExactMatch) {
        return isEmergencyNumberInternal(subId, number, null, useExactMatch);
        return isEmergencyNumberInternal(subId, number, null, useExactMatch);
    }
    }
@@ -1698,7 +1698,7 @@ public class PhoneNumberUtils
     * otherwise false
     * otherwise false
     * @hide
     * @hide
     */
     */
    public static boolean isEmergencyNumber(long subId, String number, String defaultCountryIso) {
    public static boolean isEmergencyNumber(int subId, String number, String defaultCountryIso) {
        return isEmergencyNumberInternal(subId, number,
        return isEmergencyNumberInternal(subId, number,
                                         defaultCountryIso,
                                         defaultCountryIso,
                                         true /* useExactMatch */);
                                         true /* useExactMatch */);
@@ -1750,7 +1750,7 @@ public class PhoneNumberUtils
     *         any of those emergency numbers.
     *         any of those emergency numbers.
     * @hide
     * @hide
     */
     */
    public static boolean isPotentialEmergencyNumber(long subId, String number,
    public static boolean isPotentialEmergencyNumber(int subId, String number,
            String defaultCountryIso) {
            String defaultCountryIso) {
        return isEmergencyNumberInternal(subId, number,
        return isEmergencyNumberInternal(subId, number,
                                         defaultCountryIso,
                                         defaultCountryIso,
@@ -1794,7 +1794,7 @@ public class PhoneNumberUtils
     * @return true if the number is an emergency number for the specified country.
     * @return true if the number is an emergency number for the specified country.
     * @hide
     * @hide
     */
     */
    private static boolean isEmergencyNumberInternal(long subId, String number,
    private static boolean isEmergencyNumberInternal(int subId, String number,
                                                     String defaultCountryIso,
                                                     String defaultCountryIso,
                                                     boolean useExactMatch) {
                                                     boolean useExactMatch) {
        // If the number passed in is null, just return false:
        // If the number passed in is null, just return false:
@@ -1911,7 +1911,7 @@ public class PhoneNumberUtils
     * is currently in.
     * is currently in.
     * @hide
     * @hide
     */
     */
    public static boolean isLocalEmergencyNumber(Context context, long subId, String number) {
    public static boolean isLocalEmergencyNumber(Context context, int subId, String number) {
        return isLocalEmergencyNumberInternal(subId, number,
        return isLocalEmergencyNumberInternal(subId, number,
                                              context,
                                              context,
                                              true /* useExactMatch */);
                                              true /* useExactMatch */);
@@ -1965,7 +1965,7 @@ public class PhoneNumberUtils
     *
     *
     * @hide
     * @hide
     */
     */
    public static boolean isPotentialLocalEmergencyNumber(Context context, long subId,
    public static boolean isPotentialLocalEmergencyNumber(Context context, int subId,
            String number) {
            String number) {
        return isLocalEmergencyNumberInternal(subId, number,
        return isLocalEmergencyNumberInternal(subId, number,
                                              context,
                                              context,
@@ -2014,7 +2014,7 @@ public class PhoneNumberUtils
     *              local country, based on the CountryDetector.
     *              local country, based on the CountryDetector.
     * @hide
     * @hide
     */
     */
    private static boolean isLocalEmergencyNumberInternal(long subId, String number,
    private static boolean isLocalEmergencyNumberInternal(int subId, String number,
                                                          Context context,
                                                          Context context,
                                                          boolean useExactMatch) {
                                                          boolean useExactMatch) {
        String countryIso;
        String countryIso;
@@ -2057,7 +2057,7 @@ public class PhoneNumberUtils
     * to read the VM number.
     * to read the VM number.
     * @hide
     * @hide
     */
     */
    public static boolean isVoiceMailNumber(long subId, String number) {
    public static boolean isVoiceMailNumber(int subId, String number) {
        String vmNumber;
        String vmNumber;


        try {
        try {
@@ -2796,7 +2796,7 @@ public class PhoneNumberUtils
    /**
    /**
     * Returns Default voice subscription Id.
     * Returns Default voice subscription Id.
     */
     */
    private static long getDefaultVoiceSubId() {
    private static int getDefaultVoiceSubId() {
        return SubscriptionManager.getDefaultVoiceSubId();
        return SubscriptionManager.getDefaultVoiceSubId();
    }
    }
    //==== End of utility methods used only in compareStrictly() =====
    //==== End of utility methods used only in compareStrictly() =====
+4 −4
Original line number Original line Diff line number Diff line
@@ -227,7 +227,7 @@ public class PhoneStateListener {
     * @hide
     * @hide
     */
     */
    /** @hide */
    /** @hide */
    protected long mSubId = SubscriptionManager.INVALID_SUB_ID;
    protected int mSubId = SubscriptionManager.INVALID_SUB_ID;


    private final Handler mHandler;
    private final Handler mHandler;


@@ -252,10 +252,10 @@ public class PhoneStateListener {
    /**
    /**
     * Create a PhoneStateListener for the Phone using the specified subscription.
     * Create a PhoneStateListener for the Phone using the specified subscription.
     * This class requires Looper.myLooper() not return null. To supply your
     * This class requires Looper.myLooper() not return null. To supply your
     * own non-null Looper use PhoneStateListener(long subId, Looper looper) below.
     * own non-null Looper use PhoneStateListener(int subId, Looper looper) below.
     * @hide
     * @hide
     */
     */
    public PhoneStateListener(long subId) {
    public PhoneStateListener(int subId) {
        this(subId, Looper.myLooper());
        this(subId, Looper.myLooper());
    }
    }


@@ -264,7 +264,7 @@ public class PhoneStateListener {
     * and non-null Looper.
     * and non-null Looper.
     * @hide
     * @hide
     */
     */
    public PhoneStateListener(long subId, Looper looper) {
    public PhoneStateListener(int subId, Looper looper) {
        if (DBG) log("ctor: subId=" + subId + " looper=" + looper);
        if (DBG) log("ctor: subId=" + subId + " looper=" + looper);
        mSubId = subId;
        mSubId = subId;
        mHandler = new Handler(looper) {
        mHandler = new Handler(looper) {
Loading