Skip to content
Snippets Groups Projects
Commit 2d2adc3c authored by sangyun's avatar sangyun Committed by Sangyun Yun
Browse files

Updated the description to use the TelephonyCallback API.

Updated the description to use the TelephonyCallback API
instead of deprecated the PhoneStateListener.
The PhoneStateListeners have been deprecated in API31,
but the description still guides the use of it. So have
updated the description to use the TelephonyCallback API
instead.

Bug: 315801330
Test: build
Change-Id: I2c4df36a7be79b88c906b326489e00205ec92d67
parent 11568751
No related branches found
No related tags found
No related merge requests found
......@@ -289,7 +289,7 @@ public class TelephonyManager {
@SystemApi
public static final int RADIO_POWER_REASON_NEARBY_DEVICE = 3;
 
/** The otaspMode passed to PhoneStateListener#onOtaspChanged */
/** The otaspMode passed to SercvieState changes */
/** @hide */
static public final int OTASP_UNINITIALIZED = 0;
/** @hide */
......@@ -995,9 +995,9 @@ public class TelephonyManager {
"android.intent.action.CALL_DISCONNECT_CAUSE";
 
/**
* The lookup key used with the {@link #ACTION_PRECISE_CALL_STATE_CHANGED} broadcast and
* {@link PhoneStateListener#onPreciseCallStateChanged(PreciseCallState)} for an integer
* containing the disconnect cause.
* The lookup key used with the {@link #ACTION_PRECISE_CALL_STATE_CHANGED} broadcast and {@link
* TelephonyCallback.PreciseCallStateListener#onPreciseCallStateChanged(PreciseCallState)} for
* an integer containing the disconnect cause.
*
* @see DisconnectCause
*
......@@ -1012,9 +1012,9 @@ public class TelephonyManager {
public static final String EXTRA_DISCONNECT_CAUSE = "disconnect_cause";
 
/**
* The lookup key used with the {@link #ACTION_PRECISE_CALL_STATE_CHANGED} broadcast and
* {@link PhoneStateListener#onPreciseCallStateChanged(PreciseCallState)} for an integer
* containing the disconnect cause provided by the RIL.
* The lookup key used with the {@link #ACTION_PRECISE_CALL_STATE_CHANGED} broadcast and {@link
* TelephonyCallback.PreciseCallStateListener#onPreciseCallStateChanged(PreciseCallState)} for
* an integer containing the disconnect cause provided by the RIL.
*
* @see PreciseDisconnectCause
*
......@@ -6437,8 +6437,8 @@ public class TelephonyManager {
* This method considers not only calls in the Telephony stack, but also calls via other
* {@link android.telecom.ConnectionService} implementations.
* <p>
* Note: The call state returned via this method may differ from what is reported by
* {@link PhoneStateListener#onCallStateChanged(int, String)}, as that callback only considers
* Note: The call state returned via this method may differ from what is reported by {@link
* TelephonyCallback.CallStateListener#onCallStateChanged(int)}, as that callback only considers
* Telephony (mobile) calls.
* <p>
* Requires Permission:
......@@ -6996,7 +6996,7 @@ public class TelephonyManager {
*
* <p>Beginning with {@link android.os.Build.VERSION_CODES#Q Android Q},
* if this API results in a change of the cached CellInfo, that change will be reported via
* {@link android.telephony.PhoneStateListener#onCellInfoChanged onCellInfoChanged()}.
* {@link TelephonyCallback.CellInfoListener#onCellInfoChanged(List) onCellInfoChanged()}.
*
* <p>Apps targeting {@link android.os.Build.VERSION_CODES#Q Android Q} or higher will no
* longer trigger a refresh of the cached CellInfo by invoking this API. Instead, those apps
......@@ -7109,7 +7109,7 @@ public class TelephonyManager {
* camped/registered, serving, and neighboring cells.
*
* <p>Any available results from this request will be provided by calls to
* {@link android.telephony.PhoneStateListener#onCellInfoChanged onCellInfoChanged()}
* {@link TelephonyCallback.CellInfoListener#onCellInfoChanged(List) onCellInfoChanged()}
* for each active subscription.
*
* <p>This method returns valid data for devices with
......@@ -7172,7 +7172,7 @@ public class TelephonyManager {
* camped/registered, serving, and neighboring cells.
*
* <p>Any available results from this request will be provided by calls to
* {@link android.telephony.PhoneStateListener#onCellInfoChanged onCellInfoChanged()}
* {@link TelephonyCallback.CellInfoListener#onCellInfoChanged(List) onCellInfoChanged()}
* for each active subscription.
*
* <p>This method returns valid data for devices with
......@@ -7248,8 +7248,8 @@ public class TelephonyManager {
}
 
/**
* Sets the minimum time in milli-seconds between {@link PhoneStateListener#onCellInfoChanged
* PhoneStateListener.onCellInfoChanged} will be invoked.
* Sets the minimum time in milli-seconds between {@link
* TelephonyCallback.CellInfoListener#onCellInfoChanged(List)} will be invoked.
*<p>
* The default, 0, means invoke onCellInfoChanged when any of the reported
* information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
......@@ -11364,7 +11364,7 @@ public class TelephonyManager {
* Shut down all the live radios over all the slot indexes.
*
* <p>To know when the radio has completed powering off, use
* {@link PhoneStateListener#LISTEN_SERVICE_STATE LISTEN_SERVICE_STATE}.
* {@link TelephonyCallback.ServiceStateListener}.
*
* @throws UnsupportedOperationException If the device does not have
* {@link PackageManager#FEATURE_TELEPHONY_RADIO_ACCESS}.
......@@ -13058,8 +13058,9 @@ public class TelephonyManager {
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultSubscriptionId()}
*
* If you want continuous updates of service state info, register a {@link PhoneStateListener}
* via {@link #listen} with the {@link PhoneStateListener#LISTEN_SERVICE_STATE} event.
* If you want continuous updates of service state info, register a {@link TelephonyCallback}
* that implements {@link TelephonyCallback.ServiceStateListener} through {@link
* #registerTelephonyCallback}.
*
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges})
......@@ -13086,8 +13087,9 @@ public class TelephonyManager {
* <p>If this object has been created with {@link #createForSubscriptionId}, applies to the
* given subId. Otherwise, applies to {@link SubscriptionManager#getDefaultSubscriptionId()}
*
* If you want continuous updates of service state info, register a {@link PhoneStateListener}
* via {@link #listen} with the {@link PhoneStateListener#LISTEN_SERVICE_STATE} event.
* If you want continuous updates of service state info, register a {@link TelephonyCallback}
* that implements {@link TelephonyCallback.ServiceStateListener} through {@link
* #registerTelephonyCallback}.
*
* There's another way to renounce permissions with a custom context
* {@code AttributionSource.Builder#setRenouncedPermissions(Set<String>)} but only for system
......@@ -17892,9 +17894,9 @@ public class TelephonyManager {
* measurements breach the specified thresholds.
*
* To be notified, set the signal strength update request and then register
* {@link TelephonyManager#listen(PhoneStateListener, int)} with
* {@link PhoneStateListener#LISTEN_SIGNAL_STRENGTHS}. The notification will arrive through
* {@link PhoneStateListener#onSignalStrengthsChanged(SignalStrength)}.
* {@link TelephonyCallback} that implements {@link TelephonyCallback.SignalStrengthsListener}
* through {@link #registerTelephonyCallback}. The notification will arrive through
* {@link TelephonyCallback.SignalStrengthsListener#onSignalStrengthsChanged(SignalStrength)}.
*
* To stop receiving the notification over the specified thresholds, pass the same
* {@link SignalStrengthUpdateRequest} object to
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment