Fixing bug in security vulnerability patch

The incorrect logical operator being used was causing unconditional
permission to be granted, which is the exact opposite of intended
behavior.

Bug: 70280642
Test: testEcAttestation_KeyStoreExceptionWhenRequestingUniqueId passes
Change-Id: I2f1ed9768f136003126fb59a7a4517a159ff978c
Merged-In: I2f1ed9768f136003126fb59a7a4517a159ff978c
(cherry picked from commit 670467d9a4be539ac1cb2a7eb1a41ce2524a24b2)
(cherry picked from commit fd8d014e0d0d35be1f6dfea4d8e3ad07468fc683)
diff --git a/keystore/key_store_service.cpp b/keystore/key_store_service.cpp
index be13a7b..f6786b8 100644
--- a/keystore/key_store_service.cpp
+++ b/keystore/key_store_service.cpp
@@ -705,9 +705,8 @@
         ALOGE("Non-system uid %d cannot set FLAG_CRITICAL_TO_DEVICE_ENCRYPTION", uid);
         return ResponseCode::PERMISSION_DENIED;
     }
-
     if (containsTag(params, Tag::INCLUDE_UNIQUE_ID)) {
-        if (!checkBinderPermission(P_GEN_UNIQUE_ID) &&
+        if (!checkBinderPermission(P_GEN_UNIQUE_ID) ||
               originalUid != IPCThreadState::self()->getCallingUid()) {
             return ResponseCode::PERMISSION_DENIED;
         }