From 818822ad5d68ae083053f8430cfc48a6a99af182 Mon Sep 17 00:00:00 2001 From: Derek Tan Date: Wed, 25 May 2016 18:37:05 +0000 Subject: [PATCH] Per API review, revert the API renaming CL. Revert "Multi-SIM - Fixing inconsistent naming in CarrierConfigManager." This reverts commit 3bf26b56056ea8071e4092bf9a66171c96f43909. Bug: 28295813 Change-Id: I44e7925c86c68a79b8d962670baadea7a7227ca2 --- api/current.txt | 6 +-- api/system-current.txt | 6 +-- api/test-current.txt | 6 +-- .../telephony/CarrierConfigManager.java | 44 +------------------ 4 files changed, 8 insertions(+), 54 deletions(-) diff --git a/api/current.txt b/api/current.txt index bea0cf867006d..646c56e9a72de 100644 --- a/api/current.txt +++ b/api/current.txt @@ -36509,11 +36509,9 @@ package android.telecom { package android.telephony { public class CarrierConfigManager { - method public android.os.PersistableBundle getConfig(int); method public android.os.PersistableBundle getConfig(); - method public deprecated android.os.PersistableBundle getConfigForSubId(int); - method public void notifyConfigChanged(int); - method public deprecated void notifyConfigChangedForSubId(int); + method public android.os.PersistableBundle getConfigForSubId(int); + method public void notifyConfigChangedForSubId(int); field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED"; field public static final java.lang.String BOOL_ALLOW_EMERGENCY_VIDEO_CALLS = "bool_allow_emergency_video_calls"; field public static final java.lang.String BOOL_ALLOW_VIDEO_PAUSE = "bool_allow_video_pause"; diff --git a/api/system-current.txt b/api/system-current.txt index 150dec7f39e4f..52460bc8aaafa 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -39224,12 +39224,10 @@ package android.telecom { package android.telephony { public class CarrierConfigManager { - method public android.os.PersistableBundle getConfig(int); method public android.os.PersistableBundle getConfig(); - method public deprecated android.os.PersistableBundle getConfigForSubId(int); + method public android.os.PersistableBundle getConfigForSubId(int); method public static android.os.PersistableBundle getDefaultConfig(); - method public void notifyConfigChanged(int); - method public deprecated void notifyConfigChangedForSubId(int); + method public void notifyConfigChangedForSubId(int); method public void updateConfigForPhoneId(int, java.lang.String); field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED"; field public static final java.lang.String BOOL_ALLOW_EMERGENCY_VIDEO_CALLS = "bool_allow_emergency_video_calls"; diff --git a/api/test-current.txt b/api/test-current.txt index 38c17d2ddd1b0..6f40052a44a6c 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -36524,11 +36524,9 @@ package android.telecom { package android.telephony { public class CarrierConfigManager { - method public android.os.PersistableBundle getConfig(int); method public android.os.PersistableBundle getConfig(); - method public deprecated android.os.PersistableBundle getConfigForSubId(int); - method public void notifyConfigChanged(int); - method public deprecated void notifyConfigChangedForSubId(int); + method public android.os.PersistableBundle getConfigForSubId(int); + method public void notifyConfigChangedForSubId(int); field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED"; field public static final java.lang.String BOOL_ALLOW_EMERGENCY_VIDEO_CALLS = "bool_allow_emergency_video_calls"; field public static final java.lang.String BOOL_ALLOW_VIDEO_PAUSE = "bool_allow_video_pause"; diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 1278c07897f5c..3ad7d34f6ff1e 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -733,28 +733,9 @@ public class CarrierConfigManager { * @param subId the subscription ID, normally obtained from {@link SubscriptionManager}. * @return A {@link PersistableBundle} containing the config for the given subId, or default * values for an invalid subId. - * - * @deprecated use getConfig. */ @Nullable public PersistableBundle getConfigForSubId(int subId) { - return getConfig(subId); - } - - /** - * Gets the configuration values for a particular subscription, which is associated with a - * specific SIM card. If an invalid subId is used, the returned config will contain default - * values. - * - *

Requires Permission: - * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} - * - * @param subId the subscription ID, normally obtained from {@link SubscriptionManager}. - * @return A {@link PersistableBundle} containing the config for the given subId, or default - * values for an invalid subId. - */ - @Nullable - public PersistableBundle getConfig(int subId) { try { ICarrierConfigLoader loader = getICarrierConfigLoader(); if (loader == null) { @@ -776,11 +757,11 @@ public class CarrierConfigManager { *

Requires Permission: * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} * - * @return A {@link PersistableBundle} containing the config for the default subscription. + * @see #getConfigForSubId */ @Nullable public PersistableBundle getConfig() { - return getConfig(SubscriptionManager.getDefaultSubscriptionId()); + return getConfigForSubId(SubscriptionManager.getDefaultSubscriptionId()); } /** @@ -797,29 +778,8 @@ public class CarrierConfigManager { * {@link android.service.carrier.CarrierService#onLoadConfig} will be called from an * arbitrary thread. *

- * - * @deprecated use notifyConfigChanged. */ public void notifyConfigChangedForSubId(int subId) { - notifyConfigChanged(subId); - } - - /** - * Calling this method triggers telephony services to fetch the current carrier configuration. - *

- * Normally this does not need to be called because the platform reloads config on its own. - * This should be called by a carrier service app if it wants to update config at an arbitrary - * moment. - *

- *

Requires that the calling app has carrier privileges. - * @see #hasCarrierPrivileges - *

- * This method returns before the reload has completed, and - * {@link android.service.carrier.CarrierService#onLoadConfig} will be called from an - * arbitrary thread. - *

- */ - public void notifyConfigChanged(int subId) { try { ICarrierConfigLoader loader = getICarrierConfigLoader(); if (loader == null) {