String and UI tweaks for "Mobile network".
String changes.
"Mobile Data" -> "Mobile data"
Remove "between" in "Data usage" subtext.
Always add back arrow in "Mobile network" header.
Bug: 64072976
Test: Manual
Change-Id: I3f3511e6156f926a017b9d49a9fcee043541757b
diff --git a/res/values/strings.xml b/res/values/strings.xml
index f4d16dd..87e0db5 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -488,7 +488,7 @@
<!-- Mobile network settings screen, data usage setting check box name -->
<string name="data_usage_title">Data usage</string>
<!-- Summary about how much data has been used in a date range [CHAR LIMIT=100] -->
- <string name="data_usage_template"><xliff:g name="amount" example="200 MB">%1$s</xliff:g> mobile data used between <xliff:g name="date_range" example="Jan 1 -- Feb 2">%2$s</xliff:g></string>
+ <string name="data_usage_template"><xliff:g name="amount" example="200 MB">%1$s</xliff:g> mobile data used <xliff:g name="date_range" example="Jan 1 -- Feb 2">%2$s</xliff:g></string>
<!-- Mobile network settings screen, Advanced button to show more items when clicked [CHAR LIMIT=50] -->
<string name="advanced_options_title">Advanced</string>
<!-- Mobile network settings screen, name of the option to manage carrier profiles on devices which support embedded carrier profiles -->
@@ -498,8 +498,8 @@
<!-- Mobile network settings screen, summary of the option to manage carrier profiles on devices which support embedded carrier profiles -->
<string name="carrier_settings_euicc_summary"><xliff:g id="carrier_name">%1$s</xliff:g> — <xliff:g id="phone_number">%2$s</xliff:g></string>
<!-- Mobile network settings screen, title of Mobile Data switch preference -->
- <string name="mobile_data_settings_title">Mobile Data</string>
- <!-- Mobile network settings screen, title of Mobile Data switch preference -->
+ <string name="mobile_data_settings_title">Mobile data</string>
+ <!-- Mobile network settings screen, title of Mobile data switch preference -->
<string name="mobile_data_settings_summary">Access data using mobile network</string>
<!-- Message to show when user trying to turn off mobile data, in single sim mode [CHAR LIMIT=100]-->
<string name="data_usage_disable_mobile">Turn off mobile data?</string>
diff --git a/src/com/android/phone/MobileNetworkSettings.java b/src/com/android/phone/MobileNetworkSettings.java
index 5b812fc..2405e4a 100644
--- a/src/com/android/phone/MobileNetworkSettings.java
+++ b/src/com/android/phone/MobileNetworkSettings.java
@@ -748,6 +748,12 @@
int phoneSubId, boolean hasActiveSubscriptions) {
Context context = activity.getApplicationContext();
+ ActionBar actionBar = activity.getActionBar();
+ if (actionBar != null) {
+ // android.R.id.home will be triggered in onOptionsItemSelected()
+ actionBar.setDisplayHomeAsUpEnabled(true);
+ }
+
prefSet.addPreference(mMobileDataPref);
prefSet.addPreference(mButtonDataRoam);
prefSet.addPreference(mDataUsagePref);
@@ -980,12 +986,6 @@
updateCallingCategory();
- ActionBar actionBar = activity.getActionBar();
- if (actionBar != null) {
- // android.R.id.home will be triggered in onOptionsItemSelected()
- actionBar.setDisplayHomeAsUpEnabled(true);
- }
-
// Enable link to CMAS app settings depending on the value in config.xml.
final boolean isCellBroadcastAppLinkEnabled = activity.getResources().getBoolean(
com.android.internal.R.bool.config_cellBroadcastAppLinks);