Revert "Separate hdcp levels into a base interface"

Revert submission 3283232-cherrypicker-L65300030006744043:N33800030107981038

Reason for revert: Droidmonitor created revert due to b/370755706. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:3283232-cherrypicker-L65300030006744043:N33800030107981038

Change-Id: I574abf94fcc5b503388e5b7bf377bfdb88b6f39e
diff --git a/drm/aidl/Android.bp b/drm/aidl/Android.bp
index 99780dc..afcb603 100644
--- a/drm/aidl/Android.bp
+++ b/drm/aidl/Android.bp
@@ -14,7 +14,6 @@
     stability: "vintf",
     imports: [
         "android.hardware.common-V2",
-        "android.hardware.drm.common-V1",
     ],
     backend: {
         cpp: {
@@ -31,10 +30,7 @@
     versions_with_info: [
         {
             version: "1",
-            imports: [
-                "android.hardware.common-V2",
-                "android.hardware.drm.common-V1",
-            ],
+            imports: ["android.hardware.common-V2"],
         },
     ],
 
diff --git a/drm/aidl/aidl_api/android.hardware.drm/1/.hash b/drm/aidl/aidl_api/android.hardware.drm/1/.hash
index 9a735e9..886e28c 100644
--- a/drm/aidl/aidl_api/android.hardware.drm/1/.hash
+++ b/drm/aidl/aidl_api/android.hardware.drm/1/.hash
@@ -1,2 +1 @@
 7b4b0a0f36a7a6bb22d2016375e4a9d4a033592f
-3a0197fb44863256da9034c26e721b1eee12d1be
diff --git a/drm/common/aidl/aidl_api/android.hardware.drm.common/1/android/hardware/drm/HdcpLevel.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/HdcpLevel.aidl
similarity index 92%
rename from drm/common/aidl/aidl_api/android.hardware.drm.common/1/android/hardware/drm/HdcpLevel.aidl
rename to drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/HdcpLevel.aidl
index 118bef6..5704fb0 100644
--- a/drm/common/aidl/aidl_api/android.hardware.drm.common/1/android/hardware/drm/HdcpLevel.aidl
+++ b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/HdcpLevel.aidl
@@ -34,12 +34,12 @@
 package android.hardware.drm;
 @Backing(type="int") @VintfStability
 enum HdcpLevel {
-  HDCP_UNKNOWN,
-  HDCP_NONE,
-  HDCP_V1,
-  HDCP_V2,
-  HDCP_V2_1,
-  HDCP_V2_2,
-  HDCP_NO_OUTPUT,
-  HDCP_V2_3,
+  HDCP_UNKNOWN = 0,
+  HDCP_NONE = 1,
+  HDCP_V1 = 2,
+  HDCP_V2 = 3,
+  HDCP_V2_1 = 4,
+  HDCP_V2_2 = 5,
+  HDCP_NO_OUTPUT = 6,
+  HDCP_V2_3 = 7,
 }
diff --git a/drm/common/aidl/aidl_api/android.hardware.drm.common/1/android/hardware/drm/HdcpLevels.aidl b/drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/HdcpLevels.aidl
similarity index 100%
rename from drm/common/aidl/aidl_api/android.hardware.drm.common/1/android/hardware/drm/HdcpLevels.aidl
rename to drm/aidl/aidl_api/android.hardware.drm/1/android/hardware/drm/HdcpLevels.aidl
diff --git a/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/EventType.aidl b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/EventType.aidl
index f09eadd..80ebb28 100644
--- a/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/EventType.aidl
+++ b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/EventType.aidl
@@ -34,9 +34,9 @@
 package android.hardware.drm;
 @Backing(type="int") @VintfStability
 enum EventType {
-  PROVISION_REQUIRED,
-  KEY_NEEDED,
-  KEY_EXPIRED,
-  VENDOR_DEFINED,
-  SESSION_RECLAIMED,
+  PROVISION_REQUIRED = 0,
+  KEY_NEEDED = 1,
+  KEY_EXPIRED = 2,
+  VENDOR_DEFINED = 3,
+  SESSION_RECLAIMED = 4,
 }
diff --git a/drm/common/aidl/aidl_api/android.hardware.drm.common/1/android/hardware/drm/HdcpLevel.aidl b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/HdcpLevel.aidl
similarity index 92%
copy from drm/common/aidl/aidl_api/android.hardware.drm.common/1/android/hardware/drm/HdcpLevel.aidl
copy to drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/HdcpLevel.aidl
index 118bef6..5704fb0 100644
--- a/drm/common/aidl/aidl_api/android.hardware.drm.common/1/android/hardware/drm/HdcpLevel.aidl
+++ b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/HdcpLevel.aidl
@@ -34,12 +34,12 @@
 package android.hardware.drm;
 @Backing(type="int") @VintfStability
 enum HdcpLevel {
-  HDCP_UNKNOWN,
-  HDCP_NONE,
-  HDCP_V1,
-  HDCP_V2,
-  HDCP_V2_1,
-  HDCP_V2_2,
-  HDCP_NO_OUTPUT,
-  HDCP_V2_3,
+  HDCP_UNKNOWN = 0,
+  HDCP_NONE = 1,
+  HDCP_V1 = 2,
+  HDCP_V2 = 3,
+  HDCP_V2_1 = 4,
+  HDCP_V2_2 = 5,
+  HDCP_NO_OUTPUT = 6,
+  HDCP_V2_3 = 7,
 }
diff --git a/drm/common/aidl/aidl_api/android.hardware.drm.common/current/android/hardware/drm/HdcpLevels.aidl b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/HdcpLevels.aidl
similarity index 100%
rename from drm/common/aidl/aidl_api/android.hardware.drm.common/current/android/hardware/drm/HdcpLevels.aidl
rename to drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/HdcpLevels.aidl
diff --git a/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/KeyRequestType.aidl b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/KeyRequestType.aidl
index 556ee38..34b9615 100644
--- a/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/KeyRequestType.aidl
+++ b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/KeyRequestType.aidl
@@ -34,10 +34,10 @@
 package android.hardware.drm;
 @Backing(type="int") @VintfStability
 enum KeyRequestType {
-  INITIAL,
-  RENEWAL,
-  RELEASE,
-  UNKNOWN,
-  NONE,
-  UPDATE,
+  INITIAL = 0,
+  RENEWAL = 1,
+  RELEASE = 2,
+  UNKNOWN = 3,
+  NONE = 4,
+  UPDATE = 5,
 }
diff --git a/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/KeyStatusType.aidl b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/KeyStatusType.aidl
index 5a46552..261516f 100644
--- a/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/KeyStatusType.aidl
+++ b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/KeyStatusType.aidl
@@ -34,10 +34,10 @@
 package android.hardware.drm;
 @Backing(type="int") @VintfStability
 enum KeyStatusType {
-  USABLE,
-  EXPIRED,
-  OUTPUT_NOT_ALLOWED,
-  STATUS_PENDING,
-  INTERNAL_ERROR,
-  USABLE_IN_FUTURE,
+  USABLE = 0,
+  EXPIRED = 1,
+  OUTPUT_NOT_ALLOWED = 2,
+  STATUS_PENDING = 3,
+  INTERNAL_ERROR = 4,
+  USABLE_IN_FUTURE = 5,
 }
diff --git a/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/KeyType.aidl b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/KeyType.aidl
index e677c86..7a9d633 100644
--- a/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/KeyType.aidl
+++ b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/KeyType.aidl
@@ -34,7 +34,7 @@
 package android.hardware.drm;
 @Backing(type="int") @VintfStability
 enum KeyType {
-  OFFLINE,
-  STREAMING,
-  RELEASE,
+  OFFLINE = 0,
+  STREAMING = 1,
+  RELEASE = 2,
 }
diff --git a/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/LogPriority.aidl b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/LogPriority.aidl
index b77ddf6..83362c3 100644
--- a/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/LogPriority.aidl
+++ b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/LogPriority.aidl
@@ -34,12 +34,12 @@
 package android.hardware.drm;
 @Backing(type="int") @VintfStability
 enum LogPriority {
-  UNKNOWN,
-  DEFAULT,
-  VERBOSE,
-  DEBUG,
-  INFO,
-  WARN,
-  ERROR,
-  FATAL,
+  UNKNOWN = 0,
+  DEFAULT = 1,
+  VERBOSE = 2,
+  DEBUG = 3,
+  INFO = 4,
+  WARN = 5,
+  ERROR = 6,
+  FATAL = 7,
 }
diff --git a/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/OfflineLicenseState.aidl b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/OfflineLicenseState.aidl
index be0e822..629564d 100644
--- a/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/OfflineLicenseState.aidl
+++ b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/OfflineLicenseState.aidl
@@ -34,7 +34,7 @@
 package android.hardware.drm;
 @Backing(type="int") @VintfStability
 enum OfflineLicenseState {
-  UNKNOWN,
-  USABLE,
-  INACTIVE,
+  UNKNOWN = 0,
+  USABLE = 1,
+  INACTIVE = 2,
 }
diff --git a/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/SecurityLevel.aidl b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/SecurityLevel.aidl
index 87b3641..65b2b9d 100644
--- a/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/SecurityLevel.aidl
+++ b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/SecurityLevel.aidl
@@ -34,11 +34,11 @@
 package android.hardware.drm;
 @Backing(type="int") @VintfStability
 enum SecurityLevel {
-  UNKNOWN,
-  SW_SECURE_CRYPTO,
-  SW_SECURE_DECODE,
-  HW_SECURE_CRYPTO,
-  HW_SECURE_DECODE,
-  HW_SECURE_ALL,
-  DEFAULT,
+  UNKNOWN = 0,
+  SW_SECURE_CRYPTO = 1,
+  SW_SECURE_DECODE = 2,
+  HW_SECURE_CRYPTO = 3,
+  HW_SECURE_DECODE = 4,
+  HW_SECURE_ALL = 5,
+  DEFAULT = 6,
 }
diff --git a/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/Status.aidl b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/Status.aidl
index a3ba6c3..c640689 100644
--- a/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/Status.aidl
+++ b/drm/aidl/aidl_api/android.hardware.drm/current/android/hardware/drm/Status.aidl
@@ -34,44 +34,44 @@
 package android.hardware.drm;
 @Backing(type="int") @VintfStability
 enum Status {
-  OK,
-  ERROR_DRM_NO_LICENSE,
-  ERROR_DRM_LICENSE_EXPIRED,
-  ERROR_DRM_SESSION_NOT_OPENED,
-  ERROR_DRM_CANNOT_HANDLE,
-  ERROR_DRM_INVALID_STATE,
-  BAD_VALUE,
-  ERROR_DRM_NOT_PROVISIONED,
-  ERROR_DRM_RESOURCE_BUSY,
-  ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION,
-  ERROR_DRM_DEVICE_REVOKED,
-  ERROR_DRM_DECRYPT,
-  ERROR_DRM_UNKNOWN,
-  ERROR_DRM_INSUFFICIENT_SECURITY,
-  ERROR_DRM_FRAME_TOO_LARGE,
-  ERROR_DRM_SESSION_LOST_STATE,
-  ERROR_DRM_RESOURCE_CONTENTION,
-  CANNOT_DECRYPT_ZERO_SUBSAMPLES,
-  CRYPTO_LIBRARY_ERROR,
-  GENERAL_OEM_ERROR,
-  GENERAL_PLUGIN_ERROR,
-  INIT_DATA_INVALID,
-  KEY_NOT_LOADED,
-  LICENSE_PARSE_ERROR,
-  LICENSE_POLICY_ERROR,
-  LICENSE_RELEASE_ERROR,
-  LICENSE_REQUEST_REJECTED,
-  LICENSE_RESTORE_ERROR,
-  LICENSE_STATE_ERROR,
-  MALFORMED_CERTIFICATE,
-  MEDIA_FRAMEWORK_ERROR,
-  MISSING_CERTIFICATE,
-  PROVISIONING_CERTIFICATE_ERROR,
-  PROVISIONING_CONFIGURATION_ERROR,
-  PROVISIONING_PARSE_ERROR,
-  PROVISIONING_REQUEST_REJECTED,
-  RETRYABLE_PROVISIONING_ERROR,
-  SECURE_STOP_RELEASE_ERROR,
-  STORAGE_READ_FAILURE,
-  STORAGE_WRITE_FAILURE,
+  OK = 0,
+  ERROR_DRM_NO_LICENSE = 1,
+  ERROR_DRM_LICENSE_EXPIRED = 2,
+  ERROR_DRM_SESSION_NOT_OPENED = 3,
+  ERROR_DRM_CANNOT_HANDLE = 4,
+  ERROR_DRM_INVALID_STATE = 5,
+  BAD_VALUE = 6,
+  ERROR_DRM_NOT_PROVISIONED = 7,
+  ERROR_DRM_RESOURCE_BUSY = 8,
+  ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION = 9,
+  ERROR_DRM_DEVICE_REVOKED = 10,
+  ERROR_DRM_DECRYPT = 11,
+  ERROR_DRM_UNKNOWN = 12,
+  ERROR_DRM_INSUFFICIENT_SECURITY = 13,
+  ERROR_DRM_FRAME_TOO_LARGE = 14,
+  ERROR_DRM_SESSION_LOST_STATE = 15,
+  ERROR_DRM_RESOURCE_CONTENTION = 16,
+  CANNOT_DECRYPT_ZERO_SUBSAMPLES = 17,
+  CRYPTO_LIBRARY_ERROR = 18,
+  GENERAL_OEM_ERROR = 19,
+  GENERAL_PLUGIN_ERROR = 20,
+  INIT_DATA_INVALID = 21,
+  KEY_NOT_LOADED = 22,
+  LICENSE_PARSE_ERROR = 23,
+  LICENSE_POLICY_ERROR = 24,
+  LICENSE_RELEASE_ERROR = 25,
+  LICENSE_REQUEST_REJECTED = 26,
+  LICENSE_RESTORE_ERROR = 27,
+  LICENSE_STATE_ERROR = 28,
+  MALFORMED_CERTIFICATE = 29,
+  MEDIA_FRAMEWORK_ERROR = 30,
+  MISSING_CERTIFICATE = 31,
+  PROVISIONING_CERTIFICATE_ERROR = 32,
+  PROVISIONING_CONFIGURATION_ERROR = 33,
+  PROVISIONING_PARSE_ERROR = 34,
+  PROVISIONING_REQUEST_REJECTED = 35,
+  RETRYABLE_PROVISIONING_ERROR = 36,
+  SECURE_STOP_RELEASE_ERROR = 37,
+  STORAGE_READ_FAILURE = 38,
+  STORAGE_WRITE_FAILURE = 39,
 }
diff --git a/drm/common/aidl/android/hardware/drm/HdcpLevel.aidl b/drm/aidl/android/hardware/drm/HdcpLevel.aidl
similarity index 100%
rename from drm/common/aidl/android/hardware/drm/HdcpLevel.aidl
rename to drm/aidl/android/hardware/drm/HdcpLevel.aidl
diff --git a/drm/common/aidl/android/hardware/drm/HdcpLevels.aidl b/drm/aidl/android/hardware/drm/HdcpLevels.aidl
similarity index 100%
rename from drm/common/aidl/android/hardware/drm/HdcpLevels.aidl
rename to drm/aidl/android/hardware/drm/HdcpLevels.aidl
diff --git a/drm/aidl/vts/Android.bp b/drm/aidl/vts/Android.bp
index 27ce0d7..5139036 100644
--- a/drm/aidl/vts/Android.bp
+++ b/drm/aidl/vts/Android.bp
@@ -47,7 +47,6 @@
     ],
     static_libs: [
         "android.hardware.drm@1.0-helper",
-        "android.hardware.drm.common-V1-ndk",
         "android.hardware.drm-V1-ndk",
         "android.hardware.common-V2-ndk",
         "libaidlcommonsupport",
@@ -60,19 +59,13 @@
             data: [":libvtswidevine-arm-prebuilts"],
         },
         arm64: {
-            data: [
-                ":libvtswidevine-arm64-prebuilts",
-                ":libvtswidevine-arm-prebuilts",
-            ],
+            data: [":libvtswidevine-arm64-prebuilts", ":libvtswidevine-arm-prebuilts"],
         },
         x86: {
             data: [":libvtswidevine-x86-prebuilts"],
         },
         x86_64: {
-            data: [
-                ":libvtswidevine-x86_64-prebuilts",
-                ":libvtswidevine-x86-prebuilts",
-            ],
+            data: [":libvtswidevine-x86_64-prebuilts", ":libvtswidevine-x86-prebuilts"],
         },
     },
     test_suites: [
diff --git a/drm/common/aidl/Android.bp b/drm/common/aidl/Android.bp
deleted file mode 100644
index 1e4b8e0..0000000
--- a/drm/common/aidl/Android.bp
+++ /dev/null
@@ -1,35 +0,0 @@
-package {
-    // See: http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // all of the 'license_kinds' from "hardware_interfaces_license"
-    // to get the below license kinds:
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["hardware_interfaces_license"],
-}
-
-aidl_interface {
-    name: "android.hardware.drm.common",
-    vendor_available: true,
-    srcs: ["android/hardware/drm/*.aidl"],
-    stability: "vintf",
-    backend: {
-        cpp: {
-            enabled: false,
-        },
-        java: {
-            sdk_version: "module_current",
-        },
-        ndk: {
-            min_sdk_version: "34",
-        },
-    },
-    double_loadable: true,
-    versions_with_info: [
-        {
-            version: "1",
-            imports: [],
-        },
-    ],
-    frozen: true,
-
-}
diff --git a/drm/common/aidl/aidl_api/android.hardware.drm.common/1/.hash b/drm/common/aidl/aidl_api/android.hardware.drm.common/1/.hash
deleted file mode 100644
index 66690e1..0000000
--- a/drm/common/aidl/aidl_api/android.hardware.drm.common/1/.hash
+++ /dev/null
@@ -1 +0,0 @@
-1b5e9159609b3aa05e2c7158f3a1488fda2250d1
diff --git a/drm/common/aidl/aidl_api/android.hardware.drm.common/current/android/hardware/drm/HdcpLevel.aidl b/drm/common/aidl/aidl_api/android.hardware.drm.common/current/android/hardware/drm/HdcpLevel.aidl
deleted file mode 100644
index 118bef6..0000000
--- a/drm/common/aidl/aidl_api/android.hardware.drm.common/current/android/hardware/drm/HdcpLevel.aidl
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-//     the interface (from the latest frozen version), the build system will
-//     prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.drm;
-@Backing(type="int") @VintfStability
-enum HdcpLevel {
-  HDCP_UNKNOWN,
-  HDCP_NONE,
-  HDCP_V1,
-  HDCP_V2,
-  HDCP_V2_1,
-  HDCP_V2_2,
-  HDCP_NO_OUTPUT,
-  HDCP_V2_3,
-}