diff options
| -rw-r--r-- | core/res/res/values-mcc310-mnc030/config.xml | 26 | ||||
| -rw-r--r-- | core/res/res/values-mcc310-mnc070/config.xml | 26 | ||||
| -rw-r--r-- | core/res/res/values-mcc310-mnc170/config.xml | 26 | ||||
| -rw-r--r-- | core/res/res/values-mcc310-mnc280/config.xml | 26 | ||||
| -rw-r--r-- | core/res/res/values-mcc310-mnc380/config.xml | 26 | ||||
| -rw-r--r-- | core/res/res/values-mcc310-mnc410/config.xml | 4 | ||||
| -rw-r--r-- | core/res/res/values-mcc310-mnc560/config.xml | 26 | ||||
| -rw-r--r-- | core/res/res/values-mcc310-mnc950/config.xml | 26 | ||||
| -rw-r--r-- | core/res/res/values-mcc311-mnc180/config.xml | 26 | ||||
| -rwxr-xr-x | core/res/res/values-mcc311-mnc480/config.xml | 3 | ||||
| -rw-r--r-- | core/res/res/values/config.xml | 4 | ||||
| -rw-r--r-- | core/res/res/values/symbols.xml | 1 | ||||
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/net/SignalStrengthUtil.java | 13 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java | 3 | ||||
| -rwxr-xr-x | telephony/java/android/telephony/CarrierConfigManager.java | 10 |
15 files changed, 20 insertions, 226 deletions
diff --git a/core/res/res/values-mcc310-mnc030/config.xml b/core/res/res/values-mcc310-mnc030/config.xml deleted file mode 100644 index 26b9192e0cc3..000000000000 --- a/core/res/res/values-mcc310-mnc030/config.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** Copyright 2019, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<!-- These resources are around just to allow their values to be customized - for different hardware and product builds. --> -<resources> - <!-- Enable 5 bar signal strength icon --> - <bool name="config_inflateSignalStrength">true</bool> -</resources> - diff --git a/core/res/res/values-mcc310-mnc070/config.xml b/core/res/res/values-mcc310-mnc070/config.xml deleted file mode 100644 index 26b9192e0cc3..000000000000 --- a/core/res/res/values-mcc310-mnc070/config.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** Copyright 2019, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<!-- These resources are around just to allow their values to be customized - for different hardware and product builds. --> -<resources> - <!-- Enable 5 bar signal strength icon --> - <bool name="config_inflateSignalStrength">true</bool> -</resources> - diff --git a/core/res/res/values-mcc310-mnc170/config.xml b/core/res/res/values-mcc310-mnc170/config.xml deleted file mode 100644 index 26b9192e0cc3..000000000000 --- a/core/res/res/values-mcc310-mnc170/config.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** Copyright 2019, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<!-- These resources are around just to allow their values to be customized - for different hardware and product builds. --> -<resources> - <!-- Enable 5 bar signal strength icon --> - <bool name="config_inflateSignalStrength">true</bool> -</resources> - diff --git a/core/res/res/values-mcc310-mnc280/config.xml b/core/res/res/values-mcc310-mnc280/config.xml deleted file mode 100644 index 26b9192e0cc3..000000000000 --- a/core/res/res/values-mcc310-mnc280/config.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** Copyright 2019, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<!-- These resources are around just to allow their values to be customized - for different hardware and product builds. --> -<resources> - <!-- Enable 5 bar signal strength icon --> - <bool name="config_inflateSignalStrength">true</bool> -</resources> - diff --git a/core/res/res/values-mcc310-mnc380/config.xml b/core/res/res/values-mcc310-mnc380/config.xml deleted file mode 100644 index 26b9192e0cc3..000000000000 --- a/core/res/res/values-mcc310-mnc380/config.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** Copyright 2019, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<!-- These resources are around just to allow their values to be customized - for different hardware and product builds. --> -<resources> - <!-- Enable 5 bar signal strength icon --> - <bool name="config_inflateSignalStrength">true</bool> -</resources> - diff --git a/core/res/res/values-mcc310-mnc410/config.xml b/core/res/res/values-mcc310-mnc410/config.xml index 53e4193c7f38..d76b9be324a6 100644 --- a/core/res/res/values-mcc310-mnc410/config.xml +++ b/core/res/res/values-mcc310-mnc410/config.xml @@ -23,8 +23,4 @@ <!-- Configure mobile network MTU. Carrier specific value is set here. --> <integer name="config_mobile_mtu">1410</integer> - - <!-- Enable 5 bar signal strength icon --> - <bool name="config_inflateSignalStrength">true</bool> - </resources> diff --git a/core/res/res/values-mcc310-mnc560/config.xml b/core/res/res/values-mcc310-mnc560/config.xml deleted file mode 100644 index 26b9192e0cc3..000000000000 --- a/core/res/res/values-mcc310-mnc560/config.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** Copyright 2019, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<!-- These resources are around just to allow their values to be customized - for different hardware and product builds. --> -<resources> - <!-- Enable 5 bar signal strength icon --> - <bool name="config_inflateSignalStrength">true</bool> -</resources> - diff --git a/core/res/res/values-mcc310-mnc950/config.xml b/core/res/res/values-mcc310-mnc950/config.xml deleted file mode 100644 index 26b9192e0cc3..000000000000 --- a/core/res/res/values-mcc310-mnc950/config.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** Copyright 2019, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<!-- These resources are around just to allow their values to be customized - for different hardware and product builds. --> -<resources> - <!-- Enable 5 bar signal strength icon --> - <bool name="config_inflateSignalStrength">true</bool> -</resources> - diff --git a/core/res/res/values-mcc311-mnc180/config.xml b/core/res/res/values-mcc311-mnc180/config.xml deleted file mode 100644 index 26b9192e0cc3..000000000000 --- a/core/res/res/values-mcc311-mnc180/config.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** Copyright 2019, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<!-- These resources are around just to allow their values to be customized - for different hardware and product builds. --> -<resources> - <!-- Enable 5 bar signal strength icon --> - <bool name="config_inflateSignalStrength">true</bool> -</resources> - diff --git a/core/res/res/values-mcc311-mnc480/config.xml b/core/res/res/values-mcc311-mnc480/config.xml index 336e30e45b00..db2f8d01f93a 100755 --- a/core/res/res/values-mcc311-mnc480/config.xml +++ b/core/res/res/values-mcc311-mnc480/config.xml @@ -40,7 +40,4 @@ <bool name="config_use_sim_language_file">true</bool> - <!-- Enable 5 bar signal strength icon --> - <bool name="config_inflateSignalStrength">true</bool> - </resources> diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 6b5fbc1f0fee..2570ae520f4d 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -4218,10 +4218,6 @@ only. The component must be part of a system app. --> <string name="config_defaultSupervisionProfileOwnerComponent" translatable="false"></string> - <!-- Whether to artificially interpret all signal strengths as - one bar higher than they actually are --> - <bool name="config_inflateSignalStrength">false</bool> - <!-- Trigger a warning for notifications with RemoteView objects that are larger in bytes than this value (default 1MB)--> <integer name="config_notificationWarnRemoteViewSizeBytes">2000000</integer> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 34ea7a08394e..5951ef16c1c1 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -3826,7 +3826,6 @@ <java-symbol type="color" name="decor_view_status_guard_light" /> <java-symbol type="string" name="config_defaultSupervisionProfileOwnerComponent" /> - <java-symbol type="bool" name="config_inflateSignalStrength" /> <java-symbol type="drawable" name="android_logotype" /> <java-symbol type="layout" name="platlogo_layout" /> diff --git a/packages/SettingsLib/src/com/android/settingslib/net/SignalStrengthUtil.java b/packages/SettingsLib/src/com/android/settingslib/net/SignalStrengthUtil.java index 246f2ceac87c..e1174fa05ea5 100644 --- a/packages/SettingsLib/src/com/android/settingslib/net/SignalStrengthUtil.java +++ b/packages/SettingsLib/src/com/android/settingslib/net/SignalStrengthUtil.java @@ -17,7 +17,8 @@ package com.android.settingslib.net; import android.content.Context; -import android.telephony.SubscriptionManager; +import android.os.PersistableBundle; +import android.telephony.CarrierConfigManager; /** * Utilities for dealing with signal strength. @@ -28,7 +29,13 @@ public class SignalStrengthUtil { * bar for the subscription with the given id */ public static boolean shouldInflateSignalStrength(Context context, int subscriptionId) { - return SubscriptionManager.getResourcesForSubId(context, subscriptionId) - .getBoolean(com.android.internal.R.bool.config_inflateSignalStrength); + final CarrierConfigManager carrierConfigMgr = + context.getSystemService(CarrierConfigManager.class); + PersistableBundle bundle = null; + if (carrierConfigMgr != null) { + bundle = carrierConfigMgr.getConfigForSubId(subscriptionId); + } + return (bundle != null && bundle.getBoolean( + CarrierConfigManager.KEY_INFLATE_SIGNAL_STRENGTH_BOOL, false)); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java index 4ac3a9b6b40a..32c4aec39923 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java @@ -1191,7 +1191,6 @@ public class NetworkControllerImpl extends BroadcastReceiver boolean show4gForLte = false; boolean hideLtePlus = false; boolean hspaDataDistinguishable; - boolean inflateSignalStrengths = false; boolean alwaysShowDataRatIcon = false; static Config readConfig(Context context) { @@ -1203,8 +1202,6 @@ public class NetworkControllerImpl extends BroadcastReceiver res.getBoolean(com.android.internal.R.bool.config_alwaysUseCdmaRssi); config.hspaDataDistinguishable = res.getBoolean(R.bool.config_hspa_data_distinguishable); - config.inflateSignalStrengths = res.getBoolean( - com.android.internal.R.bool.config_inflateSignalStrength); CarrierConfigManager configMgr = (CarrierConfigManager) context.getSystemService(Context.CARRIER_CONFIG_SERVICE); diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 870b9a4dd667..56ac8fc2ca66 100755 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -1085,6 +1085,15 @@ public class CarrierConfigManager { "show_signal_strength_in_sim_status_bool"; /** + * Flag specifying if we should interpret all signal strength as one bar higher + * This is a replacement for the former resource config_inflateSignalStrength + * The default value is false. + * @hide + */ + public static final String KEY_INFLATE_SIGNAL_STRENGTH_BOOL = + "inflate_signal_strength_bool"; + + /** * Flag specifying whether an additional (client initiated) intent needs to be sent on System * update */ @@ -3989,6 +3998,7 @@ public class CarrierConfigManager { sDefaults.putStringArray(KEY_CARRIER_VVM_PACKAGE_NAME_STRING_ARRAY, null); sDefaults.putBoolean(KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL, false); sDefaults.putBoolean(KEY_SHOW_SIGNAL_STRENGTH_IN_SIM_STATUS_BOOL, true); + sDefaults.putBoolean(KEY_INFLATE_SIGNAL_STRENGTH_BOOL, false); sDefaults.putBoolean(KEY_CI_ACTION_ON_SYS_UPDATE_BOOL, false); sDefaults.putString(KEY_CI_ACTION_ON_SYS_UPDATE_INTENT_STRING, ""); sDefaults.putString(KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_STRING, ""); |