Merge "Developer option off must not affect laser sensor"

This commit is contained in:
TreeHugger Robot
2019-09-23 15:07:13 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 18 deletions

View File

@@ -75,12 +75,9 @@ public class CameraLaserSensorPreferenceController extends DeveloperOptionsPrefe
((SwitchPreference) mPreference).setChecked(enabled);
}
@Override
protected void onDeveloperOptionsSwitchDisabled() {
super.onDeveloperOptionsSwitchDisabled();
SystemProperties.set(PROPERTY_CAMERA_LASER_SENSOR, Integer.toString(DISABLED));
((SwitchPreference) mPreference).setChecked(false);
}
// There should be no impact on the current
// laser sensor settings in case the developer
// settings switch is turned on or off!
private boolean isLaserSensorEnabled() {
final String prop = SystemProperties.get(PROPERTY_CAMERA_LASER_SENSOR,