[LSC] Add LOCAL_LICENSE_KINDS to system/libhidl

Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  adapter/Android.bp
  libhidlmemory/Android.bp
  minijail/Android.bp
  transport/Android.bp
  transport/allocator/1.0/Android.bp
  transport/allocator/1.0/default/Android.bp
  transport/allocator/1.0/utils/Android.bp
  transport/allocator/1.0/vts/functional/Android.bp
  transport/base/1.0/Android.bp
  transport/base/1.0/vts/functional/Android.bp
  transport/manager/1.0/Android.bp
  transport/manager/1.1/Android.bp
  transport/manager/1.2/Android.bp
  transport/memory/1.0/Android.bp
  transport/memory/1.0/default/Android.bp
  transport/memory/block/1.0/Android.bp
  transport/memory/token/1.0/Android.bp
  transport/safe_union/1.0/Android.bp
  transport/token/1.0/Android.bp
  transport/token/1.0/utils/Android.bp
  vintfdata/Android.mk

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I2a7ef0ec44c7b087eb00ed2bdfc4940d07f7a148
diff --git a/Android.bp b/Android.bp
index 034919e..33ba0e9 100644
--- a/Android.bp
+++ b/Android.bp
@@ -12,6 +12,23 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
+// Added automatically by a large-scale-change
+// See: http://go/android-license-faq
+license {
+    name: "system_libhidl_license",
+    visibility: [":__subpackages__"],
+    license_kinds: [
+        "SPDX-license-identifier-Apache-2.0",
+    ],
+    license_text: [
+        "NOTICE",
+    ],
+}
+
 cc_defaults {
     name: "libhidl-defaults",
     cflags: [
diff --git a/adapter/Android.bp b/adapter/Android.bp
index 3dc382e..83609ff 100644
--- a/adapter/Android.bp
+++ b/adapter/Android.bp
@@ -12,6 +12,15 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 cc_library {
     name: "libhidladapter",
     defaults: ["libhidl-defaults"],
@@ -34,4 +43,3 @@
         "libutils",
     ],
 }
-
diff --git a/libhidlmemory/Android.bp b/libhidlmemory/Android.bp
index 547be11..fc5770c 100644
--- a/libhidlmemory/Android.bp
+++ b/libhidlmemory/Android.bp
@@ -12,6 +12,15 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 cc_library {
     name: "libhidlmemory",
     vendor_available: true,
diff --git a/minijail/Android.bp b/minijail/Android.bp
index 83db2d9..ad12dad 100644
--- a/minijail/Android.bp
+++ b/minijail/Android.bp
@@ -1,6 +1,15 @@
 // TODO(b/110363419): remove or make failures harder
 // Deprecated: most minijail users should either use libavservices_minijail
 // or reinstitute this (w/ fatal checks).
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 cc_library_shared {
     name: "libhwminijail",
     defaults: ["hidl_defaults"],
diff --git a/transport/Android.bp b/transport/Android.bp
index 86603ee..10f31a7 100644
--- a/transport/Android.bp
+++ b/transport/Android.bp
@@ -12,6 +12,15 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 hidl_package_root {
     name: "android.hidl",
 }
diff --git a/transport/allocator/1.0/Android.bp b/transport/allocator/1.0/Android.bp
index 2e93a6f..0cc3b62 100644
--- a/transport/allocator/1.0/Android.bp
+++ b/transport/allocator/1.0/Android.bp
@@ -1,5 +1,14 @@
 // This file is autogenerated by hidl-gen -Landroidbp.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 hidl_interface {
     name: "android.hidl.allocator@1.0",
     root: "android.hidl",
diff --git a/transport/allocator/1.0/default/Android.bp b/transport/allocator/1.0/default/Android.bp
index 1116f1d..42abe9c 100644
--- a/transport/allocator/1.0/default/Android.bp
+++ b/transport/allocator/1.0/default/Android.bp
@@ -12,6 +12,15 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 cc_binary {
     name: "android.hidl.allocator@1.0-service",
     relative_install_path: "hw",
diff --git a/transport/allocator/1.0/utils/Android.bp b/transport/allocator/1.0/utils/Android.bp
index b324ef1..f21047d 100644
--- a/transport/allocator/1.0/utils/Android.bp
+++ b/transport/allocator/1.0/utils/Android.bp
@@ -12,6 +12,15 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 cc_library {
     name: "libhidlallocatorutils",
     vendor_available: true,
diff --git a/transport/allocator/1.0/vts/functional/Android.bp b/transport/allocator/1.0/vts/functional/Android.bp
index e170ce0..f53fc4f 100644
--- a/transport/allocator/1.0/vts/functional/Android.bp
+++ b/transport/allocator/1.0/vts/functional/Android.bp
@@ -14,6 +14,15 @@
 // limitations under the License.
 //
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 cc_test {
     name: "VtsHidlAllocatorV1_0TargetTest",
     defaults: ["VtsHalTargetTestDefaults"],
diff --git a/transport/base/1.0/Android.bp b/transport/base/1.0/Android.bp
index 61e5eda..461f7e7 100644
--- a/transport/base/1.0/Android.bp
+++ b/transport/base/1.0/Android.bp
@@ -1,5 +1,14 @@
 // This file is autogenerated by hidl-gen -Landroidbp.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 hidl_interface {
     name: "android.hidl.base@1.0",
     root: "android.hidl",
diff --git a/transport/base/1.0/vts/functional/Android.bp b/transport/base/1.0/vts/functional/Android.bp
index 0c814ae..f25aaaa 100644
--- a/transport/base/1.0/vts/functional/Android.bp
+++ b/transport/base/1.0/vts/functional/Android.bp
@@ -12,6 +12,15 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 cc_test {
     name: "vts_ibase_test",
     defaults: ["libinit_test_utils_libraries_defaults"],
diff --git a/transport/manager/1.0/Android.bp b/transport/manager/1.0/Android.bp
index b0d2eee..4a84b86 100644
--- a/transport/manager/1.0/Android.bp
+++ b/transport/manager/1.0/Android.bp
@@ -1,5 +1,14 @@
 // This file is autogenerated by hidl-gen -Landroidbp.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 hidl_interface {
     name: "android.hidl.manager@1.0",
     root: "android.hidl",
diff --git a/transport/manager/1.1/Android.bp b/transport/manager/1.1/Android.bp
index d3fbe7f..c9e22c9 100644
--- a/transport/manager/1.1/Android.bp
+++ b/transport/manager/1.1/Android.bp
@@ -1,5 +1,14 @@
 // This file is autogenerated by hidl-gen -Landroidbp.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 hidl_interface {
     name: "android.hidl.manager@1.1",
     root: "android.hidl",
diff --git a/transport/manager/1.2/Android.bp b/transport/manager/1.2/Android.bp
index 75d7a07..a58c12e 100644
--- a/transport/manager/1.2/Android.bp
+++ b/transport/manager/1.2/Android.bp
@@ -1,5 +1,14 @@
 // This file is autogenerated by hidl-gen -Landroidbp.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 hidl_interface {
     name: "android.hidl.manager@1.2",
     root: "android.hidl",
diff --git a/transport/memory/1.0/Android.bp b/transport/memory/1.0/Android.bp
index 4fd00c0..8e066a9 100644
--- a/transport/memory/1.0/Android.bp
+++ b/transport/memory/1.0/Android.bp
@@ -1,5 +1,14 @@
 // This file is autogenerated by hidl-gen -Landroidbp.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 hidl_interface {
     name: "android.hidl.memory@1.0",
     root: "android.hidl",
diff --git a/transport/memory/1.0/default/Android.bp b/transport/memory/1.0/default/Android.bp
index f56ee95..a44a0db 100644
--- a/transport/memory/1.0/default/Android.bp
+++ b/transport/memory/1.0/default/Android.bp
@@ -12,6 +12,15 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 cc_library_shared {
     name: "android.hidl.memory@1.0-impl",
     vendor_available: true,
diff --git a/transport/memory/block/1.0/Android.bp b/transport/memory/block/1.0/Android.bp
index 86c29bc..bfaf139 100644
--- a/transport/memory/block/1.0/Android.bp
+++ b/transport/memory/block/1.0/Android.bp
@@ -1,5 +1,14 @@
 // This file is autogenerated by hidl-gen -Landroidbp.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 hidl_interface {
     name: "android.hidl.memory.block@1.0",
     root: "android.hidl",
diff --git a/transport/memory/token/1.0/Android.bp b/transport/memory/token/1.0/Android.bp
index a42f786..c304284 100644
--- a/transport/memory/token/1.0/Android.bp
+++ b/transport/memory/token/1.0/Android.bp
@@ -1,5 +1,14 @@
 // This file is autogenerated by hidl-gen -Landroidbp.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 hidl_interface {
     name: "android.hidl.memory.token@1.0",
     root: "android.hidl",
diff --git a/transport/safe_union/1.0/Android.bp b/transport/safe_union/1.0/Android.bp
index d0aa348..cae92dd 100644
--- a/transport/safe_union/1.0/Android.bp
+++ b/transport/safe_union/1.0/Android.bp
@@ -1,5 +1,14 @@
 // This file is autogenerated by hidl-gen -Landroidbp.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 hidl_interface {
     name: "android.hidl.safe_union@1.0",
     root: "android.hidl",
diff --git a/transport/token/1.0/Android.bp b/transport/token/1.0/Android.bp
index 0a7d3c2..8bda482 100644
--- a/transport/token/1.0/Android.bp
+++ b/transport/token/1.0/Android.bp
@@ -1,5 +1,14 @@
 // This file is autogenerated by hidl-gen -Landroidbp.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 hidl_interface {
     name: "android.hidl.token@1.0",
     root: "android.hidl",
diff --git a/transport/token/1.0/utils/Android.bp b/transport/token/1.0/utils/Android.bp
index f9a4623..84f6f0f 100644
--- a/transport/token/1.0/utils/Android.bp
+++ b/transport/token/1.0/utils/Android.bp
@@ -12,6 +12,15 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "system_libhidl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["system_libhidl_license"],
+}
+
 cc_library {
     name: "android.hidl.token@1.0-utils",
     defaults: ["libhidl-defaults"],
diff --git a/vintfdata/Android.mk b/vintfdata/Android.mk
index a7721c2..4c5cca5 100644
--- a/vintfdata/Android.mk
+++ b/vintfdata/Android.mk
@@ -48,6 +48,9 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE        := vendor_compatibility_matrix.xml
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE   := $(LOCAL_PATH)/../NOTICE
 LOCAL_MODULE_STEM   := compatibility_matrix.xml
 LOCAL_MODULE_CLASS  := ETC
 LOCAL_MODULE_PATH   := $(TARGET_OUT_VENDOR)/etc/vintf
@@ -69,6 +72,9 @@
 # System Manifest
 include $(CLEAR_VARS)
 LOCAL_MODULE        := system_manifest.xml
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE   := $(LOCAL_PATH)/../NOTICE
 LOCAL_MODULE_STEM   := manifest.xml
 LOCAL_MODULE_CLASS  := ETC
 LOCAL_MODULE_PATH   := $(TARGET_OUT)/etc/vintf
@@ -89,6 +95,9 @@
 ifneq ($(PRODUCT_MANIFEST_FILES),)
 include $(CLEAR_VARS)
 LOCAL_MODULE := product_manifest.xml
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
 LOCAL_MODULE_STEM := manifest.xml
 LOCAL_MODULE_CLASS := ETC
 LOCAL_PRODUCT_MODULE := true
@@ -107,6 +116,9 @@
 # System_ext Manifest
 include $(CLEAR_VARS)
 LOCAL_MODULE := system_ext_manifest.xml
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
 LOCAL_MODULE_STEM := manifest.xml
 LOCAL_MODULE_CLASS := ETC
 LOCAL_SYSTEM_EXT_MODULE := true