summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-10-01 22:42:11 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-10-01 22:42:11 +0000
commitbfbf5b364e2a98b78f6f53faafc8408ca4cd5200 (patch)
tree963fa750731a7c92858edd06fb56f84152050643
parentfc0806fb2eefa10ba2b962f291b3b3688b531ee8 (diff)
parente8a0442b0842021547aaf9918072a023098d8c39 (diff)
Merge "Add log message for nanoapp auth errors" into main
-rw-r--r--services/core/java/com/android/server/location/contexthub/ContextHubClientBroker.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/location/contexthub/ContextHubClientBroker.java b/services/core/java/com/android/server/location/contexthub/ContextHubClientBroker.java
index 91a4d6f1707f..598901e33305 100644
--- a/services/core/java/com/android/server/location/contexthub/ContextHubClientBroker.java
+++ b/services/core/java/com/android/server/location/contexthub/ContextHubClientBroker.java
@@ -764,6 +764,7 @@ public class ContextHubClientBroker extends IContextHubClient.Stub
boolean hasPermissions(List<String> permissions) {
for (String permission : permissions) {
if (mContext.checkPermission(permission, mPid, mUid) != PERMISSION_GRANTED) {
+ Log.e(TAG, "no permission for " + permission);
return false;
}
}
@@ -919,6 +920,14 @@ public class ContextHubClientBroker extends IContextHubClient.Stub
}
}
if (curAuthState != newAuthState) {
+ if (newAuthState == AUTHORIZATION_DENIED
+ || newAuthState == AUTHORIZATION_DENIED_GRACE_PERIOD) {
+ Log.e(TAG, "updateNanoAppAuthState auth error: "
+ + Long.toHexString(nanoAppId) + ", "
+ + nanoappPermissions + ", "
+ + gracePeriodExpired + ", "
+ + forceDenied);
+ }
// Don't send the callback in the synchronized block or it could end up in a deadlock.
sendAuthStateCallback(nanoAppId, newAuthState);
}