From 21a6f2d5db5751b09276e1a4d646a329d57e2cd0 Mon Sep 17 00:00:00 2001 From: karthik bharadwaj Date: Mon, 22 Mar 2021 12:25:18 -0700 Subject: [PATCH] Update Sending Settings Changed Notifications This CL updates piping settings changed notifications from the ContextHub HAL to CHRE by: - Supporting multi-user location settings by sending a notification on a user change - Sending a microphone access notification on a ContextHub HAL reset Bug: 183218234 Test: Test prerequisites - have 2 users (Owner, Guest) on device, default location settings on owner is enabled. - Change location setting to 'disabled' on Owner, observe that the settings change is propagated (via a log msg). - Change user to Guest, observe a location enabled notification (via a log msg) - Permutations of the above, observe correct behavior via log msgs. - Repeat on a different device for a consistency check Change-Id: Ib2bc7cac37ea4a0e0acdf0930df3a926b0efb1c2 --- .../android/server/location/contexthub/ContextHubService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/core/java/com/android/server/location/contexthub/ContextHubService.java b/services/core/java/com/android/server/location/contexthub/ContextHubService.java index c44089b7817f7..f173fc7386bae 100644 --- a/services/core/java/com/android/server/location/contexthub/ContextHubService.java +++ b/services/core/java/com/android/server/location/contexthub/ContextHubService.java @@ -691,6 +691,7 @@ public class ContextHubService extends IContextHubService.Stub { sendLocationSettingUpdate(); sendWifiSettingUpdate(true /* forceUpdate */); sendAirplaneModeSettingUpdate(); + sendMicrophoneDisableSettingUpdateForCurrentUser(); mTransactionManager.onHubReset(); queryNanoAppsInternal(contextHubId); @@ -1123,6 +1124,7 @@ public class ContextHubService extends IContextHubService.Stub { */ public void onUserChanged() { Log.d(TAG, "User changed to id: " + getCurrentUserId()); + sendLocationSettingUpdate(); sendMicrophoneDisableSettingUpdateForCurrentUser(); } }