diff options
-rw-r--r-- | res/values/strings.xml | 10 | ||||
-rw-r--r-- | res/xml/development_prefs.xml | 5 | ||||
-rw-r--r-- | src/com/android/settings/ActivityPicker.java | 2 | ||||
-rw-r--r-- | src/com/android/settings/DevelopmentSettings.java | 21 | ||||
-rw-r--r-- | src/com/android/settings/deviceinfo/Memory.java | 2 |
5 files changed, 37 insertions, 3 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index bdb86a6..7c4c6de 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1563,8 +1563,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> @@ -3389,6 +3389,12 @@ found in the list of installed applications.</string> <!-- 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/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 @@ public class ActivityPicker extends AlertActivity implements //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 @@ public class ActivityPicker extends AlertActivity implements //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 @@ public class DevelopmentSettings extends PreferenceFragment = "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 @@ public class DevelopmentSettings extends PreferenceFragment 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 @@ public class DevelopmentSettings extends PreferenceFragment mAppProcessLimit = (ListPreference) findPreference(APP_PROCESS_LIMIT_KEY); mAppProcessLimit.setOnPreferenceChangeListener(this); + mShowAllANRs = (CheckBoxPreference) findPreference( + SHOW_ALL_ANRS_KEY); + removeHdcpOptionsForProduction(); } @@ -144,6 +151,7 @@ public class DevelopmentSettings extends PreferenceFragment updateAnimationScaleOptions(); updateImmediatelyDestroyActivitiesOptions(); updateAppProcessLimitOptions(); + updateShowAllANRsOptions(); } private void updateHdcpValues() { @@ -330,6 +338,17 @@ public class DevelopmentSettings extends PreferenceFragment } } + 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 @@ public class DevelopmentSettings extends PreferenceFragment writeCpuUsageOptions(); } else if (preference == mImmediatelyDestroyActivities) { writeImmediatelyDestroyActivitiesOptions(); + } else if (preference == mShowAllANRs) { + writeShowAllANRsOptions(); } return false; 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 class Memory extends SettingsPreferenceFragment { 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 |