diff options
author | Romain Guy <romainguy@google.com> | 2012-09-21 19:28:11 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-21 19:28:12 -0700 |
commit | 70edd393bf6590647c12808e20efa928eba96705 (patch) | |
tree | 495273c2065519b82ee1bc01a75562b3ca703a45 /src/com/android/settings/DevelopmentSettings.java | |
parent | f85e7e15a75d5a475e10940e1b3d570210729b64 (diff) | |
parent | 098f493dba656dea272dc7015363321dbb32f3a8 (diff) | |
download | packages_apps_settings-70edd393bf6590647c12808e20efa928eba96705.zip packages_apps_settings-70edd393bf6590647c12808e20efa928eba96705.tar.gz packages_apps_settings-70edd393bf6590647c12808e20efa928eba96705.tar.bz2 |
Merge "Add new developer setting to visualize overdraw" into jb-mr1-dev
Diffstat (limited to 'src/com/android/settings/DevelopmentSettings.java')
-rw-r--r-- | src/com/android/settings/DevelopmentSettings.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java index 09d7f9b..705ce55 100644 --- a/src/com/android/settings/DevelopmentSettings.java +++ b/src/com/android/settings/DevelopmentSettings.java @@ -93,6 +93,7 @@ public class DevelopmentSettings extends PreferenceFragment private static final String TRACK_FRAME_TIME_KEY = "track_frame_time"; private static final String SHOW_HW_SCREEN_UPDATES_KEY = "show_hw_screen_udpates"; private static final String SHOW_HW_LAYERS_UPDATES_KEY = "show_hw_layers_udpates"; + private static final String SHOW_HW_OVERDRAW_KEY = "show_hw_overdraw"; private static final String DEBUG_LAYOUT_KEY = "debug_layout"; private static final String WINDOW_ANIMATION_SCALE_KEY = "window_animation_scale"; private static final String TRANSITION_ANIMATION_SCALE_KEY = "transition_animation_scale"; @@ -141,6 +142,7 @@ public class DevelopmentSettings extends PreferenceFragment private CheckBoxPreference mTrackFrameTime; private CheckBoxPreference mShowHwScreenUpdates; private CheckBoxPreference mShowHwLayersUpdates; + private CheckBoxPreference mShowHwOverdraw; private CheckBoxPreference mDebugLayout; private ListPreference mWindowAnimationScale; private ListPreference mTransitionAnimationScale; @@ -196,6 +198,7 @@ public class DevelopmentSettings extends PreferenceFragment mTrackFrameTime = findAndInitCheckboxPref(TRACK_FRAME_TIME_KEY); mShowHwScreenUpdates = findAndInitCheckboxPref(SHOW_HW_SCREEN_UPDATES_KEY); mShowHwLayersUpdates = findAndInitCheckboxPref(SHOW_HW_LAYERS_UPDATES_KEY); + mShowHwOverdraw = findAndInitCheckboxPref(SHOW_HW_OVERDRAW_KEY); mDebugLayout = findAndInitCheckboxPref(DEBUG_LAYOUT_KEY); mWindowAnimationScale = (ListPreference) findPreference(WINDOW_ANIMATION_SCALE_KEY); mAllPrefs.add(mWindowAnimationScale); @@ -363,6 +366,7 @@ public class DevelopmentSettings extends PreferenceFragment updateTrackFrameTimeOptions(); updateShowHwScreenUpdatesOptions(); updateShowHwLayersUpdatesOptions(); + updateShowHwOverdrawOptions(); updateDebugLayoutOptions(); updateAnimationScaleOptions(); updateOverlayDisplayDevicesOptions(); @@ -612,6 +616,17 @@ public class DevelopmentSettings extends PreferenceFragment pokeSystemProperties(); } + private void updateShowHwOverdrawOptions() { + updateCheckBox(mShowHwOverdraw, SystemProperties.getBoolean( + HardwareRenderer.DEBUG_SHOW_OVERDRAW_PROPERTY, false)); + } + + private void writeShowHwOverdrawOptions() { + SystemProperties.set(HardwareRenderer.DEBUG_SHOW_OVERDRAW_PROPERTY, + mShowHwOverdraw.isChecked() ? "true" : null); + pokeSystemProperties(); + } + private void updateDebugLayoutOptions() { updateCheckBox(mDebugLayout, SystemProperties.getBoolean(View.DEBUG_LAYOUT_PROPERTY, false)); @@ -907,6 +922,8 @@ public class DevelopmentSettings extends PreferenceFragment writeShowHwScreenUpdatesOptions(); } else if (preference == mShowHwLayersUpdates) { writeShowHwLayersUpdatesOptions(); + } else if (preference == mShowHwOverdraw) { + writeShowHwOverdrawOptions(); } else if (preference == mDebugLayout) { writeDebugLayoutOptions(); } |