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();
 }
예제 #2
0
  @Override
  public void onResume() {
    super.onResume();

    final ContentResolver cr = getActivity().getContentResolver();
    mEnableAdb.setChecked(Settings.Secure.getInt(cr, Settings.Secure.ADB_ENABLED, 0) != 0);
    mKeepScreenOn.setChecked(
        Settings.System.getInt(cr, Settings.System.STAY_ON_WHILE_PLUGGED_IN, 0) != 0);
    mAllowMockLocation.setChecked(
        Settings.Secure.getInt(cr, Settings.Secure.ALLOW_MOCK_LOCATION, 0) != 0);
    updateHdcpValues();
    updatePasswordSummary();
    updateStrictModeVisualOptions();
    updatePointerLocationOptions();
    updateShowTouchesOptions();
    updateFlingerOptions();
    updateCpuUsageOptions();
    updateHardwareUiOptions();
    updateAnimationScaleOptions();
    updateImmediatelyDestroyActivitiesOptions();
    updateAppProcessLimitOptions();
    updateShowAllANRsOptions();
  }