From 66972daf119b2a94de1be1e82e953fe9894d4fdd Mon Sep 17 00:00:00 2001 From: Meng Wang Date: Wed, 11 Dec 2019 17:59:22 -0800 Subject: Remove PhoneStateLister#onOtaspChanged and replace with Registrant in Phone, since the callback is only used inside telephony. Bug: 140908357 Test: make Change-Id: Ia86e9885f85d7f6b3698e96653add00e9b8670ed --- .../java/android/telephony/PhoneStateListener.java | 39 ---------------------- .../telephony/TelephonyRegistryManager.java | 16 --------- 2 files changed, 55 deletions(-) (limited to 'core/java/android') diff --git a/core/java/android/telephony/PhoneStateListener.java b/core/java/android/telephony/PhoneStateListener.java index 716a5225ea91..edab97ddba28 100644 --- a/core/java/android/telephony/PhoneStateListener.java +++ b/core/java/android/telephony/PhoneStateListener.java @@ -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 OTASP_UNKNOWN=1 - * means the value is currently unknown and the system should wait until - * OTASP_NEEDED=2 or OTASP_NOT_NEEDED=3 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) { PhoneStateListener psl = mPhoneStateListenerWeakRef.get(); if (psl == null) return; diff --git a/core/java/android/telephony/TelephonyRegistryManager.java b/core/java/android/telephony/TelephonyRegistryManager.java index f87a7c57fda4..a7f45a0bd49b 100644 --- a/core/java/android/telephony/TelephonyRegistryManager.java +++ b/core/java/android/telephony/TelephonyRegistryManager.java @@ -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. -- cgit v1.2.3