diff options
| author | 2020-02-04 17:50:09 -0800 | |
|---|---|---|
| committer | 2020-02-04 17:50:09 -0800 | |
| commit | 4b779449d73a378ffcf9c3943826d6a848c090b1 (patch) | |
| tree | 0eb5a6684ee3858542702431ea6976ac33613f93 | |
| parent | 098584d234d6f2faa68f94ebc9f820c236bcfb4d (diff) | |
Remove hidden setRadioIndicationUpdateMode in TelephonyManager
We need to remove the previous hacky hidden API
setRadioIndicationUpdateMode and its implementation in Telephony.
This is an hidden API that affects power cost. We should remove it
to prevent potential users to use it unexpectedly (e.g. in reflection)
Test: Manual by making a call
Bug: 148544396
Change-Id: I0bce99b5363392bbaf9cf76dad8c1b47a138fd19
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 53 | ||||
| -rw-r--r-- | telephony/java/com/android/internal/telephony/ITelephony.aidl | 8 |
2 files changed, 0 insertions, 61 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 672352211089..e3d031dfa476 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -11290,14 +11290,6 @@ public class TelephonyManager { */ public static final int INDICATION_UPDATE_MODE_IGNORE_SCREEN_OFF = 2; - /** @hide */ - @IntDef(prefix = { "INDICATION_UPDATE_MODE_" }, value = { - INDICATION_UPDATE_MODE_NORMAL, - INDICATION_UPDATE_MODE_IGNORE_SCREEN_OFF - }) - @Retention(RetentionPolicy.SOURCE) - public @interface IndicationUpdateMode{} - /** * The indication for signal strength update. * @hide @@ -11328,51 +11320,6 @@ public class TelephonyManager { */ public static final int INDICATION_FILTER_PHYSICAL_CHANNEL_CONFIG = 0x10; - /** @hide */ - @IntDef(flag = true, prefix = { "INDICATION_FILTER_" }, value = { - INDICATION_FILTER_SIGNAL_STRENGTH, - INDICATION_FILTER_FULL_NETWORK_STATE, - INDICATION_FILTER_DATA_CALL_DORMANCY_CHANGED, - INDICATION_FILTER_LINK_CAPACITY_ESTIMATE, - INDICATION_FILTER_PHYSICAL_CHANNEL_CONFIG - }) - @Retention(RetentionPolicy.SOURCE) - public @interface IndicationFilters{} - - /** - * Sets radio indication update mode. This can be used to control the behavior of indication - * update from modem to Android frameworks. For example, by default several indication updates - * are turned off when screen is off, but in some special cases (e.g. carkit is connected but - * screen is off) we want to turn on those indications even when the screen is off. - * - * <p>Requires Permission: - * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} - * - * @param filters Indication filters. Should be a bitmask of INDICATION_FILTER_XXX. - * @see #INDICATION_FILTER_SIGNAL_STRENGTH - * @see #INDICATION_FILTER_FULL_NETWORK_STATE - * @see #INDICATION_FILTER_DATA_CALL_DORMANCY_CHANGED - * @param updateMode The voice activation state - * @see #INDICATION_UPDATE_MODE_NORMAL - * @see #INDICATION_UPDATE_MODE_IGNORE_SCREEN_OFF - * @hide - */ - @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) - public void setRadioIndicationUpdateMode(@IndicationFilters int filters, - @IndicationUpdateMode int updateMode) { - try { - ITelephony telephony = getITelephony(); - if (telephony != null) { - telephony.setRadioIndicationUpdateMode(getSubId(), filters, updateMode); - } - } catch (RemoteException ex) { - // This could happen if binder process crashes. - if (!isSystemProcess()) { - ex.rethrowAsRuntimeException(); - } - } - } - /** * A test API to override carrier information including mccmnc, imsi, iccid, gid1, gid2, * plmn and spn. This would be handy for, eg, forcing a particular carrier id, carrier's config diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index beb3c8cac41e..168c8b64c194 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -1827,14 +1827,6 @@ interface ITelephony { boolean switchSlots(in int[] physicalSlots); /** - * Sets radio indication update mode. This can be used to control the behavior of indication - * update from modem to Android frameworks. For example, by default several indication updates - * are turned off when screen is off, but in some special cases (e.g. carkit is connected but - * screen is off) we want to turn on those indications even when the screen is off. - */ - void setRadioIndicationUpdateMode(int subId, int filters, int mode); - - /** * Returns whether mobile data roaming is enabled on the subscription with id {@code subId}. * * @param subId the subscription id |