diff --git a/Android.bp b/Android.bp index 3ac123e4..ebdd2544 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 a7467c29..1b343366 100644 --- a/modules/audio/Android.bp +++ b/modules/audio/Android.bp @@ -18,6 +18,15 @@ // // The format of the name is audio...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 95234380..53555f51 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 8e4d42d0..490a4026 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 6d6d1d78..d8aac4f9 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 0a11f684..7c8eee16 100644 --- a/modules/camera/3_4/Android.mk +++ b/modules/camera/3_4/Android.mk @@ -88,6 +88,9 @@ v4l2_test_files := \ # ============================================================================== 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 $(BUILD_SHARED_LIBRARY) # ============================================================================== 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 4f700c2a..f33e4e55 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 22648b1b..5c95374b 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 ff5808db..439c95dd 100644 --- a/modules/gralloc/Android.mk +++ b/modules/gralloc/Android.mk @@ -31,6 +31,9 @@ LOCAL_SRC_FILES := \ 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 4f429be1..6a864c8f 100644 --- a/modules/hwcomposer/Android.bp +++ b/modules/hwcomposer/Android.bp @@ -14,6 +14,15 @@ // HAL module implemenation stored in // hw/..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 bcd563f0..9817c736 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 9f140b34..a4101c02 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..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 282e925a..31d89aa9 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 7c69f114..61fe1b88 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 6b0b31fb..4abcf375 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 7f98f0dc..7240869f 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 3d14bdf2..61590a5a 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 2becc974..69889def 100644 --- a/modules/sensors/Android.mk +++ b/modules/sensors/Android.mk @@ -21,6 +21,9 @@ ifeq ($(USE_SENSOR_MULTI_HAL),true) 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 214d97cf..1ebc04d2 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 0eb43f8b..bbed0327 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 aa5e8048..86cc593d 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 ab5c4089..9ac84d7f 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 b9d8afa0..13dd301a 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 9f787532..0be27c37 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 5e44d3c4..07eb85b2 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 13ffc835..2412d4d1 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 40f4510c..121939be 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 55486ba0..6d430669 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 9524b7ba..9827e893 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 2f5db126..b1376840 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 782a314f..82a00e40 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 fa03a007..10fa1461 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 8b267dba..f06cf7a0 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",