@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == RESULT_DEBUG_APP) { if (resultCode == Activity.RESULT_OK) { mDebugApp = data.getAction(); writeDebuggerOptions(); updateDebuggerOptions(); } } else { super.onActivityResult(requestCode, resultCode, data); } }
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(); }