Loading services/core/java/com/android/server/input/InputManagerService.java +5 −5 Original line number Original line Diff line number Diff line Loading @@ -369,7 +369,7 @@ public class InputManagerService extends IInputManager.Stub /** Switch code: Camera lens cover. When set the lens is covered. */ /** Switch code: Camera lens cover. When set the lens is covered. */ public static final int SW_CAMERA_LENS_COVER = 0x09; public static final int SW_CAMERA_LENS_COVER = 0x09; /** Switch code: Microphone. When set it is off. */ /** Switch code: Microphone. When set, the mic is muted. */ public static final int SW_MUTE_DEVICE = 0x0e; public static final int SW_MUTE_DEVICE = 0x0e; public static final int SW_LID_BIT = 1 << SW_LID; public static final int SW_LID_BIT = 1 << SW_LID; Loading Loading @@ -536,14 +536,14 @@ public class InputManagerService extends IInputManager.Stub // Set the HW mic toggle switch state // Set the HW mic toggle switch state final int micMuteState = getSwitchState(-1 /* deviceId */, InputDevice.SOURCE_ANY, final int micMuteState = getSwitchState(-1 /* deviceId */, InputDevice.SOURCE_ANY, SW_MUTE_DEVICE); SW_MUTE_DEVICE); if (micMuteState != InputManager.SWITCH_STATE_UNKNOWN) { if (micMuteState == InputManager.SWITCH_STATE_ON) { setSensorPrivacy(Sensors.MICROPHONE, micMuteState != InputManager.SWITCH_STATE_OFF); setSensorPrivacy(Sensors.MICROPHONE, true); } } // Set the HW camera toggle switch state // Set the HW camera toggle switch state final int cameraMuteState = getSwitchState(-1 /* deviceId */, InputDevice.SOURCE_ANY, final int cameraMuteState = getSwitchState(-1 /* deviceId */, InputDevice.SOURCE_ANY, SW_CAMERA_LENS_COVER); SW_CAMERA_LENS_COVER); if (cameraMuteState != InputManager.SWITCH_STATE_UNKNOWN) { if (cameraMuteState == InputManager.SWITCH_STATE_ON) { setSensorPrivacy(Sensors.CAMERA, cameraMuteState != InputManager.SWITCH_STATE_OFF); setSensorPrivacy(Sensors.CAMERA, true); } } IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED); IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED); Loading Loading
services/core/java/com/android/server/input/InputManagerService.java +5 −5 Original line number Original line Diff line number Diff line Loading @@ -369,7 +369,7 @@ public class InputManagerService extends IInputManager.Stub /** Switch code: Camera lens cover. When set the lens is covered. */ /** Switch code: Camera lens cover. When set the lens is covered. */ public static final int SW_CAMERA_LENS_COVER = 0x09; public static final int SW_CAMERA_LENS_COVER = 0x09; /** Switch code: Microphone. When set it is off. */ /** Switch code: Microphone. When set, the mic is muted. */ public static final int SW_MUTE_DEVICE = 0x0e; public static final int SW_MUTE_DEVICE = 0x0e; public static final int SW_LID_BIT = 1 << SW_LID; public static final int SW_LID_BIT = 1 << SW_LID; Loading Loading @@ -536,14 +536,14 @@ public class InputManagerService extends IInputManager.Stub // Set the HW mic toggle switch state // Set the HW mic toggle switch state final int micMuteState = getSwitchState(-1 /* deviceId */, InputDevice.SOURCE_ANY, final int micMuteState = getSwitchState(-1 /* deviceId */, InputDevice.SOURCE_ANY, SW_MUTE_DEVICE); SW_MUTE_DEVICE); if (micMuteState != InputManager.SWITCH_STATE_UNKNOWN) { if (micMuteState == InputManager.SWITCH_STATE_ON) { setSensorPrivacy(Sensors.MICROPHONE, micMuteState != InputManager.SWITCH_STATE_OFF); setSensorPrivacy(Sensors.MICROPHONE, true); } } // Set the HW camera toggle switch state // Set the HW camera toggle switch state final int cameraMuteState = getSwitchState(-1 /* deviceId */, InputDevice.SOURCE_ANY, final int cameraMuteState = getSwitchState(-1 /* deviceId */, InputDevice.SOURCE_ANY, SW_CAMERA_LENS_COVER); SW_CAMERA_LENS_COVER); if (cameraMuteState != InputManager.SWITCH_STATE_UNKNOWN) { if (cameraMuteState == InputManager.SWITCH_STATE_ON) { setSensorPrivacy(Sensors.CAMERA, cameraMuteState != InputManager.SWITCH_STATE_OFF); setSensorPrivacy(Sensors.CAMERA, true); } } IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED); IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED); Loading