summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorMarcos Marado <mmarado@cyngn.com>2016-06-08 19:41:09 +0100
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-06-09 11:44:37 -0700
commit6c769a702f40cd0e029196620a1838c9481d5dca (patch)
tree2f30dd6b04ac7d087e61ab8e265474de0866e468 /packages
parent03ea3114f6f2ace98a1b892343161cc9f4bd45bc (diff)
downloadframeworks_base-6c769a702f40cd0e029196620a1838c9481d5dca.zip
frameworks_base-6c769a702f40cd0e029196620a1838c9481d5dca.tar.gz
frameworks_base-6c769a702f40cd0e029196620a1838c9481d5dca.tar.bz2
keyguard: SIM Display Name is now a config
In devices with more than one SIM, keyguard visually distinguishes each SIM card by showing its color and its name. This patch introduces now a configuration item that lets you choose wether or not show the SIM display name on those cases. Issue: PAELLA-224 Change-Id: I8fb019d4fa534b2ca2f047083c27aa9cf8b7b39c
Diffstat (limited to 'packages')
-rw-r--r--packages/Keyguard/res/values/bools.xml1
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java8
2 files changed, 7 insertions, 2 deletions
diff --git a/packages/Keyguard/res/values/bools.xml b/packages/Keyguard/res/values/bools.xml
index 2b83787..791b758 100644
--- a/packages/Keyguard/res/values/bools.xml
+++ b/packages/Keyguard/res/values/bools.xml
@@ -17,4 +17,5 @@
<resources>
<bool name="kg_show_ime_at_screen_on">true</bool>
<bool name="kg_use_all_caps">true</bool>
+ <bool name="kg_sim_display_name">true</bool>
</resources>
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
index 8bd1f4f..0d74184 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
@@ -328,8 +328,12 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView {
msg = rez.getString(R.string.kg_sim_pin_instructions);
} else {
SubscriptionInfo info = monitor.getSubscriptionInfoForSubId(mSubId);
- CharSequence displayName = info != null ? info.getDisplayName() : ""; // don't crash
- msg = rez.getString(R.string.kg_sim_pin_instructions_multi, displayName);
+ if (rez.getBoolean(R.bool.kg_sim_display_name)) {
+ CharSequence displayName = info != null ? info.getDisplayName() : ""; // don't crash
+ msg = rez.getString(R.string.kg_sim_pin_instructions_multi, displayName);
+ } else {
+ msg = rez.getString(R.string.kg_sim_pin_instructions);
+ }
if (info != null) {
color = info.getIconTint();
}