Loading core/java/android/telephony/TelephonyRegistryManager.java +16 −71 Original line number Diff line number Diff line Loading @@ -26,8 +26,10 @@ import android.os.ServiceManager; 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; Loading Loading @@ -229,11 +231,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) { Loading Loading @@ -266,10 +266,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) { Loading @@ -284,11 +282,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) { Loading @@ -305,8 +301,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 { Loading @@ -322,8 +316,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 { Loading @@ -339,8 +331,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 { Loading @@ -361,10 +351,9 @@ public class TelephonyRegistryManager { * * @see android.telephony.PreciseDataConnection * @see TelephonyManager#DATA_DISCONNECTED * @hide */ public void notifyDataConnectionForSubscriber(int slotIndex, int subId, String apnType, PreciseDataConnectionState preciseState) { String apnType, @Nullable PreciseDataConnectionState preciseState) { try { sRegistry.notifyDataConnectionForSubscriber( slotIndex, subId, apnType, preciseState); Loading @@ -381,10 +370,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); Loading @@ -399,8 +386,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 { Loading @@ -417,8 +402,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) { Loading @@ -433,10 +416,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) { Loading Loading @@ -465,8 +446,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) { Loading @@ -486,8 +465,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) { Loading @@ -507,8 +484,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 { Loading @@ -518,23 +493,6 @@ 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 display info changed. * Loading @@ -558,10 +516,8 @@ public class TelephonyRegistryManager { * * @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) { Loading @@ -578,11 +534,9 @@ public class TelephonyRegistryManager { * @param apnType the apnType, "ims" for IMS APN, "emergency" for EMERGENCY APN. * @param apn the APN {@link ApnSetting#getApnName()} of this data connection. * @param failCause data fail cause. * * @hide */ public void notifyPreciseDataConnectionFailed(int subId, int slotIndex, String apnType, String apn, @DataFailureCause int failCause) { @Nullable String apn, @DataFailureCause int failCause) { try { sRegistry.notifyPreciseDataConnectionFailed(slotIndex, subId, apnType, apn, failCause); } catch (RemoteException ex) { Loading @@ -596,8 +550,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 { Loading @@ -617,8 +569,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, Loading @@ -642,10 +592,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) { Loading @@ -658,10 +607,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) { Loading @@ -675,10 +622,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) { Loading @@ -687,8 +632,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 { Loading Loading
core/java/android/telephony/TelephonyRegistryManager.java +16 −71 Original line number Diff line number Diff line Loading @@ -26,8 +26,10 @@ import android.os.ServiceManager; 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; Loading Loading @@ -229,11 +231,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) { Loading Loading @@ -266,10 +266,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) { Loading @@ -284,11 +282,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) { Loading @@ -305,8 +301,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 { Loading @@ -322,8 +316,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 { Loading @@ -339,8 +331,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 { Loading @@ -361,10 +351,9 @@ public class TelephonyRegistryManager { * * @see android.telephony.PreciseDataConnection * @see TelephonyManager#DATA_DISCONNECTED * @hide */ public void notifyDataConnectionForSubscriber(int slotIndex, int subId, String apnType, PreciseDataConnectionState preciseState) { String apnType, @Nullable PreciseDataConnectionState preciseState) { try { sRegistry.notifyDataConnectionForSubscriber( slotIndex, subId, apnType, preciseState); Loading @@ -381,10 +370,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); Loading @@ -399,8 +386,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 { Loading @@ -417,8 +402,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) { Loading @@ -433,10 +416,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) { Loading Loading @@ -465,8 +446,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) { Loading @@ -486,8 +465,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) { Loading @@ -507,8 +484,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 { Loading @@ -518,23 +493,6 @@ 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 display info changed. * Loading @@ -558,10 +516,8 @@ public class TelephonyRegistryManager { * * @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) { Loading @@ -578,11 +534,9 @@ public class TelephonyRegistryManager { * @param apnType the apnType, "ims" for IMS APN, "emergency" for EMERGENCY APN. * @param apn the APN {@link ApnSetting#getApnName()} of this data connection. * @param failCause data fail cause. * * @hide */ public void notifyPreciseDataConnectionFailed(int subId, int slotIndex, String apnType, String apn, @DataFailureCause int failCause) { @Nullable String apn, @DataFailureCause int failCause) { try { sRegistry.notifyPreciseDataConnectionFailed(slotIndex, subId, apnType, apn, failCause); } catch (RemoteException ex) { Loading @@ -596,8 +550,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 { Loading @@ -617,8 +569,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, Loading @@ -642,10 +592,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) { Loading @@ -658,10 +607,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) { Loading @@ -675,10 +622,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) { Loading @@ -687,8 +632,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 { Loading