Remove PhoneStateLister#onOtaspChanged

and replace with Registrant in Phone, since the callback is only used
inside telephony.

Bug: 140908357
Test: make
Change-Id: Ia86e9885f85d7f6b3698e96653add00e9b8670ed
This commit is contained in:
Meng Wang
2019-12-11 17:59:22 -08:00
parent 46e185031a
commit 66972daf11
5 changed files with 0 additions and 95 deletions

View File

@@ -168,14 +168,6 @@ public class PhoneStateListener {
*/
public static final int LISTEN_SIGNAL_STRENGTHS = 0x00000100;
/**
* Listen for changes to OTASP mode.
*
* @see #onOtaspChanged
* @hide
*/
public static final int LISTEN_OTASP_CHANGED = 0x00000200;
/**
* Listen for changes to observed cell info.
*
@@ -624,29 +616,6 @@ public class PhoneStateListener {
// default implementation empty
}
/**
* The Over The Air Service Provisioning (OTASP) has changed on the registered subscription.
* Note, the registration subId comes from {@link TelephonyManager} object which registers
* PhoneStateListener by {@link TelephonyManager#listen(PhoneStateListener, int)}.
* If this TelephonyManager object was created with
* {@link TelephonyManager#createForSubscriptionId(int)}, then the callback applies to the
* subId. Otherwise, this callback applies to
* {@link SubscriptionManager#getDefaultSubscriptionId()}.
*
* Requires the READ_PHONE_STATE permission.
* @param otaspMode is integer <code>OTASP_UNKNOWN=1<code>
* means the value is currently unknown and the system should wait until
* <code>OTASP_NEEDED=2<code> or <code>OTASP_NOT_NEEDED=3<code> is received before
* making the decision to perform OTASP or not.
*
* @hide
*/
@UnsupportedAppUsage
public void onOtaspChanged(int otaspMode) {
// default implementation empty
}
/**
* Callback invoked when a observed cell info has changed or new cells have been added
* or removed on the registered subscription.
@@ -1065,14 +1034,6 @@ public class PhoneStateListener {
() -> mExecutor.execute(() -> psl.onSignalStrengthsChanged(signalStrength)));
}
public void onOtaspChanged(int otaspMode) {
PhoneStateListener psl = mPhoneStateListenerWeakRef.get();
if (psl == null) return;
Binder.withCleanCallingIdentity(
() -> mExecutor.execute(() -> psl.onOtaspChanged(otaspMode)));
}
public void onCellInfoChanged(List<CellInfo> cellInfo) {
PhoneStateListener psl = mPhoneStateListenerWeakRef.get();
if (psl == null) return;

View File

@@ -605,22 +605,6 @@ public class TelephonyRegistryManager {
}
}
/**
* Notify over the air sim provisioning(OTASP) mode changed on certain subscription.
*
* @param subId for which otasp mode changed.
* @param otaspMode latest mode for OTASP e.g, OTASP needed.
*
* @hide
*/
public void notifyOtaspChanged(int subId, int otaspMode) {
try {
sRegistry.notifyOtaspChanged(subId, otaspMode);
} catch (RemoteException ex) {
// system process is dead
}
}
/**
* Notify precise call state changed on certain subscription, including foreground, background
* and ringcall states.