Expose all TelephonyRegistryManager methods
Expose all the methods as SystemApis for telephony to use. Fixes: 148114017 Test: atest TelephonyRegistryManagerTest Change-Id: I43537bf741742eb9e8df1a55e20cc3c8b2bbd874
This commit is contained in:
@@ -11383,10 +11383,32 @@ package android.telephony {
|
||||
public class TelephonyRegistryManager {
|
||||
method public void addOnOpportunisticSubscriptionsChangedListener(@NonNull android.telephony.SubscriptionManager.OnOpportunisticSubscriptionsChangedListener, @NonNull java.util.concurrent.Executor);
|
||||
method public void addOnSubscriptionsChangedListener(@NonNull android.telephony.SubscriptionManager.OnSubscriptionsChangedListener, @NonNull java.util.concurrent.Executor);
|
||||
method public void notifyActiveDataSubIdChanged(int);
|
||||
method public void notifyBarringInfoChanged(int, int, @NonNull android.telephony.BarringInfo);
|
||||
method public void notifyCallForwardingChanged(int, boolean);
|
||||
method public void notifyCallQualityChanged(int, int, @NonNull android.telephony.CallQuality, int);
|
||||
method public void notifyCallStateChanged(int, int, int, @Nullable String);
|
||||
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void notifyCallStateChangedForAllSubscriptions(int, @Nullable String);
|
||||
method public void notifyCarrierNetworkChange(boolean);
|
||||
method public void notifyCellInfoChanged(int, @NonNull java.util.List<android.telephony.CellInfo>);
|
||||
method public void notifyCellLocation(int, @NonNull android.telephony.CellIdentity);
|
||||
method public void notifyDataActivationStateChanged(int, int, int);
|
||||
method public void notifyDataActivityChanged(int, int);
|
||||
method public void notifyDataConnectionForSubscriber(int, int, int, @Nullable android.telephony.PreciseDataConnectionState);
|
||||
method public void notifyDisconnectCause(int, int, int, int);
|
||||
method public void notifyEmergencyNumberList(int, int);
|
||||
method public void notifyImsDisconnectCause(int, @NonNull android.telephony.ims.ImsReasonInfo);
|
||||
method public void notifyMessageWaitingChanged(int, int, boolean);
|
||||
method public void notifyPhoneCapabilityChanged(@NonNull android.telephony.PhoneCapability);
|
||||
method public void notifyPreciseCallState(int, int, int, int, int);
|
||||
method public void notifyPreciseDataConnectionFailed(int, int, int, @Nullable String, int);
|
||||
method public void notifyRadioPowerStateChanged(int, int, int);
|
||||
method public void notifyRegistrationFailed(int, int, @NonNull android.telephony.CellIdentity, @NonNull String, int, int, int);
|
||||
method public void notifyServiceStateChanged(int, int, @NonNull android.telephony.ServiceState);
|
||||
method public void notifySignalStrengthChanged(int, int, @NonNull android.telephony.SignalStrength);
|
||||
method public void notifySrvccStateChanged(int, int);
|
||||
method public void notifyUserMobileDataStateChanged(int, int, boolean);
|
||||
method public void notifyVoiceActivationStateChanged(int, int, int);
|
||||
method public void removeOnOpportunisticSubscriptionsChangedListener(@NonNull android.telephony.SubscriptionManager.OnOpportunisticSubscriptionsChangedListener);
|
||||
method public void removeOnSubscriptionsChangedListener(@NonNull android.telephony.SubscriptionManager.OnSubscriptionsChangedListener);
|
||||
}
|
||||
|
||||
@@ -3327,6 +3327,39 @@ package android.telephony {
|
||||
field public static final int UNKNOWN_CARRIER_ID_LIST_VERSION = -1; // 0xffffffff
|
||||
}
|
||||
|
||||
public class TelephonyRegistryManager {
|
||||
method public void addOnOpportunisticSubscriptionsChangedListener(@NonNull android.telephony.SubscriptionManager.OnOpportunisticSubscriptionsChangedListener, @NonNull java.util.concurrent.Executor);
|
||||
method public void addOnSubscriptionsChangedListener(@NonNull android.telephony.SubscriptionManager.OnSubscriptionsChangedListener, @NonNull java.util.concurrent.Executor);
|
||||
method public void notifyActiveDataSubIdChanged(int);
|
||||
method public void notifyBarringInfoChanged(int, int, @NonNull android.telephony.BarringInfo);
|
||||
method public void notifyCallForwardingChanged(int, boolean);
|
||||
method public void notifyCallQualityChanged(int, int, @NonNull android.telephony.CallQuality, int);
|
||||
method public void notifyCallStateChanged(int, int, int, @Nullable String);
|
||||
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void notifyCallStateChangedForAllSubscriptions(int, @Nullable String);
|
||||
method public void notifyCarrierNetworkChange(boolean);
|
||||
method public void notifyCellInfoChanged(int, @NonNull java.util.List<android.telephony.CellInfo>);
|
||||
method public void notifyCellLocation(int, @NonNull android.telephony.CellIdentity);
|
||||
method public void notifyDataActivationStateChanged(int, int, int);
|
||||
method public void notifyDataActivityChanged(int, int);
|
||||
method public void notifyDataConnectionForSubscriber(int, int, int, @Nullable android.telephony.PreciseDataConnectionState);
|
||||
method public void notifyDisconnectCause(int, int, int, int);
|
||||
method public void notifyEmergencyNumberList(int, int);
|
||||
method public void notifyImsDisconnectCause(int, @NonNull android.telephony.ims.ImsReasonInfo);
|
||||
method public void notifyMessageWaitingChanged(int, int, boolean);
|
||||
method public void notifyPhoneCapabilityChanged(@NonNull android.telephony.PhoneCapability);
|
||||
method public void notifyPreciseCallState(int, int, int, int, int);
|
||||
method public void notifyPreciseDataConnectionFailed(int, int, int, @Nullable String, int);
|
||||
method public void notifyRadioPowerStateChanged(int, int, int);
|
||||
method public void notifyRegistrationFailed(int, int, @NonNull android.telephony.CellIdentity, @NonNull String, int, int, int);
|
||||
method public void notifyServiceStateChanged(int, int, @NonNull android.telephony.ServiceState);
|
||||
method public void notifySignalStrengthChanged(int, int, @NonNull android.telephony.SignalStrength);
|
||||
method public void notifySrvccStateChanged(int, int);
|
||||
method public void notifyUserMobileDataStateChanged(int, int, boolean);
|
||||
method public void notifyVoiceActivationStateChanged(int, int, int);
|
||||
method public void removeOnOpportunisticSubscriptionsChangedListener(@NonNull android.telephony.SubscriptionManager.OnOpportunisticSubscriptionsChangedListener);
|
||||
method public void removeOnSubscriptionsChangedListener(@NonNull android.telephony.SubscriptionManager.OnSubscriptionsChangedListener);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
package android.telephony.emergency {
|
||||
|
||||
@@ -28,8 +28,10 @@ import android.telephony.Annotation.ApnType;
|
||||
import android.telephony.Annotation.CallState;
|
||||
import android.telephony.Annotation.DataActivityType;
|
||||
import android.telephony.Annotation.DataFailureCause;
|
||||
import android.telephony.Annotation.DisconnectCauses;
|
||||
import android.telephony.Annotation.NetworkType;
|
||||
import android.telephony.Annotation.PreciseCallStates;
|
||||
import android.telephony.Annotation.PreciseDisconnectCauses;
|
||||
import android.telephony.Annotation.RadioPowerState;
|
||||
import android.telephony.Annotation.SimActivationState;
|
||||
import android.telephony.Annotation.SrvccState;
|
||||
@@ -56,6 +58,7 @@ import java.util.concurrent.Executor;
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
public class TelephonyRegistryManager {
|
||||
|
||||
private static final String TAG = "TelephonyRegistryManager";
|
||||
@@ -225,11 +228,9 @@ public class TelephonyRegistryManager {
|
||||
* invalid.
|
||||
* @param state latest call state. e.g, offhook, ringing
|
||||
* @param incomingNumber incoming phone number.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyCallStateChanged(int subId, int slotIndex, @CallState int state,
|
||||
String incomingNumber) {
|
||||
@Nullable String incomingNumber) {
|
||||
try {
|
||||
sRegistry.notifyCallState(slotIndex, subId, state, incomingNumber);
|
||||
} catch (RemoteException ex) {
|
||||
@@ -263,10 +264,8 @@ public class TelephonyRegistryManager {
|
||||
* @param slotIndex for which the service state changed. Can be derived from subId except
|
||||
* subId is invalid.
|
||||
* @param state service state e.g, in service, out of service or roaming status.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyServiceStateChanged(int subId, int slotIndex, ServiceState state) {
|
||||
public void notifyServiceStateChanged(int subId, int slotIndex, @NonNull ServiceState state) {
|
||||
try {
|
||||
sRegistry.notifyServiceStateForPhoneId(slotIndex, subId, state);
|
||||
} catch (RemoteException ex) {
|
||||
@@ -281,11 +280,9 @@ public class TelephonyRegistryManager {
|
||||
* @param slotIndex for which the signalstrength changed. Can be derived from subId except when
|
||||
* subId is invalid.
|
||||
* @param signalStrength e.g, signalstrength level {@see SignalStrength#getLevel()}
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifySignalStrengthChanged(int subId, int slotIndex,
|
||||
SignalStrength signalStrength) {
|
||||
@NonNull SignalStrength signalStrength) {
|
||||
try {
|
||||
sRegistry.notifySignalStrengthForPhoneId(slotIndex, subId, signalStrength);
|
||||
} catch (RemoteException ex) {
|
||||
@@ -302,8 +299,6 @@ public class TelephonyRegistryManager {
|
||||
* except when subId is invalid.
|
||||
* @param msgWaitingInd {@code true} indicates there is message-waiting indicator, {@code false}
|
||||
* otherwise.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyMessageWaitingChanged(int subId, int slotIndex, boolean msgWaitingInd) {
|
||||
try {
|
||||
@@ -319,8 +314,6 @@ public class TelephonyRegistryManager {
|
||||
* @param subId for which call forwarding status changed.
|
||||
* @param callForwardInd {@code true} indicates there is call forwarding, {@code false}
|
||||
* otherwise.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyCallForwardingChanged(int subId, boolean callForwardInd) {
|
||||
try {
|
||||
@@ -336,8 +329,6 @@ public class TelephonyRegistryManager {
|
||||
* @param subId for which data activity state changed.
|
||||
* @param dataActivityType indicates the latest data activity type e.g, {@link
|
||||
* TelephonyManager#DATA_ACTIVITY_IN}
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyDataActivityChanged(int subId, @DataActivityType int dataActivityType) {
|
||||
try {
|
||||
@@ -358,10 +349,9 @@ public class TelephonyRegistryManager {
|
||||
*
|
||||
* @see android.telephony.PreciseDataConnection
|
||||
* @see TelephonyManager#DATA_DISCONNECTED
|
||||
* @hide
|
||||
*/
|
||||
public void notifyDataConnectionForSubscriber(int slotIndex, int subId,
|
||||
@ApnType int apnType, PreciseDataConnectionState preciseState) {
|
||||
@ApnType int apnType, @Nullable PreciseDataConnectionState preciseState) {
|
||||
try {
|
||||
sRegistry.notifyDataConnectionForSubscriber(
|
||||
slotIndex, subId, apnType, preciseState);
|
||||
@@ -378,10 +368,8 @@ public class TelephonyRegistryManager {
|
||||
* subId is invalid.
|
||||
* @param callQuality Information about call quality e.g, call quality level
|
||||
* @param networkType associated with this data connection. e.g, LTE
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyCallQualityChanged(int subId, int slotIndex, CallQuality callQuality,
|
||||
public void notifyCallQualityChanged(int subId, int slotIndex, @NonNull CallQuality callQuality,
|
||||
@NetworkType int networkType) {
|
||||
try {
|
||||
sRegistry.notifyCallQualityChanged(callQuality, slotIndex, subId, networkType);
|
||||
@@ -396,8 +384,6 @@ public class TelephonyRegistryManager {
|
||||
* @param subId for which emergency number list changed.
|
||||
* @param slotIndex for which emergency number list changed. Can be derived from subId except
|
||||
* when subId is invalid.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyEmergencyNumberList(int subId, int slotIndex) {
|
||||
try {
|
||||
@@ -414,8 +400,6 @@ public class TelephonyRegistryManager {
|
||||
* @param slotIndex for which radio power state changed. Can be derived from subId except when
|
||||
* subId is invalid.
|
||||
* @param radioPowerState the current modem radio state.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyRadioPowerStateChanged(int subId, int slotIndex,
|
||||
@RadioPowerState int radioPowerState) {
|
||||
@@ -430,10 +414,8 @@ public class TelephonyRegistryManager {
|
||||
* Notify {@link PhoneCapability} changed.
|
||||
*
|
||||
* @param phoneCapability the capability of the modem group.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyPhoneCapabilityChanged(PhoneCapability phoneCapability) {
|
||||
public void notifyPhoneCapabilityChanged(@NonNull PhoneCapability phoneCapability) {
|
||||
try {
|
||||
sRegistry.notifyPhoneCapabilityChanged(phoneCapability);
|
||||
} catch (RemoteException ex) {
|
||||
@@ -462,8 +444,6 @@ public class TelephonyRegistryManager {
|
||||
* @param slotIndex for which data activation state changed. Can be derived from subId except
|
||||
* when subId is invalid.
|
||||
* @param activationState sim activation state e.g, activated.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyDataActivationStateChanged(int subId, int slotIndex,
|
||||
@SimActivationState int activationState) {
|
||||
@@ -483,8 +463,6 @@ public class TelephonyRegistryManager {
|
||||
* @param slotIndex for which voice activation state changed. Can be derived from subId except
|
||||
* subId is invalid.
|
||||
* @param activationState sim activation state e.g, activated.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyVoiceActivationStateChanged(int subId, int slotIndex,
|
||||
@SimActivationState int activationState) {
|
||||
@@ -504,8 +482,6 @@ public class TelephonyRegistryManager {
|
||||
* @param slotIndex for which mobile data state has changed. Can be derived from subId except
|
||||
* when subId is invalid.
|
||||
* @param state {@code true} indicates mobile data is enabled/on. {@code false} otherwise.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyUserMobileDataStateChanged(int slotIndex, int subId, boolean state) {
|
||||
try {
|
||||
@@ -515,32 +491,13 @@ public class TelephonyRegistryManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: this is marked as deprecated, can we move this one safely?
|
||||
*
|
||||
* @param subId
|
||||
* @param slotIndex
|
||||
* @param rawData
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyOemHookRawEventForSubscriber(int subId, int slotIndex, byte[] rawData) {
|
||||
try {
|
||||
sRegistry.notifyOemHookRawEventForSubscriber(slotIndex, subId, rawData);
|
||||
} catch (RemoteException ex) {
|
||||
// system process is dead
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify IMS call disconnect causes which contains {@link android.telephony.ims.ImsReasonInfo}.
|
||||
*
|
||||
* @param subId for which ims call disconnect.
|
||||
* @param imsReasonInfo the reason for ims call disconnect.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyImsDisconnectCause(int subId, ImsReasonInfo imsReasonInfo) {
|
||||
public void notifyImsDisconnectCause(int subId, @NonNull ImsReasonInfo imsReasonInfo) {
|
||||
try {
|
||||
sRegistry.notifyImsDisconnectCause(subId, imsReasonInfo);
|
||||
} catch (RemoteException ex) {
|
||||
@@ -557,11 +514,9 @@ public class TelephonyRegistryManager {
|
||||
* @param apnType the apn type bitmask, defined with {@code ApnSetting#TYPE_*} flags.
|
||||
* @param apn the APN {@link ApnSetting#getApnName()} of this data connection.
|
||||
* @param failCause data fail cause.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyPreciseDataConnectionFailed(int subId, int slotIndex, @ApnType int apnType,
|
||||
String apn, @DataFailureCause int failCause) {
|
||||
@Nullable String apn, @DataFailureCause int failCause) {
|
||||
try {
|
||||
sRegistry.notifyPreciseDataConnectionFailed(slotIndex, subId, apnType, apn, failCause);
|
||||
} catch (RemoteException ex) {
|
||||
@@ -575,8 +530,6 @@ public class TelephonyRegistryManager {
|
||||
*
|
||||
* @param subId for which srvcc state changed.
|
||||
* @param state srvcc state
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifySrvccStateChanged(int subId, @SrvccState int state) {
|
||||
try {
|
||||
@@ -596,8 +549,6 @@ public class TelephonyRegistryManager {
|
||||
* @param ringCallPreciseState ringCall state.
|
||||
* @param foregroundCallPreciseState foreground call state.
|
||||
* @param backgroundCallPreciseState background call state.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyPreciseCallState(int subId, int slotIndex,
|
||||
@PreciseCallStates int ringCallPreciseState,
|
||||
@@ -621,10 +572,9 @@ public class TelephonyRegistryManager {
|
||||
* @param cause {@link DisconnectCause} for the disconnected call.
|
||||
* @param preciseCause {@link android.telephony.PreciseDisconnectCause} for the disconnected
|
||||
* call.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyDisconnectCause(int slotIndex, int subId, int cause, int preciseCause) {
|
||||
public void notifyDisconnectCause(int slotIndex, int subId, @DisconnectCauses int cause,
|
||||
@PreciseDisconnectCauses int preciseCause) {
|
||||
try {
|
||||
sRegistry.notifyDisconnectCause(slotIndex, subId, cause, preciseCause);
|
||||
} catch (RemoteException ex) {
|
||||
@@ -637,10 +587,8 @@ public class TelephonyRegistryManager {
|
||||
*
|
||||
* <p>To be compatible with {@link TelephonyRegistry}, use {@link CellIdentity} which is
|
||||
* parcelable, and convert to CellLocation in client code.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyCellLocation(int subId, CellIdentity cellLocation) {
|
||||
public void notifyCellLocation(int subId, @NonNull CellIdentity cellLocation) {
|
||||
try {
|
||||
sRegistry.notifyCellLocationForSubscriber(subId, cellLocation);
|
||||
} catch (RemoteException ex) {
|
||||
@@ -654,10 +602,8 @@ public class TelephonyRegistryManager {
|
||||
*
|
||||
* @param subId for which cellinfo changed.
|
||||
* @param cellInfo A list of cellInfo associated with the given subscription.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void notifyCellInfoChanged(int subId, List<CellInfo> cellInfo) {
|
||||
public void notifyCellInfoChanged(int subId, @NonNull List<CellInfo> cellInfo) {
|
||||
try {
|
||||
sRegistry.notifyCellInfoForSubscriber(subId, cellInfo);
|
||||
} catch (RemoteException ex) {
|
||||
@@ -666,8 +612,8 @@ public class TelephonyRegistryManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param activeDataSubId
|
||||
* @hide
|
||||
* Notify that the active data subscription ID has changed.
|
||||
* @param activeDataSubId The new subscription ID for active data
|
||||
*/
|
||||
public void notifyActiveDataSubIdChanged(int activeDataSubId) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user