summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src
diff options
context:
space:
mode:
authorAdnan Begovic <adnan@cyngn.com>2016-03-08 14:36:57 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-03-09 04:49:13 -0800
commit39a09c54bebd7a7977c4686b5a972b5efc94e248 (patch)
tree6c21e6ef1b9009137d85ff5d99ec4aeccbe5bcd2 /packages/SystemUI/src
parent9957394df71db6f01802091858216582c58eab67 (diff)
downloadframeworks_base-39a09c54bebd7a7977c4686b5a972b5efc94e248.zip
frameworks_base-39a09c54bebd7a7977c4686b5a972b5efc94e248.tar.gz
frameworks_base-39a09c54bebd7a7977c4686b5a972b5efc94e248.tar.bz2
SystemUI: Improve string in data capable, not selected scenario.
If a user hotswaps out their SIMs on a multisim device, the default data sim can be in an "unset" state. Since this is a possible scenario, its better to show that no data sim is selected vs no sims being available. Change-Id: I1e077883472a5037f38f97e6d15afe504f787e6a TICKET: CYNGNOS-2211
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
index 5402582..038fa5e 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
@@ -147,7 +147,9 @@ public class CellularTile extends QSTile<QSTile.SignalState> {
state.label = cb.enabled
? removeTrailingPeriod(cb.enabledDesc)
- : r.getString(R.string.quick_settings_rssi_emergency_only);
+ : mDataController.isMobileDataSupported() ?
+ r.getString(R.string.data_sim_not_configured) :
+ r.getString(R.string.quick_settings_rssi_emergency_only);
final String signalContentDesc = cb.enabled && (cb.mobileSignalIconId > 0)
? cb.signalContentDescription
@@ -232,10 +234,14 @@ public class CellularTile extends QSTile<QSTile.SignalState> {
// Make sure signal gets cleared out when no sims.
mInfo.mobileSignalIconId = 0;
mInfo.dataTypeIconId = 0;
- // Show a No SIMs description to avoid emergency calls message.
+ // Show a No SIMs description if we're incapable of supporting mobile data
+ // to avoid showing an emergency mode description. If we're still capable of
+ // supporting mobile data, notify the user that the data sim is not configured
+ // only relevant in MSIM scenario: CYNGNOS-2211
mInfo.enabled = true;
- mInfo.enabledDesc = mContext.getString(
- R.string.keyguard_missing_sim_message_short);
+ mInfo.enabledDesc = mDataController.isMobileDataSupported() ?
+ mContext.getString(R.string.data_sim_not_configured)
+ : mContext.getString(R.string.keyguard_missing_sim_message_short);
mInfo.signalContentDescription = mInfo.enabledDesc;
}
refreshState(mInfo);