Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8a0442b authored by Chia-Chi Teng's avatar Chia-Chi Teng
Browse files

Add log message for nanoapp auth errors

Flag: EXEMPT log only update
Bug: 339102088
Test: on device
Change-Id: Iba7b22d65753ca68c5bd7b0c77929f07a1122e1b
parent 27c2d996
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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);
        }