private void writeEnableTracesOptions() {
   long value = 0;
   String[] values = mEnableTracesPref.getEntryValues();
   for (int i = Trace.TRACE_FLAGS_START_BIT; i < values.length; i++) {
     if (mEnableTracesPref.getValue(i - Trace.TRACE_FLAGS_START_BIT)) {
       value |= 1 << i;
     }
   }
   writeEnableTracesOptions(value);
   // Make sure summary is updated.
   updateEnableTracesOptions();
 }
 private void updateAllOptions() {
   final Context context = getActivity();
   final ContentResolver cr = context.getContentResolver();
   mHaveDebugSettings = false;
   updateCheckBox(mEnableAdb, Settings.Global.getInt(cr, Settings.Global.ADB_ENABLED, 0) != 0);
   updateCheckBox(
       mBugreportInPower,
       Settings.Secure.getInt(cr, Settings.Secure.BUGREPORT_IN_POWER_MENU, 0) != 0);
   updateCheckBox(
       mKeepScreenOn,
       Settings.Global.getInt(cr, Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 0) != 0);
   updateCheckBox(mEnforceReadExternal, isPermissionEnforced(READ_EXTERNAL_STORAGE));
   updateCheckBox(
       mAllowMockLocation,
       Settings.Secure.getInt(cr, Settings.Secure.ALLOW_MOCK_LOCATION, 0) != 0);
   updateHdcpValues();
   updatePasswordSummary();
   updateDebuggerOptions();
   updateStrictModeVisualOptions();
   updatePointerLocationOptions();
   updateShowTouchesOptions();
   updateFlingerOptions();
   updateCpuUsageOptions();
   updateHardwareUiOptions();
   updateMsaaOptions();
   updateTrackFrameTimeOptions();
   updateShowHwScreenUpdatesOptions();
   updateShowHwLayersUpdatesOptions();
   updateShowHwOverdrawOptions();
   updateDebugLayoutOptions();
   updateAnimationScaleOptions();
   updateOverlayDisplayDevicesOptions();
   updateOpenGLTracesOptions();
   updateEnableTracesOptions();
   updateImmediatelyDestroyActivitiesOptions();
   updateAppProcessLimitOptions();
   updateShowAllANRsOptions();
   updateVerifyAppsOverUsbOptions();
   updateBugreportOptions();
 }