Loading services/core/java/com/android/server/location/contexthub/ContextHubService.java +5 −2 Original line number Diff line number Diff line Loading @@ -293,7 +293,7 @@ public class ContextHubService extends IContextHubService.Stub { }, UserHandle.USER_ALL); } if (mContextHubWrapper.supportsMicrophoneDisableSettingNotifications()) { if (mContextHubWrapper.supportsMicrophoneSettingNotifications()) { sendMicrophoneDisableSettingUpdateForCurrentUser(); mSensorPrivacyManagerInternal.addSensorPrivacyListenerForAllUsers( Loading Loading @@ -1100,7 +1100,10 @@ public class ContextHubService extends IContextHubService.Stub { */ private void sendMicrophoneDisableSettingUpdate(boolean enabled) { Log.d(TAG, "Mic Disabled Setting: " + enabled); mContextHubWrapper.onMicrophoneDisableSettingChanged(enabled); // 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. mContextHubWrapper.onMicrophoneSettingChanged(!enabled); } /** Loading services/core/java/com/android/server/location/contexthub/IContextHubWrapper.java +13 −16 Original line number Diff line number Diff line Loading @@ -228,15 +228,15 @@ public abstract class IContextHubWrapper { public abstract void onAirplaneModeSettingChanged(boolean enabled); /** * @return True if this version of the Contexthub HAL supports microphone disable setting * @return True if this version of the Contexthub HAL supports microphone setting * notifications. */ public abstract boolean supportsMicrophoneDisableSettingNotifications(); public abstract boolean supportsMicrophoneSettingNotifications(); /** * Notifies the Contexthub implementation of a microphone disable setting change. * Notifies the Contexthub implementation of a microphone setting change. */ public abstract void onMicrophoneDisableSettingChanged(boolean enabled); public abstract void onMicrophoneSettingChanged(boolean enabled); /** * Sends a message to the Context Hub. Loading Loading @@ -380,7 +380,7 @@ public abstract class IContextHubWrapper { return true; } public boolean supportsMicrophoneDisableSettingNotifications() { public boolean supportsMicrophoneSettingNotifications() { return true; } Loading @@ -395,7 +395,7 @@ public abstract class IContextHubWrapper { onSettingChanged(android.hardware.contexthub.Setting.AIRPLANE_MODE, enabled); } public void onMicrophoneDisableSettingChanged(boolean enabled) { public void onMicrophoneSettingChanged(boolean enabled) { onSettingChanged(android.hardware.contexthub.Setting.MICROPHONE, enabled); } Loading Loading @@ -615,7 +615,7 @@ public abstract class IContextHubWrapper { return false; } public boolean supportsMicrophoneDisableSettingNotifications() { public boolean supportsMicrophoneSettingNotifications() { return false; } Loading @@ -628,7 +628,7 @@ public abstract class IContextHubWrapper { public void onAirplaneModeSettingChanged(boolean enabled) { } public void onMicrophoneDisableSettingChanged(boolean enabled) { public void onMicrophoneSettingChanged(boolean enabled) { } } Loading Loading @@ -660,7 +660,7 @@ public abstract class IContextHubWrapper { return false; } public boolean supportsMicrophoneDisableSettingNotifications() { public boolean supportsMicrophoneSettingNotifications() { return false; } Loading @@ -679,7 +679,7 @@ public abstract class IContextHubWrapper { public void onAirplaneModeSettingChanged(boolean enabled) { } public void onMicrophoneDisableSettingChanged(boolean enabled) { public void onMicrophoneSettingChanged(boolean enabled) { } } Loading Loading @@ -721,7 +721,7 @@ public abstract class IContextHubWrapper { return true; } public boolean supportsMicrophoneDisableSettingNotifications() { public boolean supportsMicrophoneSettingNotifications() { return true; } Loading @@ -740,12 +740,9 @@ public abstract class IContextHubWrapper { enabled ? SettingValue.ENABLED : SettingValue.DISABLED); } public void onMicrophoneDisableSettingChanged(boolean enabled) { // 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. public void onMicrophoneSettingChanged(boolean enabled) { sendSettingChanged(android.hardware.contexthub.V1_2.Setting.MICROPHONE, enabled ? SettingValue.DISABLED : SettingValue.ENABLED); enabled ? SettingValue.ENABLED : SettingValue.DISABLED); } public void registerCallback(int contextHubId, ICallback callback) throws RemoteException { Loading Loading
services/core/java/com/android/server/location/contexthub/ContextHubService.java +5 −2 Original line number Diff line number Diff line Loading @@ -293,7 +293,7 @@ public class ContextHubService extends IContextHubService.Stub { }, UserHandle.USER_ALL); } if (mContextHubWrapper.supportsMicrophoneDisableSettingNotifications()) { if (mContextHubWrapper.supportsMicrophoneSettingNotifications()) { sendMicrophoneDisableSettingUpdateForCurrentUser(); mSensorPrivacyManagerInternal.addSensorPrivacyListenerForAllUsers( Loading Loading @@ -1100,7 +1100,10 @@ public class ContextHubService extends IContextHubService.Stub { */ private void sendMicrophoneDisableSettingUpdate(boolean enabled) { Log.d(TAG, "Mic Disabled Setting: " + enabled); mContextHubWrapper.onMicrophoneDisableSettingChanged(enabled); // 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. mContextHubWrapper.onMicrophoneSettingChanged(!enabled); } /** Loading
services/core/java/com/android/server/location/contexthub/IContextHubWrapper.java +13 −16 Original line number Diff line number Diff line Loading @@ -228,15 +228,15 @@ public abstract class IContextHubWrapper { public abstract void onAirplaneModeSettingChanged(boolean enabled); /** * @return True if this version of the Contexthub HAL supports microphone disable setting * @return True if this version of the Contexthub HAL supports microphone setting * notifications. */ public abstract boolean supportsMicrophoneDisableSettingNotifications(); public abstract boolean supportsMicrophoneSettingNotifications(); /** * Notifies the Contexthub implementation of a microphone disable setting change. * Notifies the Contexthub implementation of a microphone setting change. */ public abstract void onMicrophoneDisableSettingChanged(boolean enabled); public abstract void onMicrophoneSettingChanged(boolean enabled); /** * Sends a message to the Context Hub. Loading Loading @@ -380,7 +380,7 @@ public abstract class IContextHubWrapper { return true; } public boolean supportsMicrophoneDisableSettingNotifications() { public boolean supportsMicrophoneSettingNotifications() { return true; } Loading @@ -395,7 +395,7 @@ public abstract class IContextHubWrapper { onSettingChanged(android.hardware.contexthub.Setting.AIRPLANE_MODE, enabled); } public void onMicrophoneDisableSettingChanged(boolean enabled) { public void onMicrophoneSettingChanged(boolean enabled) { onSettingChanged(android.hardware.contexthub.Setting.MICROPHONE, enabled); } Loading Loading @@ -615,7 +615,7 @@ public abstract class IContextHubWrapper { return false; } public boolean supportsMicrophoneDisableSettingNotifications() { public boolean supportsMicrophoneSettingNotifications() { return false; } Loading @@ -628,7 +628,7 @@ public abstract class IContextHubWrapper { public void onAirplaneModeSettingChanged(boolean enabled) { } public void onMicrophoneDisableSettingChanged(boolean enabled) { public void onMicrophoneSettingChanged(boolean enabled) { } } Loading Loading @@ -660,7 +660,7 @@ public abstract class IContextHubWrapper { return false; } public boolean supportsMicrophoneDisableSettingNotifications() { public boolean supportsMicrophoneSettingNotifications() { return false; } Loading @@ -679,7 +679,7 @@ public abstract class IContextHubWrapper { public void onAirplaneModeSettingChanged(boolean enabled) { } public void onMicrophoneDisableSettingChanged(boolean enabled) { public void onMicrophoneSettingChanged(boolean enabled) { } } Loading Loading @@ -721,7 +721,7 @@ public abstract class IContextHubWrapper { return true; } public boolean supportsMicrophoneDisableSettingNotifications() { public boolean supportsMicrophoneSettingNotifications() { return true; } Loading @@ -740,12 +740,9 @@ public abstract class IContextHubWrapper { enabled ? SettingValue.ENABLED : SettingValue.DISABLED); } public void onMicrophoneDisableSettingChanged(boolean enabled) { // 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. public void onMicrophoneSettingChanged(boolean enabled) { sendSettingChanged(android.hardware.contexthub.V1_2.Setting.MICROPHONE, enabled ? SettingValue.DISABLED : SettingValue.ENABLED); enabled ? SettingValue.ENABLED : SettingValue.DISABLED); } public void registerCallback(int contextHubId, ICallback callback) throws RemoteException { Loading