Fixing bug in security vulnerability patch
am: fd8d014e0d

Change-Id: I2c2c2fff90e4da65d50a19200c5643d612b711f5
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;
         }