Snap for 7160059 from 218e0c7bd90062736d7a271b3716c472588d59a5 to sc-v2-release

Change-Id: Ib888ecf20b7da47e09e0f0bc04e6b36b4c76e8cb
diff --git a/Android.bp b/Android.bp
index 3ac123e..ebdd254 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,5 +1,35 @@
 // Copyright 2006 The Android Open Source Project
 
+package {
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
+// Added automatically by a large-scale-change that took the approach of
+// 'apply every license found to every target'. While this makes sure we respect
+// every license restriction, it may not be entirely correct.
+//
+// e.g. GPL in an MIT project might only apply to the contrib/ directory.
+//
+// Please consider splitting the single license below into multiple licenses,
+// taking care not to lose any license_kind information, and overriding the
+// default license using the 'licenses: [...]' property on targets as needed.
+//
+// For unused files, consider creating a 'fileGroup' with "//visibility:private"
+// to attach the license to, and including a comment whether the files may be
+// used in the current project.
+// See: http://go/android-license-faq
+license {
+    name: "hardware_libhardware_license",
+    visibility: [":__subpackages__"],
+    license_kinds: [
+        "SPDX-license-identifier-Apache-2.0",
+        "SPDX-license-identifier-BSD",
+    ],
+    license_text: [
+        "NOTICE",
+    ],
+}
+
 cc_library_headers {
     name: "libhardware_headers",
     header_libs: [
diff --git a/modules/audio/Android.bp b/modules/audio/Android.bp
index a7467c2..1b34336 100644
--- a/modules/audio/Android.bp
+++ b/modules/audio/Android.bp
@@ -18,6 +18,15 @@
 //
 // The format of the name is audio.<type>.<hardware/etc>.so where the only
 // required type is 'primary'. Other possibilites are 'a2dp', 'usb', etc.
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "audio.primary.default",
     relative_install_path: "hw",
diff --git a/modules/audio_remote_submix/Android.bp b/modules/audio_remote_submix/Android.bp
index 9523438..53555f5 100644
--- a/modules/audio_remote_submix/Android.bp
+++ b/modules/audio_remote_submix/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 "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "audio.r_submix.default",
     relative_install_path: "hw",
diff --git a/modules/audio_remote_submix/tests/Android.bp b/modules/audio_remote_submix/tests/Android.bp
index 8e4d42d..490a402 100644
--- a/modules/audio_remote_submix/tests/Android.bp
+++ b/modules/audio_remote_submix/tests/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 "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_test {
     name: "r_submix_tests",
 
diff --git a/modules/camera/3_0/Android.bp b/modules/camera/3_0/Android.bp
index 6d6d1d7..d8aac4f 100644
--- a/modules/camera/3_0/Android.bp
+++ b/modules/camera/3_0/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 "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "camera.default",
     relative_install_path: "hw",
diff --git a/modules/camera/3_4/Android.mk b/modules/camera/3_4/Android.mk
index 0a11f68..7c8eee1 100644
--- a/modules/camera/3_4/Android.mk
+++ b/modules/camera/3_4/Android.mk
@@ -88,6 +88,9 @@
 # ==============================================================================
 include $(CLEAR_VARS)
 LOCAL_MODULE := camera.v4l2
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
 LOCAL_MODULE_RELATIVE_PATH := hw
 LOCAL_CFLAGS += $(v4l2_cflags)
 LOCAL_SHARED_LIBRARIES := $(v4l2_shared_libs)
@@ -103,6 +106,9 @@
 # ==============================================================================
 include $(CLEAR_VARS)
 LOCAL_MODULE := camera.v4l2_test
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
 LOCAL_CFLAGS += $(v4l2_cflags)
 LOCAL_SHARED_LIBRARIES := $(v4l2_shared_libs)
 LOCAL_STATIC_LIBRARIES := \
diff --git a/modules/consumerir/Android.bp b/modules/consumerir/Android.bp
index 4f700c2..f33e4e5 100644
--- a/modules/consumerir/Android.bp
+++ b/modules/consumerir/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 "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "consumerir.default",
     relative_install_path: "hw",
diff --git a/modules/fingerprint/Android.bp b/modules/fingerprint/Android.bp
index 22648b1..5c95374 100644
--- a/modules/fingerprint/Android.bp
+++ b/modules/fingerprint/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 "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "fingerprint.default",
     relative_install_path: "hw",
diff --git a/modules/gralloc/Android.mk b/modules/gralloc/Android.mk
index ff5808d..439c95d 100644
--- a/modules/gralloc/Android.mk
+++ b/modules/gralloc/Android.mk
@@ -31,6 +31,9 @@
 LOCAL_HEADER_LIBRARIES := libhardware_headers
 
 LOCAL_MODULE := gralloc.default
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../NOTICE
 LOCAL_CFLAGS:= -DLOG_TAG=\"gralloc\" -Wno-missing-field-initializers
 ifeq ($(TARGET_USE_PAN_DISPLAY),true)
 LOCAL_CFLAGS += -DUSE_PAN_DISPLAY=1
diff --git a/modules/hwcomposer/Android.bp b/modules/hwcomposer/Android.bp
index 4f429be..6a864c8 100644
--- a/modules/hwcomposer/Android.bp
+++ b/modules/hwcomposer/Android.bp
@@ -14,6 +14,15 @@
 
 // HAL module implemenation stored in
 // hw/<OVERLAY_HARDWARE_MODULE_ID>.<ro.product.board>.so
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "hwcomposer.default",
     relative_install_path: "hw",
diff --git a/modules/input/evdev/Android.bp b/modules/input/evdev/Android.bp
index bcd563f..9817c73 100644
--- a/modules/input/evdev/Android.bp
+++ b/modules/input/evdev/Android.bp
@@ -13,6 +13,15 @@
 // limitations under the License.
 
 // Evdev module implementation
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "libinput_evdev",
 
diff --git a/modules/local_time/Android.bp b/modules/local_time/Android.bp
index 9f140b3..a4101c0 100644
--- a/modules/local_time/Android.bp
+++ b/modules/local_time/Android.bp
@@ -21,6 +21,15 @@
 // seen in libhardware/hardware.c
 //
 // The format of the name is local_time.<hardware>.so
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "local_time.default",
     relative_install_path: "hw",
diff --git a/modules/nfc-nci/Android.bp b/modules/nfc-nci/Android.bp
index 282e925..31d89aa 100644
--- a/modules/nfc-nci/Android.bp
+++ b/modules/nfc-nci/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 "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "nfc_nci.default",
     relative_install_path: "hw",
diff --git a/modules/nfc/Android.bp b/modules/nfc/Android.bp
index 7c69f11..61fe1b8 100644
--- a/modules/nfc/Android.bp
+++ b/modules/nfc/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 "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "nfc.default",
     relative_install_path: "hw",
diff --git a/modules/power/Android.bp b/modules/power/Android.bp
index 6b0b31f..4abcf37 100644
--- a/modules/power/Android.bp
+++ b/modules/power/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 "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "power.default",
     relative_install_path: "hw",
diff --git a/modules/radio/Android.bp b/modules/radio/Android.bp
index 7f98f0d..7240869 100644
--- a/modules/radio/Android.bp
+++ b/modules/radio/Android.bp
@@ -13,6 +13,15 @@
 // limitations under the License.
 
 // Stub radio HAL module, used for tests
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "radio.fm.default",
     relative_install_path: "hw",
diff --git a/modules/sensors/Android.bp b/modules/sensors/Android.bp
index 3d14bdf..61590a5 100644
--- a/modules/sensors/Android.bp
+++ b/modules/sensors/Android.bp
@@ -1,3 +1,12 @@
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_static {
     name: "multihal",
     vendor: true,
diff --git a/modules/sensors/Android.mk b/modules/sensors/Android.mk
index 2becc97..69889de 100644
--- a/modules/sensors/Android.mk
+++ b/modules/sensors/Android.mk
@@ -21,6 +21,9 @@
 include $(CLEAR_VARS)
 
 LOCAL_MODULE := sensors.$(TARGET_DEVICE)
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../NOTICE
 
 LOCAL_MODULE_RELATIVE_PATH := hw
 LOCAL_PROPRIETARY_MODULE := true
diff --git a/modules/sensors/dynamic_sensor/Android.bp b/modules/sensors/dynamic_sensor/Android.bp
index 214d97c..1ebc04d 100644
--- a/modules/sensors/dynamic_sensor/Android.bp
+++ b/modules/sensors/dynamic_sensor/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 "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_defaults {
     name: "dynamic_sensor_defaults",
 
diff --git a/modules/sensors/dynamic_sensor/HidUtils/Android.bp b/modules/sensors/dynamic_sensor/HidUtils/Android.bp
index 0eb43f8..bbed032 100644
--- a/modules/sensors/dynamic_sensor/HidUtils/Android.bp
+++ b/modules/sensors/dynamic_sensor/HidUtils/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 "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_defaults {
     name: "hid_defaults",
     cflags: [
diff --git a/modules/soundtrigger/Android.bp b/modules/soundtrigger/Android.bp
index aa5e804..86cc593 100644
--- a/modules/soundtrigger/Android.bp
+++ b/modules/soundtrigger/Android.bp
@@ -13,6 +13,15 @@
 // limitations under the License.
 
 // Stub sound_trigger HAL module, used for tests
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "sound_trigger.stub.default",
     relative_install_path: "hw",
diff --git a/modules/thermal/Android.bp b/modules/thermal/Android.bp
index ab5c408..9ac84d7 100644
--- a/modules/thermal/Android.bp
+++ b/modules/thermal/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 "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "thermal.default",
     relative_install_path: "hw",
diff --git a/modules/tv_input/Android.bp b/modules/tv_input/Android.bp
index b9d8afa..13dd301 100644
--- a/modules/tv_input/Android.bp
+++ b/modules/tv_input/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 "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "tv_input.default",
     relative_install_path: "hw",
diff --git a/modules/usbaudio/Android.bp b/modules/usbaudio/Android.bp
index 9f78753..0be27c3 100644
--- a/modules/usbaudio/Android.bp
+++ b/modules/usbaudio/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 "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_defaults {
     name: "audio.usb_defaults",
     relative_install_path: "hw",
diff --git a/modules/usbcamera/Android.bp b/modules/usbcamera/Android.bp
index 5e44d3c..07eb85b 100644
--- a/modules/usbcamera/Android.bp
+++ b/modules/usbcamera/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 "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "camera.usb.default",
     relative_install_path: "hw",
diff --git a/modules/vibrator/Android.bp b/modules/vibrator/Android.bp
index 13ffc83..2412d4d 100644
--- a/modules/vibrator/Android.bp
+++ b/modules/vibrator/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 "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "vibrator.default",
 
diff --git a/modules/vr/Android.bp b/modules/vr/Android.bp
index 40f4510..121939b 100644
--- a/modules/vr/Android.bp
+++ b/modules/vr/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 "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_shared {
     name: "vr.default",
     relative_install_path: "hw",
diff --git a/tests/camera3/Android.bp b/tests/camera3/Android.bp
index 55486ba..6d43066 100644
--- a/tests/camera3/Android.bp
+++ b/tests/camera3/Android.bp
@@ -1,3 +1,12 @@
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_test {
     name: "camera3_tests",
     srcs: ["camera3tests.cpp"],
diff --git a/tests/fingerprint/Android.bp b/tests/fingerprint/Android.bp
index 9524b7b..9827e89 100644
--- a/tests/fingerprint/Android.bp
+++ b/tests/fingerprint/Android.bp
@@ -1,3 +1,12 @@
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_test {
     name: "fingerprint_tests",
     srcs: ["fingerprint_tests.cpp"],
diff --git a/tests/hardware/Android.bp b/tests/hardware/Android.bp
index 2f5db12..b137684 100644
--- a/tests/hardware/Android.bp
+++ b/tests/hardware/Android.bp
@@ -1,3 +1,12 @@
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_static {
     name: "static-hal-check",
     srcs: [
diff --git a/tests/hwc/Android.bp b/tests/hwc/Android.bp
index 782a314..82a00e4 100644
--- a/tests/hwc/Android.bp
+++ b/tests/hwc/Android.bp
@@ -1,3 +1,12 @@
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_library_static {
     name: "libcnativewindow",
     srcs: [
diff --git a/tests/input/evdev/Android.bp b/tests/input/evdev/Android.bp
index fa03a00..10fa146 100644
--- a/tests/input/evdev/Android.bp
+++ b/tests/input/evdev/Android.bp
@@ -1,3 +1,12 @@
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_test {
     name: "libinput_evdevtests",
 
diff --git a/tests/nusensors/Android.bp b/tests/nusensors/Android.bp
index 8b267db..f06cf7a 100644
--- a/tests/nusensors/Android.bp
+++ b/tests/nusensors/Android.bp
@@ -1,3 +1,12 @@
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_libhardware_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_libhardware_license"],
+}
+
 cc_binary {
     name: "test-nusensors",