Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -42689,6 +42689,7 @@ package android.telephony { public class PhoneStateListener { ctor public PhoneStateListener(); ctor public PhoneStateListener(@NonNull java.util.concurrent.Executor); method public void onActiveDataSubscriptionIdChanged(int); method public void onCallForwardingIndicatorChanged(boolean); method public void onCallStateChanged(int, String); method public void onCellInfoChanged(java.util.List<android.telephony.CellInfo>); Loading @@ -42701,6 +42702,7 @@ package android.telephony { method @Deprecated public void onSignalStrengthChanged(int); method public void onSignalStrengthsChanged(android.telephony.SignalStrength); method public void onUserMobileDataStateChanged(boolean); field public static final int LISTEN_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGE = 4194304; // 0x400000 field public static final int LISTEN_CALL_FORWARDING_INDICATOR = 8; // 0x8 field public static final int LISTEN_CALL_STATE = 32; // 0x20 field public static final int LISTEN_CELL_INFO = 1024; // 0x400 services/core/java/com/android/server/TelephonyRegistry.java +4 −3 Original line number Diff line number Diff line Loading @@ -261,7 +261,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { PhoneStateListener.LISTEN_CALL_FORWARDING_INDICATOR | PhoneStateListener.LISTEN_MESSAGE_WAITING_INDICATOR | PhoneStateListener.LISTEN_EMERGENCY_NUMBER_LIST | PhoneStateListener.LISTEN_ACTIVE_DATA_SUBID_CHANGE; | PhoneStateListener.LISTEN_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGE; static final int PRECISE_PHONE_STATE_PERMISSION_MASK = PhoneStateListener.LISTEN_PRECISE_CALL_STATE | Loading Loading @@ -821,7 +821,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { remove(r.binder); } } if ((events & PhoneStateListener.LISTEN_ACTIVE_DATA_SUBID_CHANGE) != 0) { if ((events & PhoneStateListener .LISTEN_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGE) != 0) { try { r.callback.onActiveDataSubIdChanged(mActiveDataSubId); } catch (RemoteException ex) { Loading Loading @@ -1757,7 +1758,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { for (Record r : mRecords) { if (r.matchPhoneStateListenerEvent( PhoneStateListener.LISTEN_ACTIVE_DATA_SUBID_CHANGE)) { PhoneStateListener.LISTEN_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGE)) { try { r.callback.onActiveDataSubIdChanged(activeDataSubId); } catch (RemoteException ex) { Loading telephony/java/android/telephony/PhoneStateListener.java +11 −13 Original line number Diff line number Diff line Loading @@ -292,17 +292,16 @@ public class PhoneStateListener { public static final int LISTEN_PHONE_CAPABILITY_CHANGE = 0x00200000; /** * Listen for changes to active data subId. Active data subscription * is whichever is being used for Internet data. For most of the case, it's * default data subscription but it could be others. For example, when data is * switched to opportunistic subscription, that becomes the active data sub. * Listen for changes to active data subId. Active data subscription is * the current subscription used to setup Cellular Internet data. For example, * it could be the current active opportunistic subscription in use, or the * subscription user selected as default data subscription in DSDS mode. * * Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE * READ_PHONE_STATE} * @see #onActiveDataSubIdChanged * @hide * @see #onActiveDataSubscriptionIdChanged */ public static final int LISTEN_ACTIVE_DATA_SUBID_CHANGE = 0x00400000; public static final int LISTEN_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGE = 0x00400000; /** * Listen for changes to the radio power state. Loading Loading @@ -709,12 +708,11 @@ public class PhoneStateListener { /** * Callback invoked when active data subId changes. Requires * the READ_PHONE_STATE permission. * @param subId current data subId used for Internet data. It will be default data subscription * most cases. And it could be other subscriptions for example opportunistic * subscription if data is switched onto it. * @hide * @param subId current subscription used to setup Cellular Internet data. * For example, it could be the current active opportunistic subscription in use, * or the subscription user selected as default data subscription in DSDS mode. */ public void onActiveDataSubIdChanged(int subId) { public void onActiveDataSubscriptionIdChanged(int subId) { // default implementation empty } Loading Loading @@ -1003,7 +1001,7 @@ public class PhoneStateListener { if (psl == null) return; Binder.withCleanCallingIdentity( () -> mExecutor.execute(() -> psl.onActiveDataSubIdChanged(subId))); () -> mExecutor.execute(() -> psl.onActiveDataSubscriptionIdChanged(subId))); } public void onImsCallDisconnectCauseChanged(ImsReasonInfo disconnectCause) { Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -42689,6 +42689,7 @@ package android.telephony { public class PhoneStateListener { ctor public PhoneStateListener(); ctor public PhoneStateListener(@NonNull java.util.concurrent.Executor); method public void onActiveDataSubscriptionIdChanged(int); method public void onCallForwardingIndicatorChanged(boolean); method public void onCallStateChanged(int, String); method public void onCellInfoChanged(java.util.List<android.telephony.CellInfo>); Loading @@ -42701,6 +42702,7 @@ package android.telephony { method @Deprecated public void onSignalStrengthChanged(int); method public void onSignalStrengthsChanged(android.telephony.SignalStrength); method public void onUserMobileDataStateChanged(boolean); field public static final int LISTEN_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGE = 4194304; // 0x400000 field public static final int LISTEN_CALL_FORWARDING_INDICATOR = 8; // 0x8 field public static final int LISTEN_CALL_STATE = 32; // 0x20 field public static final int LISTEN_CELL_INFO = 1024; // 0x400
services/core/java/com/android/server/TelephonyRegistry.java +4 −3 Original line number Diff line number Diff line Loading @@ -261,7 +261,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { PhoneStateListener.LISTEN_CALL_FORWARDING_INDICATOR | PhoneStateListener.LISTEN_MESSAGE_WAITING_INDICATOR | PhoneStateListener.LISTEN_EMERGENCY_NUMBER_LIST | PhoneStateListener.LISTEN_ACTIVE_DATA_SUBID_CHANGE; | PhoneStateListener.LISTEN_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGE; static final int PRECISE_PHONE_STATE_PERMISSION_MASK = PhoneStateListener.LISTEN_PRECISE_CALL_STATE | Loading Loading @@ -821,7 +821,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { remove(r.binder); } } if ((events & PhoneStateListener.LISTEN_ACTIVE_DATA_SUBID_CHANGE) != 0) { if ((events & PhoneStateListener .LISTEN_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGE) != 0) { try { r.callback.onActiveDataSubIdChanged(mActiveDataSubId); } catch (RemoteException ex) { Loading Loading @@ -1757,7 +1758,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { for (Record r : mRecords) { if (r.matchPhoneStateListenerEvent( PhoneStateListener.LISTEN_ACTIVE_DATA_SUBID_CHANGE)) { PhoneStateListener.LISTEN_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGE)) { try { r.callback.onActiveDataSubIdChanged(activeDataSubId); } catch (RemoteException ex) { Loading
telephony/java/android/telephony/PhoneStateListener.java +11 −13 Original line number Diff line number Diff line Loading @@ -292,17 +292,16 @@ public class PhoneStateListener { public static final int LISTEN_PHONE_CAPABILITY_CHANGE = 0x00200000; /** * Listen for changes to active data subId. Active data subscription * is whichever is being used for Internet data. For most of the case, it's * default data subscription but it could be others. For example, when data is * switched to opportunistic subscription, that becomes the active data sub. * Listen for changes to active data subId. Active data subscription is * the current subscription used to setup Cellular Internet data. For example, * it could be the current active opportunistic subscription in use, or the * subscription user selected as default data subscription in DSDS mode. * * Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE * READ_PHONE_STATE} * @see #onActiveDataSubIdChanged * @hide * @see #onActiveDataSubscriptionIdChanged */ public static final int LISTEN_ACTIVE_DATA_SUBID_CHANGE = 0x00400000; public static final int LISTEN_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGE = 0x00400000; /** * Listen for changes to the radio power state. Loading Loading @@ -709,12 +708,11 @@ public class PhoneStateListener { /** * Callback invoked when active data subId changes. Requires * the READ_PHONE_STATE permission. * @param subId current data subId used for Internet data. It will be default data subscription * most cases. And it could be other subscriptions for example opportunistic * subscription if data is switched onto it. * @hide * @param subId current subscription used to setup Cellular Internet data. * For example, it could be the current active opportunistic subscription in use, * or the subscription user selected as default data subscription in DSDS mode. */ public void onActiveDataSubIdChanged(int subId) { public void onActiveDataSubscriptionIdChanged(int subId) { // default implementation empty } Loading Loading @@ -1003,7 +1001,7 @@ public class PhoneStateListener { if (psl == null) return; Binder.withCleanCallingIdentity( () -> mExecutor.execute(() -> psl.onActiveDataSubIdChanged(subId))); () -> mExecutor.execute(() -> psl.onActiveDataSubscriptionIdChanged(subId))); } public void onImsCallDisconnectCauseChanged(ImsReasonInfo disconnectCause) { Loading