DrmHalTest.OfflineLicenseStateTest: search keySetId

Search for key set id instead of simply checking the number of total
offline licenses.

Fix LOG_TAG & remove clearkey specific comments from generic plugin
tests.

Bug: 118402843
Test: VtsHalDrmV1_2TargetTest
Change-Id: I245007317c813d5a8585d0a4ee29816b8f51ad3c
diff --git a/drm/1.2/vts/functional/drm_hal_test.cpp b/drm/1.2/vts/functional/drm_hal_test.cpp
index 067b5e4..6043391 100644
--- a/drm/1.2/vts/functional/drm_hal_test.cpp
+++ b/drm/1.2/vts/functional/drm_hal_test.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "drm_hal_clearkey_test@1.2"
+#define LOG_TAG "drm_hal_test@1.2"
 
 #include <gtest/gtest.h>
 #include <hidl/HidlSupport.h>
@@ -180,19 +180,36 @@
 }
 
 /**
- * Test clearkey plugin offline key support
+ * Test drm plugin offline key support
  */
 TEST_P(DrmHalTest, OfflineLicenseTest) {
     auto sessionId = openSession();
     hidl_vec<uint8_t> keySetId = loadKeys(sessionId, KeyType::OFFLINE);
 
-    auto res = drmPlugin->getOfflineLicenseKeySetIds(checkKeySetIds<Status::OK, 1u>);
+    auto res = drmPlugin->getOfflineLicenseKeySetIds(
+            [&](Status status, const hidl_vec<KeySetId>& keySetIds) {
+                bool found = false;
+                EXPECT_EQ(Status::OK, status);
+                for (KeySetId keySetId2: keySetIds) {
+                    if (keySetId == keySetId2) {
+                        found = true;
+                        break;
+                    }
+                }
+                EXPECT_TRUE(found) << "keySetId not found";
+            });
     EXPECT_OK(res);
 
     Status err = drmPlugin->removeOfflineLicense(keySetId);
     EXPECT_EQ(Status::OK, err);
 
-    res = drmPlugin->getOfflineLicenseKeySetIds(checkKeySetIds<Status::OK, 0u>);
+    res = drmPlugin->getOfflineLicenseKeySetIds(
+            [&](Status status, const hidl_vec<KeySetId>& keySetIds) {
+                EXPECT_EQ(Status::OK, status);
+                for (KeySetId keySetId2: keySetIds) {
+                    EXPECT_NE(keySetId, keySetId2);
+                }
+            });
     EXPECT_OK(res);
 
     err = drmPlugin->removeOfflineLicense(keySetId);
@@ -202,7 +219,7 @@
 }
 
 /**
- * Test clearkey plugin offline key state
+ * Test drm plugin offline key state
  */
 TEST_P(DrmHalTest, OfflineLicenseStateTest) {
     auto sessionId = openSession();