Loading services/core/java/com/android/server/location/contexthub/ContextHubService.java +1 −1 Original line number Diff line number Diff line Loading @@ -301,7 +301,7 @@ public class ContextHubService extends IContextHubService.Stub { mSensorPrivacyManagerInternal.addSensorPrivacyListenerForAllUsers( SensorPrivacyManager.Sensors.MICROPHONE, (userId, enabled) -> { if (userId == getCurrentUserId()) { Log.d(TAG, "User: " + userId + " enabled: " + enabled); Log.d(TAG, "User: " + userId + "mic privacy: " + enabled); sendMicrophoneDisableSettingUpdate(enabled); } }); Loading services/core/java/com/android/server/location/contexthub/IContextHubWrapper.java +5 −2 Original line number Diff line number Diff line Loading @@ -324,8 +324,11 @@ public abstract class IContextHubWrapper { } public void onMicrophoneDisableSettingChanged(boolean enabled) { sendSettingChanged(android.hardware.contexthub.V1_2.Setting.GLOBAL_MIC_DISABLE, enabled ? SettingValue.ENABLED : SettingValue.DISABLED); // The SensorPrivacyManager reports if microphone privacy was enabled, // which translates to microphone access being disabled (and vice-versa). // With this in mind, we flip the argument before piping it to CHRE. sendSettingChanged(android.hardware.contexthub.V1_2.Setting.MICROPHONE, enabled ? SettingValue.DISABLED : SettingValue.ENABLED); } private void sendSettingChanged(byte setting, byte newValue) { Loading Loading
services/core/java/com/android/server/location/contexthub/ContextHubService.java +1 −1 Original line number Diff line number Diff line Loading @@ -301,7 +301,7 @@ public class ContextHubService extends IContextHubService.Stub { mSensorPrivacyManagerInternal.addSensorPrivacyListenerForAllUsers( SensorPrivacyManager.Sensors.MICROPHONE, (userId, enabled) -> { if (userId == getCurrentUserId()) { Log.d(TAG, "User: " + userId + " enabled: " + enabled); Log.d(TAG, "User: " + userId + "mic privacy: " + enabled); sendMicrophoneDisableSettingUpdate(enabled); } }); Loading
services/core/java/com/android/server/location/contexthub/IContextHubWrapper.java +5 −2 Original line number Diff line number Diff line Loading @@ -324,8 +324,11 @@ public abstract class IContextHubWrapper { } public void onMicrophoneDisableSettingChanged(boolean enabled) { sendSettingChanged(android.hardware.contexthub.V1_2.Setting.GLOBAL_MIC_DISABLE, enabled ? SettingValue.ENABLED : SettingValue.DISABLED); // The SensorPrivacyManager reports if microphone privacy was enabled, // which translates to microphone access being disabled (and vice-versa). // With this in mind, we flip the argument before piping it to CHRE. sendSettingChanged(android.hardware.contexthub.V1_2.Setting.MICROPHONE, enabled ? SettingValue.DISABLED : SettingValue.ENABLED); } private void sendSettingChanged(byte setting, byte newValue) { Loading