Fix ephemeral permissions test logic

Bug: 64561111
Test: make cts
Test: run cts -m CtsPermission2TestCases -t android.permission2.cts.PermissionPolicyTest --skip-connectivity-check -o
Change-Id: I5ce78b028d5f9ffe2ea753889545152af6bd9d8e
diff --git a/tests/tests/permission2/src/android/permission2/cts/PermissionPolicyTest.java b/tests/tests/permission2/src/android/permission2/cts/PermissionPolicyTest.java
index 0189408..2db61b4 100644
--- a/tests/tests/permission2/src/android/permission2/cts/PermissionPolicyTest.java
+++ b/tests/tests/permission2/src/android/permission2/cts/PermissionPolicyTest.java
@@ -151,7 +151,7 @@
         // OEMs cannot define new ephemeral permissions
         for (String permission : declaredPermissionsMap.keySet()) {
             PermissionInfo info = declaredPermissionsMap.get(permission);
-            if ((info.protectionLevel & PermissionInfo.PROTECTION_FLAG_EPHEMERAL) == 0) {
+            if ((info.protectionLevel & PermissionInfo.PROTECTION_FLAG_EPHEMERAL) != 0) {
                 offendingList.add("Cannot define new ephemeral permission " + permission);
             }
         }