diff --git a/res/values/strings.xml b/res/values/strings.xml index 92a3a9de899..056af6b060c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -3576,8 +3576,14 @@ Debugged application waits for debugger to attach before executing - - User interface + + Input + + + Drawing + + + Monitoring Strict mode enabled @@ -3595,20 +3601,32 @@ Show visual feedback for touches - - Show screen updates - - Flash areas of screen when they update + + Show surface updates + + Flash entire window surfaces when they update - - Show GPU screen updates + + Show GPU view updates - Flash areas of screen when they update with the GPU + Flash views inside windows when drawn with the GPU - Disable overlays + Disable HW overlays - Don\'t use overlays for screen compositing + Always use GPU for screen compositing + + + Enable traces + + Select enabled traces + + + No traces currently enabled + + %1$d traces currently enabled + + All traces currently enabled Show layout bounds @@ -3623,7 +3641,7 @@ Force GPU rendering - Use 2D hardware acceleration in applications + Force use of GPU for 2d drawing Profile GPU rendering diff --git a/res/xml/development_prefs.xml b/res/xml/development_prefs.xml index ab8aad3d292..f33dd38cd53 100644 --- a/res/xml/development_prefs.xml +++ b/res/xml/development_prefs.xml @@ -70,58 +70,38 @@ - - - - - + + + + + + + - - - - - - - - + android:key="show_screen_updates" + android:title="@string/show_screen_updates" + android:summary="@string/show_screen_updates_summary"/> + + + + + + + + + + + + + + + + 0) { String label; @@ -383,6 +418,7 @@ public class DevelopmentSettings extends PreferenceFragment } mDebugAppPref.setSummary(getResources().getString(R.string.debug_app_set, label)); mWaitForDebugger.setEnabled(true); + mHaveDebugSettings = true; } else { mDebugAppPref.setSummary(getResources().getString(R.string.debug_app_not_set)); mWaitForDebugger.setEnabled(false); @@ -411,7 +447,7 @@ public class DevelopmentSettings extends PreferenceFragment } private void updateStrictModeVisualOptions() { - mStrictMode.setChecked(currentStrictModeActiveIndex() == 1); + updateCheckBox(mStrictMode, currentStrictModeActiveIndex() == 1); } private void writePointerLocationOptions() { @@ -420,7 +456,7 @@ public class DevelopmentSettings extends PreferenceFragment } private void updatePointerLocationOptions() { - mPointerLocation.setChecked(Settings.System.getInt(getActivity().getContentResolver(), + updateCheckBox(mPointerLocation, Settings.System.getInt(getActivity().getContentResolver(), Settings.System.POINTER_LOCATION, 0) != 0); } @@ -430,7 +466,7 @@ public class DevelopmentSettings extends PreferenceFragment } private void updateShowTouchesOptions() { - mShowTouches.setChecked(Settings.System.getInt(getActivity().getContentResolver(), + updateCheckBox(mShowTouches, Settings.System.getInt(getActivity().getContentResolver(), Settings.System.SHOW_TOUCHES, 0) != 0); } @@ -448,11 +484,11 @@ public class DevelopmentSettings extends PreferenceFragment @SuppressWarnings("unused") int enableGL = reply.readInt(); int showUpdates = reply.readInt(); - mShowScreenUpdates.setChecked(showUpdates != 0); + updateCheckBox(mShowScreenUpdates, showUpdates != 0); @SuppressWarnings("unused") int showBackground = reply.readInt(); int disableOverlays = reply.readInt(); - mDisableOverlays.setChecked(disableOverlays != 0); + updateCheckBox(mDisableOverlays, disableOverlays != 0); reply.recycle(); data.recycle(); } @@ -495,7 +531,7 @@ public class DevelopmentSettings extends PreferenceFragment } private void updateHardwareUiOptions() { - mForceHardwareUi.setChecked(SystemProperties.getBoolean(HARDWARE_UI_PROPERTY, false)); + updateCheckBox(mForceHardwareUi, SystemProperties.getBoolean(HARDWARE_UI_PROPERTY, false)); } private void writeHardwareUiOptions() { @@ -503,7 +539,7 @@ public class DevelopmentSettings extends PreferenceFragment } private void updateTrackFrameTimeOptions() { - mTrackFrameTime.setChecked( + updateCheckBox(mTrackFrameTime, SystemProperties.getBoolean(HardwareRenderer.PROFILE_PROPERTY, false)); } @@ -513,7 +549,7 @@ public class DevelopmentSettings extends PreferenceFragment } private void updateShowHwScreenUpdatesOptions() { - mShowHwScreenUpdates.setChecked( + updateCheckBox(mShowHwScreenUpdates, SystemProperties.getBoolean(HardwareRenderer.DEBUG_DIRTY_REGIONS_PROPERTY, false)); } @@ -523,7 +559,7 @@ public class DevelopmentSettings extends PreferenceFragment } private void updateDebugLayoutOptions() { - mDebugLayout.setChecked( + updateCheckBox(mDebugLayout, SystemProperties.getBoolean(View.DEBUG_LAYOUT_PROPERTY, false)); } @@ -533,7 +569,7 @@ public class DevelopmentSettings extends PreferenceFragment } private void updateCpuUsageOptions() { - mShowCpuUsage.setChecked(Settings.System.getInt(getActivity().getContentResolver(), + updateCheckBox(mShowCpuUsage, Settings.System.getInt(getActivity().getContentResolver(), Settings.System.SHOW_PROCESSES, 0) != 0); } @@ -559,13 +595,16 @@ public class DevelopmentSettings extends PreferenceFragment } private void updateImmediatelyDestroyActivitiesOptions() { - mImmediatelyDestroyActivities.setChecked(Settings.System.getInt( + updateCheckBox(mImmediatelyDestroyActivities, Settings.System.getInt( getActivity().getContentResolver(), Settings.System.ALWAYS_FINISH_ACTIVITIES, 0) != 0); } private void updateAnimationScaleValue(int which, ListPreference pref) { try { float scale = mWindowManager.getAnimationScale(which); + if (scale != 1) { + mHaveDebugSettings = true; + } CharSequence[] values = pref.getEntryValues(); for (int i=0; i= limit) { + if (i != 0) { + mHaveDebugSettings = true; + } mAppProcessLimit.setValueIndex(i); mAppProcessLimit.setSummary(mAppProcessLimit.getEntries()[i]); return; @@ -630,10 +672,51 @@ public class DevelopmentSettings extends PreferenceFragment } private void updateShowAllANRsOptions() { - mShowAllANRs.setChecked(Settings.Secure.getInt( + updateCheckBox(mShowAllANRs, Settings.Secure.getInt( getActivity().getContentResolver(), Settings.Secure.ANR_SHOW_BACKGROUND, 0) != 0); } + private void updateEnableTracesOptions() { + String strValue = SystemProperties.get(Trace.PROPERTY_TRACE_TAG_ENABLEFLAGS); + long flags = SystemProperties.getLong(Trace.PROPERTY_TRACE_TAG_ENABLEFLAGS, 0); + String[] values = mEnableTracesPref.getEntryValues(); + int numSet = 0; + for (int i=Trace.TRACE_FLAGS_START_BIT; i