Merge "Sound settings screen and volumes dialog reconfiguration."
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 2b0902e..4b41c7c 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -55,7 +55,7 @@
<application android:label="@string/settings_label"
android:icon="@mipmap/ic_launcher_settings"
android:taskAffinity=""
- android:theme="@android:style/Theme.Holo.SolidActionBar"
+ android:theme="@android:style/Theme.Holo"
android:hardwareAccelerated="true">
<!-- Settings -->
diff --git a/res/layout/two_buttons_panel.xml b/res/layout/two_buttons_panel.xml
index 05ad35d..e90c4a0 100755
--- a/res/layout/two_buttons_panel.xml
+++ b/res/layout/two_buttons_panel.xml
@@ -30,8 +30,6 @@
<Button
android:id="@+id/left_button"
android:layout_width="150dip"
- android:paddingLeft="6dip"
- android:layout_gravity="left"
android:layout_weight="0.4"
android:layout_height="wrap_content"/>
<!-- Spacer -->
@@ -44,8 +42,6 @@
<Button
android:id="@+id/right_button"
android:layout_width="150dip"
- android:paddingRight="6dip"
- android:layout_gravity="right"
android:text="@string/cancel"
android:layout_weight="0.4"
android:layout_height="wrap_content"/>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index a750bd9..638f4c1 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1539,8 +1539,8 @@
<string name="automatic_brightness">Automatic brightness</string>
<!-- [CHAR LIMIT=30] Sound & display settings screen, setting option name to change font size -->
<string name="title_font_size">Font size</string>
- <!-- [CHAR LIMIT=30] Sound & display settings screen, setting option summary displaying the currently selected font size -->
- <string name="summary_font_size">Current font size: %1$s</string>
+ <!-- Sound & display settings screen, setting option summary displaying the currently selected font size -->
+ <string name="summary_font_size" translatable="false">%1$s</string>
<!-- [CHAR LIMIT=40] Sound & display settings screen, title of dialog for picking font size -->
<string name="dialog_title_font_size">Select font size</string>
@@ -1985,32 +1985,26 @@
<!-- Security & location settings screen, section header for settings relating to location -->
<string name="location_title">My Location</string>
- <!-- Security & location settings screen, setting check box label if the user wants to use wireless network-based positioning (cell ID, wifi, etc.) -->
- <string name="location_network_based">Use wireless networks</string>
- <!-- Security & location settings screen, setting summary when Use wireless networks check box is clear -->
- <string name="location_networks_disabled">See location in applications (such as Maps) using wireless networks</string>
- <!-- Security & location settings screen, setting summary when Use wireless networks check box is selected -->
- <string name="location_neighborhood_level">Location determined by Wi-Fi and/or mobile networks</string>
+ <!-- [CHAR LIMIT=30] Security & location settings screen, setting check box label for Google location service (cell ID, wifi, etc.) -->
+ <string name="location_network_based">Google location service</string>
+ <!-- [CHAR LIMIT=100] Security & location settings screen, setting summary for Google location service check box-->
+ <string name="location_neighborhood_level">Let apps use Wi-Fi and mobile networks to determine your approximate location</string>
<!-- Security & location settings screen, setting summary when Use wireless networks check box is selected, for wifi-only devices [CHAR LIMIT=100] -->
<string name="location_neighborhood_level_wifi">Location determined by Wi-Fi</string>
- <!-- Security & location settings screen, setting check box label if the GPS receiver should be enabled -->
- <string name="location_gps">Use GPS satellites</string>
- <!-- [CHAR LIMIT=100] Security & location settings screen, setting summary when Use GPS satellites check box is selected -->
- <string name="location_street_level">When locating, accurate to street level</string>
- <!-- Security & location settings screen, setting summary when Use GPS satellites check box is clear -->
- <string name="location_gps_disabled">Locate to street-level (requires more battery plus view of sky)</string>
+ <!-- [CHAR LIMIT=30] Security & location settings screen, setting check box label for GPS satellites -->
+ <string name="location_gps">GPS satellites</string>
+ <!-- [CHAR LIMIT=100] Security & location settings screen, setting check box summary for GPS satellites -->
+ <string name="location_street_level">Let apps use GPS to pinpoint your location</string>
<!-- Security & location settings screen, setting check box label if Assisted GPS should be enabled -->
<string name="assisted_gps">Use assisted GPS</string>
<!-- Security & location settings screen, setting summary when Assisted GPS check box is selected -->
<string name="assisted_gps_enabled">Use server to assist GPS (uncheck to reduce network usage)</string>
<!-- Security & location settings screen, setting summary when Assisted GPS check box is clear -->
<string name="assisted_gps_disabled">Use server to assist GPS (uncheck to improve GPS performance)</string>
- <!-- [CHAR_LIMIT=100] Security & location settings screen, setting check box label if the user wants to use their location for Google Search & other Google services -->
- <string name="use_location_title">Use location for Google Search</string>
- <!-- [CHAR_LIMIT=100] Security & location settings screen, setting summary when Use My Location for Google services is clear -->
- <string name="use_location_summary_disabled">Use location for Google Search and other Google services</string>
- <!-- [CHAR_LIMIT=100] Security & location settings screen, setting summary when Use My Location for Google services is checked -->
- <string name="use_location_summary_enabled">Location used to improve Google Search results and other Google services</string>
+ <!-- [CHAR_LIMIT=30] Security & location settings screen, setting check box label for Google search -->
+ <string name="use_location_title">Location & Google search</string>
+ <!-- [CHAR_LIMIT=100] Security & location settings screen, setting check box summary for Google search -->
+ <string name="use_location_summary">Let Google use your location to improve search results and other services</string>
<!-- About --> <skip />
<!-- Main settings screen, setting title for the user to go into the About phone screen -->
@@ -3371,6 +3365,12 @@
<!-- UI debug setting: limit number of running background processes [CHAR LIMIT=25] -->
<string name="app_process_limit_title">Background process limit</string>
+ <!-- UI debug setting: show all ANRs? [CHAR LIMIT=25] -->
+ <string name="show_all_anrs">Show all ANRs</string>
+ <!-- UI debug setting: show all ANRs summary [CHAR LIMIT=50] -->
+ <string name="show_all_anrs_summary">Show Application Not Responding dialog
+ for background apps</string>
+
<!-- Activity title for network data usage summary. [CHAR LIMIT=25] -->
<string name="data_usage_summary_title">Data usage</string>
<!-- Title for option to pick visible time range from a list available usage periods. [CHAR LIMIT=25] -->
diff --git a/res/xml/development_prefs.xml b/res/xml/development_prefs.xml
index a73e7d1..96f8c3e 100644
--- a/res/xml/development_prefs.xml
+++ b/res/xml/development_prefs.xml
@@ -93,6 +93,11 @@
android:entries="@array/app_process_limit_entries"
android:entryValues="@array/app_process_limit_values" />
+ <CheckBoxPreference
+ android:key="show_all_anrs"
+ android:title="@string/show_all_anrs"
+ android:summary="@string/show_all_anrs_summary"/>
+
</PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/location_settings.xml b/res/xml/location_settings.xml
index 94133d0..8d8757d 100644
--- a/res/xml/location_settings.xml
+++ b/res/xml/location_settings.xml
@@ -20,14 +20,12 @@
<CheckBoxPreference
android:key="location_network"
android:title="@string/location_network_based"
- android:summaryOn="@string/location_neighborhood_level"
- android:summaryOff="@string/location_networks_disabled"/>
+ android:summary="@string/location_neighborhood_level"/>
<CheckBoxPreference
android:key="location_gps"
android:title="@string/location_gps"
- android:summaryOn="@string/location_street_level"
- android:summaryOff="@string/location_gps_disabled"/>
+ android:summary="@string/location_street_level"/>
<!-- Disabled to avoid confusion on devices with no AGPS
For Google experience devices we want AGPS on by default (if supported) so we don't really need this.
diff --git a/src/com/android/settings/ActivityPicker.java b/src/com/android/settings/ActivityPicker.java
index d984adb..ac79cea 100644
--- a/src/com/android/settings/ActivityPicker.java
+++ b/src/com/android/settings/ActivityPicker.java
@@ -399,6 +399,7 @@
//noinspection deprecation
icon = new BitmapDrawable(thumb);
((BitmapDrawable) icon).setTargetDensity(mMetrics);
+ canvas.setBitmap(null);
} else if (iconWidth < width && iconHeight < height) {
final Bitmap.Config c = Bitmap.Config.ARGB_8888;
final Bitmap thumb = Bitmap.createBitmap(mIconWidth, mIconHeight, c);
@@ -413,6 +414,7 @@
//noinspection deprecation
icon = new BitmapDrawable(thumb);
((BitmapDrawable) icon).setTargetDensity(mMetrics);
+ canvas.setBitmap(null);
}
}
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index 380af3c..2ca28e9 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -65,6 +65,8 @@
= "immediately_destroy_activities";
private static final String APP_PROCESS_LIMIT_KEY = "app_process_limit";
+ private static final String SHOW_ALL_ANRS_KEY = "show_all_anrs";
+
private IWindowManager mWindowManager;
private CheckBoxPreference mEnableAdb;
@@ -81,6 +83,8 @@
private CheckBoxPreference mImmediatelyDestroyActivities;
private ListPreference mAppProcessLimit;
+ private CheckBoxPreference mShowAllANRs;
+
// To track whether Yes was clicked in the adb warning dialog
private boolean mOkClicked;
@@ -112,6 +116,9 @@
mAppProcessLimit = (ListPreference) findPreference(APP_PROCESS_LIMIT_KEY);
mAppProcessLimit.setOnPreferenceChangeListener(this);
+ mShowAllANRs = (CheckBoxPreference) findPreference(
+ SHOW_ALL_ANRS_KEY);
+
removeHdcpOptionsForProduction();
}
@@ -144,6 +151,7 @@
updateAnimationScaleOptions();
updateImmediatelyDestroyActivitiesOptions();
updateAppProcessLimitOptions();
+ updateShowAllANRsOptions();
}
private void updateHdcpValues() {
@@ -330,6 +338,17 @@
}
}
+ private void writeShowAllANRsOptions() {
+ Settings.Secure.putInt(getActivity().getContentResolver(),
+ Settings.Secure.ANR_SHOW_BACKGROUND,
+ mShowAllANRs.isChecked() ? 1 : 0);
+ }
+
+ private void updateShowAllANRsOptions() {
+ mShowAllANRs.setChecked(Settings.Secure.getInt(
+ getActivity().getContentResolver(), Settings.Secure.ANR_SHOW_BACKGROUND, 0) != 0);
+ }
+
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
@@ -372,6 +391,8 @@
writeCpuUsageOptions();
} else if (preference == mImmediatelyDestroyActivities) {
writeImmediatelyDestroyActivitiesOptions();
+ } else if (preference == mShowAllANRs) {
+ writeShowAllANRsOptions();
}
return false;
diff --git a/src/com/android/settings/LocationSettings.java b/src/com/android/settings/LocationSettings.java
index 645e6d7..0824aab 100644
--- a/src/com/android/settings/LocationSettings.java
+++ b/src/com/android/settings/LocationSettings.java
@@ -90,8 +90,7 @@
CheckBoxPreference useLocation = new CheckBoxPreference(getActivity());
useLocation.setKey(KEY_USE_LOCATION);
useLocation.setTitle(R.string.use_location_title);
- useLocation.setSummaryOn(R.string.use_location_summary_enabled);
- useLocation.setSummaryOff(R.string.use_location_summary_disabled);
+ useLocation.setSummary(R.string.use_location_summary);
useLocation.setChecked(
GoogleLocationSettingHelper.getUseLocationForServices(getActivity())
== GoogleLocationSettingHelper.USE_LOCATION_FOR_SERVICES_ON);
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
index 5a171e7..272c0d1 100644
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -83,7 +83,7 @@
@Override
protected void onCreate(Bundle savedInstanceState) {
final int theme = getIntent().getIntExtra(
- EXTRA_THEME, android.R.style.Theme_Holo_SplitActionBarWhenNarrow);
+ EXTRA_THEME, android.R.style.Theme_Holo);
setTheme(theme);
getMetaData();
diff --git a/src/com/android/settings/deviceinfo/Memory.java b/src/com/android/settings/deviceinfo/Memory.java
index fff1570..e257f86 100644
--- a/src/com/android/settings/deviceinfo/Memory.java
+++ b/src/com/android/settings/deviceinfo/Memory.java
@@ -165,7 +165,7 @@
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
menu.add(Menu.NONE, MENU_ID_USB, 0, R.string.storage_menu_usb)
//.setIcon(com.android.internal.R.drawable.stat_sys_data_usb)
- .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
+ .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
}
@Override