Developer option off must not affect laser sensor

Turning developer settings to on or off must not
change the current laser sensor preference.

Bug: 140016130
Test: mma ROBOTEST_FILTER=CameraLaserSensorPreferenceControllerTest,
manual using Settings application

Change-Id: Ieb30527e5df97abcb00a6624e1ced93f9198c713
This commit is contained in:
Emilian Peev
2019-09-19 10:47:32 -07:00
parent 4ac6f1a781
commit 78db757cad
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,