OSDN Git Service

Add config to only allow auto select of networks
authorMattias Nilsson <mattias.nilsson@sony.com>
Mon, 11 Dec 2017 12:45:40 +0000 (13:45 +0100)
committerMattias Nilsson <mattias.nilsson@sony.com>
Thu, 27 Sep 2018 15:19:07 +0000 (15:19 +0000)
Make it possible for carriers to prevent users from
doing a manual search of networks when in the home network.
This affects Advanced Networks Settings when the user
is not roaming.

This is sometimes called "Permanent automatic mode".

Test: Add an entry in vendor.xml
Bug: 70499144
Change-Id: I9fe91a8510683e4bb3d51efb168c0d159dbb4591

telephony/java/android/telephony/CarrierConfigManager.java

index d8743bc..82808fc 100644 (file)
@@ -271,6 +271,14 @@ public class CarrierConfigManager {
             KEY_HIDE_CARRIER_NETWORK_SETTINGS_BOOL = "hide_carrier_network_settings_bool";
 
     /**
+     * Do only allow auto selection in Advanced Network Settings when in home network.
+     * Manual selection is allowed when in roaming network.
+     * @hide
+     */
+    public static final String
+            KEY_ONLY_AUTO_SELECT_IN_HOME_NETWORK_BOOL = "only_auto_select_in_home_network";
+
+    /**
      * Control whether users receive a simplified network settings UI and improved network
      * selection.
      */
@@ -2182,6 +2190,7 @@ public class CarrierConfigManager {
         sDefaults.putBoolean(KEY_ENABLE_DIALER_KEY_VIBRATION_BOOL, true);
         sDefaults.putBoolean(KEY_HAS_IN_CALL_NOISE_SUPPRESSION_BOOL, false);
         sDefaults.putBoolean(KEY_HIDE_CARRIER_NETWORK_SETTINGS_BOOL, false);
+        sDefaults.putBoolean(KEY_ONLY_AUTO_SELECT_IN_HOME_NETWORK_BOOL, false);
         sDefaults.putBoolean(KEY_SIMPLIFIED_NETWORK_SETTINGS_BOOL, false);
         sDefaults.putBoolean(KEY_HIDE_SIM_LOCK_SETTINGS_BOOL, false);