Fixing bug in security vulnerability patch
am: 1e6d4bfd3e

Change-Id: I7f603c34b5c3187d7d1b6dda12e4a3a87fa0e653
diff --git a/keystore/key_store_service.cpp b/keystore/key_store_service.cpp
index 5d505ae..4cca5ae 100644
--- a/keystore/key_store_service.cpp
+++ b/keystore/key_store_service.cpp
@@ -703,9 +703,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;
         }