Merge "Settings: Add laser sensor preference" into oc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
22eb007eea
@@ -365,6 +365,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
|
||||
private BugReportInPowerPreferenceController mBugReportInPowerController;
|
||||
private TelephonyMonitorPreferenceController mTelephonyMonitorController;
|
||||
private CameraHalHdrplusPreferenceController mCameraHalHdrplusController;
|
||||
private CameraLaserSensorPreferenceController mCameraLaserSensorController;
|
||||
|
||||
private BroadcastReceiver mEnableAdbReceiver;
|
||||
|
||||
@@ -406,6 +407,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
|
||||
mWebViewAppPrefController = new WebViewAppPreferenceController(getActivity());
|
||||
mVerifyAppsOverUsbController = new VerifyAppsOverUsbPreferenceController(getActivity());
|
||||
mCameraHalHdrplusController = new CameraHalHdrplusPreferenceController(getActivity());
|
||||
mCameraLaserSensorController = new CameraLaserSensorPreferenceController(getActivity());
|
||||
|
||||
setIfOnlyAvailableForAdmins(true);
|
||||
if (isUiRestricted() || !Utils.isDeviceProvisioned(getActivity())) {
|
||||
@@ -441,6 +443,8 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
|
||||
mCameraHalHdrplusController.displayPreference(getPreferenceScreen());
|
||||
mEnableAdbController.displayPreference(getPreferenceScreen());
|
||||
|
||||
mCameraLaserSensorController.displayPreference(getPreferenceScreen());
|
||||
|
||||
mKeepScreenOn = (RestrictedSwitchPreference) findAndInitSwitchPref(KEEP_SCREEN_ON);
|
||||
mBtHciSnoopLog = findAndInitSwitchPref(BT_HCI_SNOOP_LOG);
|
||||
mEnableOemUnlock = (RestrictedSwitchPreference) findAndInitSwitchPref(ENABLE_OEM_UNLOCK);
|
||||
@@ -660,6 +664,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
|
||||
mTelephonyMonitorController.enablePreference(enabled);
|
||||
mWebViewAppPrefController.enablePreference(enabled);
|
||||
mCameraHalHdrplusController.enablePreference(enabled);
|
||||
mCameraLaserSensorController.enablePreference(enabled);
|
||||
updateAllOptions();
|
||||
}
|
||||
|
||||
@@ -794,6 +799,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
|
||||
mHaveDebugSettings |= mBugReportInPowerController.updatePreference();
|
||||
mHaveDebugSettings |= mTelephonyMonitorController.updatePreference();
|
||||
mHaveDebugSettings |= mCameraHalHdrplusController.updatePreference();
|
||||
mHaveDebugSettings |= mCameraLaserSensorController.updatePreference();
|
||||
updateSwitchPreference(mKeepScreenOn, Settings.Global.getInt(cr,
|
||||
Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 0) != 0);
|
||||
updateSwitchPreference(mBtHciSnoopLog, SystemProperties.getBoolean(
|
||||
@@ -2471,6 +2477,10 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mCameraLaserSensorController.handlePreferenceTreeClick(preference)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (preference == mClearAdbKeys) {
|
||||
if (mAdbKeysDialog != null) dismissDialogs();
|
||||
mAdbKeysDialog = new AlertDialog.Builder(getActivity())
|
||||
|
Reference in New Issue
Block a user