@Override
 public boolean onPreferenceChange(Preference preference, Object newValue) {
   if (HDCP_CHECKING_KEY.equals(preference.getKey())) {
     SystemProperties.set(HDCP_CHECKING_PROPERTY, newValue.toString());
     updateHdcpValues();
     pokeSystemProperties();
     return true;
   } else if (preference == mWindowAnimationScale) {
     writeAnimationScaleOption(0, mWindowAnimationScale, newValue);
     return true;
   } else if (preference == mTransitionAnimationScale) {
     writeAnimationScaleOption(1, mTransitionAnimationScale, newValue);
     return true;
   } else if (preference == mAnimatorDurationScale) {
     writeAnimationScaleOption(2, mAnimatorDurationScale, newValue);
     return true;
   } else if (preference == mOverlayDisplayDevices) {
     writeOverlayDisplayDevicesOptions(newValue);
     return true;
   } else if (preference == mOpenGLTraces) {
     writeOpenGLTracesOptions(newValue);
     return true;
   } else if (preference == mEnableTracesPref) {
     writeEnableTracesOptions();
     return true;
   } else if (preference == mAppProcessLimit) {
     writeAppProcessLimitOptions(newValue);
     return true;
   }
   return false;
 }
 private void resetDangerousOptions() {
   mDontPokeProperties = true;
   for (int i = 0; i < mResetCbPrefs.size(); i++) {
     CheckBoxPreference cb = mResetCbPrefs.get(i);
     if (cb.isChecked()) {
       cb.setChecked(false);
       onPreferenceTreeClick(null, cb);
     }
   }
   resetDebuggerOptions();
   writeAnimationScaleOption(0, mWindowAnimationScale, null);
   writeAnimationScaleOption(1, mTransitionAnimationScale, null);
   writeAnimationScaleOption(2, mAnimatorDurationScale, null);
   writeOverlayDisplayDevicesOptions(null);
   writeEnableTracesOptions(0);
   writeAppProcessLimitOptions(null);
   mHaveDebugSettings = false;
   updateAllOptions();
   mDontPokeProperties = false;
   pokeSystemProperties();
 }