diff options
author | Chong Zhang <chz@google.com> | 2013-08-23 23:19:18 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-08-23 23:19:18 +0000 |
commit | 5114444eca4e62f32cc85b9740dc0c66f87d5d99 (patch) | |
tree | 7b14efacd603de244e62f36713eebf0b61492460 /src/com/android/settings/DevelopmentSettings.java | |
parent | a0aee43e8463516ded9b3ab784d53bdf9ccf87c2 (diff) | |
parent | 6c607384c478958260952b82932b9084a4536fc6 (diff) | |
download | packages_apps_Settings-5114444eca4e62f32cc85b9740dc0c66f87d5d99.tar.gz packages_apps_Settings-5114444eca4e62f32cc85b9740dc0c66f87d5d99.tar.bz2 packages_apps_Settings-5114444eca4e62f32cc85b9740dc0c66f87d5d99.zip |
Merge "wifi-display: add certification options" into klp-dev
Diffstat (limited to 'src/com/android/settings/DevelopmentSettings.java')
-rw-r--r-- | src/com/android/settings/DevelopmentSettings.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java index 1578e4e69..912ae4c89 100644 --- a/src/com/android/settings/DevelopmentSettings.java +++ b/src/com/android/settings/DevelopmentSettings.java @@ -136,6 +136,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment private static final String OVERLAY_DISPLAY_DEVICES_KEY = "overlay_display_devices"; private static final String DEBUG_DEBUGGING_CATEGORY_KEY = "debug_debugging_category"; private static final String DEBUG_APPLICATIONS_CATEGORY_KEY = "debug_applications_category"; + private static final String WIFI_DISPLAY_CERTIFICATION_KEY = "wifi_display_certification"; private static final String OPENGL_TRACES_KEY = "enable_opengl_traces"; @@ -179,6 +180,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment private Preference mDebugAppPref; private CheckBoxPreference mWaitForDebugger; private CheckBoxPreference mVerifyAppsOverUsb; + private CheckBoxPreference mWifiDisplayCertification; private CheckBoxPreference mStrictMode; private CheckBoxPreference mPointerLocation; @@ -307,6 +309,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment mDebugLayout = findAndInitCheckboxPref(DEBUG_LAYOUT_KEY); mForceRtlLayout = findAndInitCheckboxPref(FORCE_RTL_LAYOUT_KEY); mDebugHwOverdraw = addListPreference(DEBUG_HW_OVERDRAW_KEY); + mWifiDisplayCertification = findAndInitCheckboxPref(WIFI_DISPLAY_CERTIFICATION_KEY); mWindowAnimationScale = addListPreference(WINDOW_ANIMATION_SCALE_KEY); mTransitionAnimationScale = addListPreference(TRANSITION_ANIMATION_SCALE_KEY); mAnimatorDurationScale = addListPreference(ANIMATOR_DURATION_SCALE_KEY); @@ -527,6 +530,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment updateVerifyAppsOverUsbOptions(); updateBugreportOptions(); updateForceRtlOptions(); + updateWifiDisplayCertificationOptions(); } private void resetDangerousOptions() { @@ -976,6 +980,18 @@ public class DevelopmentSettings extends RestrictedSettingsFragment LocalePicker.updateLocale(getActivity().getResources().getConfiguration().locale); } + private void updateWifiDisplayCertificationOptions() { + updateCheckBox(mWifiDisplayCertification, Settings.Global.getInt( + getActivity().getContentResolver(), + Settings.Global.WIFI_DISPLAY_CERTIFICATION_ON, 0) != 0); + } + + private void writeWifiDisplayCertificationOptions() { + Settings.Global.putInt(getActivity().getContentResolver(), + Settings.Global.WIFI_DISPLAY_CERTIFICATION_ON, + mWifiDisplayCertification.isChecked() ? 1 : 0); + } + private void updateCpuUsageOptions() { updateCheckBox(mShowCpuUsage, Settings.Global.getInt(getActivity().getContentResolver(), Settings.Global.SHOW_PROCESSES, 0) != 0); @@ -1291,6 +1307,8 @@ public class DevelopmentSettings extends RestrictedSettingsFragment writeDebugLayoutOptions(); } else if (preference == mForceRtlLayout) { writeForceRtlOptions(); + } else if (preference == mWifiDisplayCertification) { + writeWifiDisplayCertificationOptions(); } else { return super.onPreferenceTreeClick(preferenceScreen, preference); } |