summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunda Liu <junda@google.com>2014-11-12 01:14:00 +0000
committerandroid-build-merger <android-build-merger@google.com>2014-11-12 01:14:00 +0000
commit5716ebe50debab01ede01b2f99abde85a250c82c (patch)
tree4b98585dc687eb6e9a78c468f1737c32bbe493cb
parentcf9248cbf5461c8bf2fbae544c96bd0b5e7b5e02 (diff)
parent2eb5a5f727d4692b70b68cb4b1b7e31bf74f13a4 (diff)
downloadframeworks_base-5716ebe50debab01ede01b2f99abde85a250c82c.zip
frameworks_base-5716ebe50debab01ede01b2f99abde85a250c82c.tar.gz
frameworks_base-5716ebe50debab01ede01b2f99abde85a250c82c.tar.bz2
Merge "Add HIDE_CARRIER_NETWORK_SETTINGS global setting." into lmp-mr1-dev
automerge: 2eb5a5f * commit '2eb5a5f727d4692b70b68cb4b1b7e31bf74f13a4': Add HIDE_CARRIER_NETWORK_SETTINGS global setting.
-rw-r--r--core/java/android/provider/Settings.java8
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java3
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java69
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl18
4 files changed, 11 insertions, 87 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 88c3897..1f45f0a 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -6363,6 +6363,14 @@ public final class Settings {
"preferred_network_mode";
/**
+ * Setting to 1 will hide carrier network settings.
+ * Default is 0.
+ * @hide
+ */
+ public static final String HIDE_CARRIER_NETWORK_SETTINGS =
+ "hide_carrier_network_settings";
+
+ /**
* Name of an application package to be debugged.
*/
public static final String DEBUG_APP = "debug_app";
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index ddf24e8..1771eac 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -2614,6 +2614,9 @@ public class DatabaseHelper extends SQLiteOpenHelper {
// Set default cdma call auto retry
loadSetting(stmt, Settings.Global.CALL_AUTO_RETRY, 0);
+ // Set default simplified carrier network settings to 0
+ loadSetting(stmt, Settings.Global.HIDE_CARRIER_NETWORK_SETTINGS, 0);
+
// Set the preferred network mode to target desired value or Default
// value defined in RILConstants
int type;
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 0246a2d..b06d44c 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -3453,75 +3453,6 @@ public class TelephonyManager {
}
/**
- * Set whether Android should display a simplified Mobile Network Settings UI
- * for the current ICCID.
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
- *
- * @param enable true means enabling the simplified UI.
- * @hide
- */
- public void enableSimplifiedNetworkSettings(boolean enable) {
- enableSimplifiedNetworkSettingsForSubscriber(getDefaultSubscription(), enable);
- }
-
- /**
- * Set whether Android should display a simplified Mobile Network Settings UI
- * for the current ICCID.
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
- * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
- *
- * @param subId for which the simplified UI should be enabled or disabled.
- * @param enable true means enabling the simplified UI.
- * @hide
- */
- public void enableSimplifiedNetworkSettingsForSubscriber(int subId, boolean enable) {
- try {
- getITelephony().enableSimplifiedNetworkSettingsForSubscriber(subId, enable);
- } catch (RemoteException ex) {
- } catch (NullPointerException ex) {
- }
- }
-
- /**
- * Get whether a simplified Mobile Network Settings UI is enabled for the
- * current ICCID.
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
- *
- * @return true if the simplified UI is enabled.
- * @hide
- */
- public boolean getSimplifiedNetworkSettingsEnabled() {
- return getSimplifiedNetworkSettingsEnabledForSubscriber(getDefaultSubscription());
- }
-
- /**
- * Get whether a simplified Mobile Network Settings UI is enabled for the
- * current ICCID.
- * <p>
- * Requires Permission:
- * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
- *
- * @param subId for which the simplified UI should be enabled or disabled.
- * @return true if the simplified UI is enabled.
- * @hide
- */
- public boolean getSimplifiedNetworkSettingsEnabledForSubscriber(int subId) {
- try {
- return getITelephony().getSimplifiedNetworkSettingsEnabledForSubscriber(subId);
- } catch (RemoteException ex) {
- } catch (NullPointerException ex) {
- }
- return false;
- }
-
- /**
* Returns the result and response from RIL for oem request
*
* @param oemReq the data is sent to ril.
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 13f0e3f..c50261d 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -727,24 +727,6 @@ interface ITelephony {
List<String> getCarrierPackageNamesForIntent(in Intent intent);
/**
- * Set whether Android should display a simplified Mobile Network Settings UI
- * for the current ICCID.
- *
- * @param subId for which the simplified UI should be enabled or disabled.
- * @param enable true means enabling the simplified UI.
- */
- void enableSimplifiedNetworkSettingsForSubscriber(int subId, boolean enable);
-
- /**
- * Get whether a simplified Mobile Network Settings UI is enabled for the
- * current ICCID.
- *
- * @param subId for which the simplified UI should be enabled or disabled.
- * @return true if the simplified UI is enabled.
- */
- boolean getSimplifiedNetworkSettingsEnabledForSubscriber(int subId);
-
- /**
* Set the line 1 phone number string and its alphatag for the current ICCID
* for display purpose only, for example, displayed in Phone Status. It won't
* change the actual MSISDN/MDN. To unset alphatag or number, pass in a null