summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/res/res/values-mcc310-mnc030/config.xml (renamed from packages/SystemUI/res/values-mcc310-mnc030/config.xml)0
-rw-r--r--core/res/res/values-mcc310-mnc070/config.xml (renamed from packages/SystemUI/res/values-mcc310-mnc070/config.xml)0
-rw-r--r--core/res/res/values-mcc310-mnc170/config.xml (renamed from packages/SystemUI/res/values-mcc310-mnc170/config.xml)0
-rw-r--r--core/res/res/values-mcc310-mnc280/config.xml (renamed from packages/SystemUI/res/values-mcc310-mnc280/config.xml)0
-rw-r--r--core/res/res/values-mcc310-mnc380/config.xml (renamed from packages/SystemUI/res/values-mcc310-mnc380/config.xml)0
-rw-r--r--core/res/res/values-mcc310-mnc410/config.xml4
-rw-r--r--core/res/res/values-mcc310-mnc560/config.xml (renamed from packages/SystemUI/res/values-mcc310-mnc410/config.xml)0
-rw-r--r--core/res/res/values-mcc310-mnc950/config.xml (renamed from packages/SystemUI/res/values-mcc310-mnc560/config.xml)0
-rw-r--r--core/res/res/values-mcc311-mnc180/config.xml (renamed from packages/SystemUI/res/values-mcc310-mnc950/config.xml)0
-rwxr-xr-xcore/res/res/values-mcc311-mnc480/config.xml3
-rw-r--r--core/res/res/values/config.xml5
-rw-r--r--core/res/res/values/symbols.xml1
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/net/SignalStrengthUtil.java34
-rw-r--r--packages/SystemUI/res/values-mcc311-mnc180/config.xml26
-rw-r--r--packages/SystemUI/res/values-mcc311-mnc480/config.xml26
-rw-r--r--packages/SystemUI/res/values/config.xml4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java3
18 files changed, 52 insertions, 60 deletions
diff --git a/packages/SystemUI/res/values-mcc310-mnc030/config.xml b/core/res/res/values-mcc310-mnc030/config.xml
index 26b9192e0cc3..26b9192e0cc3 100644
--- a/packages/SystemUI/res/values-mcc310-mnc030/config.xml
+++ b/core/res/res/values-mcc310-mnc030/config.xml
diff --git a/packages/SystemUI/res/values-mcc310-mnc070/config.xml b/core/res/res/values-mcc310-mnc070/config.xml
index 26b9192e0cc3..26b9192e0cc3 100644
--- a/packages/SystemUI/res/values-mcc310-mnc070/config.xml
+++ b/core/res/res/values-mcc310-mnc070/config.xml
diff --git a/packages/SystemUI/res/values-mcc310-mnc170/config.xml b/core/res/res/values-mcc310-mnc170/config.xml
index 26b9192e0cc3..26b9192e0cc3 100644
--- a/packages/SystemUI/res/values-mcc310-mnc170/config.xml
+++ b/core/res/res/values-mcc310-mnc170/config.xml
diff --git a/packages/SystemUI/res/values-mcc310-mnc280/config.xml b/core/res/res/values-mcc310-mnc280/config.xml
index 26b9192e0cc3..26b9192e0cc3 100644
--- a/packages/SystemUI/res/values-mcc310-mnc280/config.xml
+++ b/core/res/res/values-mcc310-mnc280/config.xml
diff --git a/packages/SystemUI/res/values-mcc310-mnc380/config.xml b/core/res/res/values-mcc310-mnc380/config.xml
index 26b9192e0cc3..26b9192e0cc3 100644
--- a/packages/SystemUI/res/values-mcc310-mnc380/config.xml
+++ b/core/res/res/values-mcc310-mnc380/config.xml
diff --git a/core/res/res/values-mcc310-mnc410/config.xml b/core/res/res/values-mcc310-mnc410/config.xml
index 00ab7127c331..3fb3f0f7e9ff 100644
--- a/core/res/res/values-mcc310-mnc410/config.xml
+++ b/core/res/res/values-mcc310-mnc410/config.xml
@@ -48,4 +48,8 @@
<item>"#8"</item>
<item>"#9"</item>
</string-array>
+
+ <!-- Enable 5 bar signal strength icon -->
+ <bool name="config_inflateSignalStrength">true</bool>
+
</resources>
diff --git a/packages/SystemUI/res/values-mcc310-mnc410/config.xml b/core/res/res/values-mcc310-mnc560/config.xml
index 26b9192e0cc3..26b9192e0cc3 100644
--- a/packages/SystemUI/res/values-mcc310-mnc410/config.xml
+++ b/core/res/res/values-mcc310-mnc560/config.xml
diff --git a/packages/SystemUI/res/values-mcc310-mnc560/config.xml b/core/res/res/values-mcc310-mnc950/config.xml
index 26b9192e0cc3..26b9192e0cc3 100644
--- a/packages/SystemUI/res/values-mcc310-mnc560/config.xml
+++ b/core/res/res/values-mcc310-mnc950/config.xml
diff --git a/packages/SystemUI/res/values-mcc310-mnc950/config.xml b/core/res/res/values-mcc311-mnc180/config.xml
index 26b9192e0cc3..26b9192e0cc3 100644
--- a/packages/SystemUI/res/values-mcc310-mnc950/config.xml
+++ b/core/res/res/values-mcc311-mnc180/config.xml
diff --git a/core/res/res/values-mcc311-mnc480/config.xml b/core/res/res/values-mcc311-mnc480/config.xml
index db2f8d01f93a..336e30e45b00 100755
--- a/core/res/res/values-mcc311-mnc480/config.xml
+++ b/core/res/res/values-mcc311-mnc480/config.xml
@@ -40,4 +40,7 @@
<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 2de539721195..fb585693c8a5 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -4121,4 +4121,9 @@
even after user setup is complete. The defined component should be used for supervision purposes
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>
+
</resources>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 3a348f05de48..d3d0aa1185ef 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -3796,4 +3796,5 @@
<java-symbol type="style" name="Animation.DeviceDefault.Activity.Resolver" />
<java-symbol type="string" name="config_defaultSupervisionProfileOwnerComponent" />
+ <java-symbol type="bool" name="config_inflateSignalStrength" />
</resources>
diff --git a/packages/SettingsLib/src/com/android/settingslib/net/SignalStrengthUtil.java b/packages/SettingsLib/src/com/android/settingslib/net/SignalStrengthUtil.java
new file mode 100644
index 000000000000..246f2ceac87c
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/net/SignalStrengthUtil.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package com.android.settingslib.net;
+
+import android.content.Context;
+import android.telephony.SubscriptionManager;
+
+/**
+ * Utilities for dealing with signal strength.
+ */
+public class SignalStrengthUtil {
+ /**
+ * @return whether we should artificially inflate the signal strength and number of levels by 1
+ * 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);
+ }
+}
diff --git a/packages/SystemUI/res/values-mcc311-mnc180/config.xml b/packages/SystemUI/res/values-mcc311-mnc180/config.xml
deleted file mode 100644
index 26b9192e0cc3..000000000000
--- a/packages/SystemUI/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/packages/SystemUI/res/values-mcc311-mnc480/config.xml b/packages/SystemUI/res/values-mcc311-mnc480/config.xml
deleted file mode 100644
index 7dadae7f9107..000000000000
--- a/packages/SystemUI/res/values-mcc311-mnc480/config.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2017, 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/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index d774c551b547..2875a644cad3 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -417,10 +417,6 @@
it has been expanded to reveal its children. -->
<bool name="config_showGroupNotificationBgWhenExpanded">false</bool>
- <!-- Whether to artificially interpret all signal strengths as
- one bar higher than they actually are -->
- <bool name="config_inflateSignalStrength">false</bool>
-
<!-- Should we vibrate on an icon animation of the shelf. This should only be active if the
vibrator is capable of subtle vibrations -->
<bool name="config_vibrateOnIconAnimation">false</bool>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
index c08390fa53a2..2afe485eff8e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
@@ -38,6 +38,7 @@ import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.telephony.cdma.EriInfo;
import com.android.settingslib.Utils;
import com.android.settingslib.graph.SignalDrawable;
+import com.android.settingslib.net.SignalStrengthUtil;
import com.android.systemui.R;
import com.android.systemui.statusbar.policy.NetworkController.IconState;
import com.android.systemui.statusbar.policy.NetworkController.SignalCallback;
@@ -248,9 +249,8 @@ public class MobileSignalController extends SignalController<
}
private void updateInflateSignalStrength() {
- mInflateSignalStrengths = SubscriptionManager.getResourcesForSubId(mContext,
- mSubscriptionInfo.getSubscriptionId())
- .getBoolean(R.bool.config_inflateSignalStrength);
+ mInflateSignalStrengths = SignalStrengthUtil.shouldInflateSignalStrength(mContext,
+ mSubscriptionInfo.getSubscriptionId());
}
private int getNumLevels() {
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 b8a14efa4935..b2972fcd1286 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -1140,7 +1140,8 @@ 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(R.bool.config_inflateSignalStrength);
+ config.inflateSignalStrengths = res.getBoolean(
+ com.android.internal.R.bool.config_inflateSignalStrength);
CarrierConfigManager configMgr = (CarrierConfigManager)
context.getSystemService(Context.CARRIER_CONFIG_SERVICE);