From 6b0bd8f79fb37eb3d2d478731f3a2d6397d91a30 Mon Sep 17 00:00:00 2001 From: Anthony Stange Date: Fri, 1 Jul 2022 17:34:33 +0000 Subject: [PATCH] Add log when denying client authorization state This log will be printed when a test invokes the CLI command that allows denying specific packages access to a nanoapp to facilitate debugging. Bug: 243457763 Test: Load framework onto device and verify log is seen Merged-In: I04f245ac96e98f765d9f629019cd74838e4c1774 Change-Id: I04f245ac96e98f765d9f629019cd74838e4c1774 (cherry picked from commit 79b80c34cfe34d0d3b5def59b7da994b03c035a6) --- .../android/server/location/contexthub/ContextHubService.java | 3 +++ 1 file changed, 3 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 5b2188ac078e2..17638ccbe6cc1 100644 --- a/services/core/java/com/android/server/location/contexthub/ContextHubService.java +++ b/services/core/java/com/android/server/location/contexthub/ContextHubService.java @@ -1024,6 +1024,9 @@ public class ContextHubService extends IContextHubService.Stub { } /* package */ void denyClientAuthState(int contextHubId, String packageName, long nanoAppId) { + Log.i(TAG, "Denying " + packageName + " access to " + Long.toHexString(nanoAppId) + + " on context hub # " + contextHubId); + mClientManager.forEachClientOfHub(contextHubId, client -> { if (client.getPackageName().equals(packageName)) { client.updateNanoAppAuthState(