Skip to content

Commit 6bb0132

Browse files
djMesiasGodFox
authored andcommitted
QuickSettings: Allow custom off-status strings for translates
- GPS - Torch - Wi-Fi AP PatchSet 4: Removed all translations. Change-Id: Ibc7fa50c8b1ee87170bd4b58866e45c63655a192
1 parent 8f34a8c commit 6bb0132

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

packages/SystemUI/res/values/strings.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@
527527
<string name="powerwidget_screen_timeout_toast">Screen timeout set to: %1$d %2$s</string>
528528

529529
<string name="quick_settings_gps">GPS</string>
530+
<string name="quick_settings_gps_off">GPS off</string>
530531
<string name="quick_settings_screen_sleep">Go to sleep</string>
531532
<string name="quick_settings_ringer_on">Sound on</string>
532533
<string name="quick_settings_ringer_off">Sound off</string>
@@ -540,12 +541,15 @@
540541
<string name="quick_settings_report_bug">Report bug</string>
541542
<string name="quick_settings_sync">Sync</string>
542543
<string name="quick_settings_torch">Torch</string>
544+
<string name="quick_settings_torch_off">Torch off</string>
543545
<string name="quick_settings_nfc">NFC</string>
544546
<string name="quick_settings_screen_timeout">Timeout</string>
545547
<string name="quick_settings_screen_timeout_summary">%1$d %2$s</string>
546548
<string name="quick_settings_usb_tether_off_label">Disconnected</string>
547-
<string name="quick_settings_usb_tether_connected_label">Tethering Off</string>
549+
<string name="quick_settings_usb_tether_connected_label">Tethering off</string>
548550
<string name="quick_settings_usb_tether_on_label">Tethering</string>
551+
<string name="quick_settings_wifiap">Wi-Fi AP</string>
552+
<string name="quick_settings_wifiap_off">Wi-Fi AP off</string>
549553

550554
<!-- Text to display next to the minimal graphical battery meter. [CHAR LIMIT=3] -->
551555
<string name="status_bar_settings_battery_meter_min_format" translatable="false">

packages/SystemUI/src/com/android/systemui/quicksettings/GPSTile.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ public void onLocationGpsStateChanged(boolean inUse, String description) {
9191
}
9292

9393
private void setGenericLabel() {
94-
// Show OFF next to the GPS label when in OFF state, ON/IN USE is indicated by the color
95-
String label = mContext.getString(R.string.quick_settings_gps);
96-
mLabel = (enabled ? label : label + " " + mContext.getString(R.string.quick_settings_label_disabled));
94+
mLabel = (enabled ? mContext.getString(R.string.quick_settings_gps) : mContext.getString(R.string.quick_settings_gps_off));
9795
}
9896
}

packages/SystemUI/src/com/android/systemui/quicksettings/TorchTile.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,13 @@ public boolean onLongClick(View v) {
4646
private void updateTileState() {
4747
boolean enabled = Settings.System.getInt(mContext.getContentResolver(),
4848
Settings.System.TORCH_STATE, 0) == 1;
49-
String label = mContext.getString(R.string.quick_settings_torch);
5049

51-
// Show OFF next to the label when in OFF state, ON/IN USE is indicated by the color
5250
if(enabled) {
5351
mDrawable = R.drawable.ic_qs_torch_on;
54-
mLabel = label;
52+
mLabel = mContext.getString(R.string.quick_settings_torch);
5553
} else {
5654
mDrawable = R.drawable.ic_qs_torch_off;
57-
mLabel = label + " " + mContext.getString(R.string.quick_settings_label_disabled);
55+
mLabel = mContext.getString(R.string.quick_settings_torch_off);
5856
}
5957
}
6058

packages/SystemUI/src/com/android/systemui/quicksettings/WifiAPTile.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ private void updateTileState() {
6464
switch (state) {
6565
case WifiManager.WIFI_AP_STATE_ENABLING:
6666
case WifiManager.WIFI_AP_STATE_ENABLED:
67-
mLabel = mContext.getString(R.string.quick_settings_label_enabled);
67+
mLabel = mContext.getString(R.string.quick_settings_wifiap);
6868
mDrawable = R.drawable.ic_qs_wifi_ap_on;
6969
break;
7070
case WifiManager.WIFI_AP_STATE_DISABLING:
7171
case WifiManager.WIFI_AP_STATE_DISABLED:
7272
default:
7373
mDrawable = R.drawable.ic_qs_wifi_ap_off;
74-
mLabel = mContext.getString(R.string.quick_settings_label_disabled);
74+
mLabel = mContext.getString(R.string.quick_settings_wifiap_off);
7575
break;
7676
}
7777
}

0 commit comments

Comments
 (0)