[LSC] Add LOCAL_LICENSE_KINDS to hardware/qcom/sdm845/display am: ab675870b7 am: ab029846c3 am: d61887608b am: 8b082b419f

Original change: https://android-review.googlesource.com/c/platform/hardware/qcom/sdm845/display/+/1588483

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic05a90a9e7bcc74fb39e43b553fa9fd44ab75b2e
diff --git a/Android.bp b/Android.bp
index 9d00645..6867776 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,3 +1,32 @@
+package {
+    default_applicable_licenses: ["hardware_qcom_sdm845_display_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_qcom_sdm845_display_license",
+    visibility: [":__subpackages__"],
+    license_kinds: [
+        "SPDX-license-identifier-Apache-2.0",
+        "SPDX-license-identifier-BSD",
+        "legacy_not_a_contribution",
+    ],
+    // large-scale-change unable to identify any license_text files
+}
+
 cc_defaults {
     name: "display_defaults",
     cflags: [
diff --git a/gpu_tonemapper/Android.mk b/gpu_tonemapper/Android.mk
index 3c3d8d3..0e999b8 100644
--- a/gpu_tonemapper/Android.mk
+++ b/gpu_tonemapper/Android.mk
@@ -9,6 +9,8 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE              := libgpu_tonemapper
+LOCAL_LICENSE_KINDS       := SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution
+LOCAL_LICENSE_CONDITIONS  := by_exception_only not_allowed notice
 LOCAL_VENDOR_MODULE       := true
 LOCAL_MODULE_TAGS         := optional
 LOCAL_C_INCLUDES          := $(TARGET_OUT_HEADERS)/qcom/display/
diff --git a/gralloc/Android.mk b/gralloc/Android.mk
index 343af4e..c1a5042 100644
--- a/gralloc/Android.mk
+++ b/gralloc/Android.mk
@@ -4,6 +4,8 @@
 include $(CLEAR_VARS)
 
 LOCAL_MODULE                  := gralloc.$(TARGET_BOARD_PLATFORM)
+LOCAL_LICENSE_KINDS           := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD legacy_not_a_contribution
+LOCAL_LICENSE_CONDITIONS      := by_exception_only not_allowed notice
 LOCAL_VENDOR_MODULE           := true
 LOCAL_MODULE_RELATIVE_PATH    := hw
 LOCAL_MODULE_TAGS             := optional
@@ -25,6 +27,8 @@
 #libgrallocutils
 include $(CLEAR_VARS)
 LOCAL_MODULE                  := libgrallocutils
+LOCAL_LICENSE_KINDS           := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD legacy_not_a_contribution
+LOCAL_LICENSE_CONDITIONS      := by_exception_only not_allowed notice
 LOCAL_VENDOR_MODULE           := true
 LOCAL_MODULE_TAGS             := optional
 LOCAL_C_INCLUDES              := $(common_includes) $(kernel_includes)
@@ -40,6 +44,8 @@
 #libgralloccore
 include $(CLEAR_VARS)
 LOCAL_MODULE                  := libgralloccore
+LOCAL_LICENSE_KINDS           := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD legacy_not_a_contribution
+LOCAL_LICENSE_CONDITIONS      := by_exception_only not_allowed notice
 LOCAL_VENDOR_MODULE           := true
 LOCAL_MODULE_TAGS             := optional
 LOCAL_C_INCLUDES              := $(common_includes) $(kernel_includes)
@@ -64,6 +70,8 @@
 #mapper
 include $(CLEAR_VARS)
 LOCAL_MODULE                  := android.hardware.graphics.mapper@2.0-impl-qti-display
+LOCAL_LICENSE_KINDS           := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD legacy_not_a_contribution
+LOCAL_LICENSE_CONDITIONS      := by_exception_only not_allowed notice
 LOCAL_VENDOR_MODULE           := true
 LOCAL_MODULE_RELATIVE_PATH    := hw
 LOCAL_MODULE_TAGS             := optional
@@ -84,6 +92,8 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE                  := vendor.qti.hardware.display.allocator@1.0-service
+LOCAL_LICENSE_KINDS           := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD legacy_not_a_contribution
+LOCAL_LICENSE_CONDITIONS      := by_exception_only not_allowed notice
 LOCAL_VENDOR_MODULE           := true
 LOCAL_MODULE_RELATIVE_PATH    := hw
 LOCAL_MODULE_TAGS             := optional
diff --git a/hdmi_cec/Android.mk b/hdmi_cec/Android.mk
index a333654..c73d20d 100644
--- a/hdmi_cec/Android.mk
+++ b/hdmi_cec/Android.mk
@@ -3,6 +3,8 @@
 include $(CLEAR_VARS)
 
 LOCAL_MODULE                  := hdmi_cec.$(TARGET_BOARD_PLATFORM)
+LOCAL_LICENSE_KINDS           := SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS      := notice
 LOCAL_VENDOR_MODULE           := true
 LOCAL_MODULE_RELATIVE_PATH    := hw
 LOCAL_MODULE_TAGS             := optional
diff --git a/libdebug/Android.mk b/libdebug/Android.mk
index bbe8555..a27b041 100644
--- a/libdebug/Android.mk
+++ b/libdebug/Android.mk
@@ -2,6 +2,8 @@
 include $(CLEAR_VARS)
 
 LOCAL_MODULE                  := libdisplaydebug
+LOCAL_LICENSE_KINDS           := SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS      := notice
 LOCAL_VENDOR_MODULE           := true
 LOCAL_MODULE_TAGS             := optional
 LOCAL_SHARED_LIBRARIES        := libdl
diff --git a/libdisplayconfig/Android.mk b/libdisplayconfig/Android.mk
index f719c9d..4286e04 100644
--- a/libdisplayconfig/Android.mk
+++ b/libdisplayconfig/Android.mk
@@ -2,6 +2,8 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE                  := libdisplayconfig
+LOCAL_LICENSE_KINDS           := SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS      := notice
 LOCAL_SYSTEM_EXT_MODULE       := true
 LOCAL_MODULE_TAGS             := optional
 LOCAL_VENDOR_MODULE           := true
diff --git a/libdrmutils/Android.mk b/libdrmutils/Android.mk
index 172233f..75a24e0 100644
--- a/libdrmutils/Android.mk
+++ b/libdrmutils/Android.mk
@@ -2,6 +2,8 @@
 include $(CLEAR_VARS)
 
 LOCAL_MODULE                  := libdrmutils
+LOCAL_LICENSE_KINDS           := SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS      := notice
 LOCAL_VENDOR_MODULE           := true
 LOCAL_MODULE_TAGS             := optional
 LOCAL_C_INCLUDES              := external/libdrm \
diff --git a/libhistogram/Android.mk b/libhistogram/Android.mk
index 144ee9a..634ead8 100644
--- a/libhistogram/Android.mk
+++ b/libhistogram/Android.mk
@@ -17,6 +17,8 @@
 
 LOCAL_HEADER_LIBRARIES := display_headers
 LOCAL_MODULE := libhistogram
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
 LOCAL_SRC_FILES := histogram_collector.cpp ringbuffer.cpp
 LOCAL_SHARED_LIBRARIES := libdrm liblog libcutils libutils
 LOCAL_CFLAGS := -DLOG_TAG=\"SDM-histogram\" -Wall -std=c++14 -Werror -fno-operator-names
@@ -31,6 +33,8 @@
 
 LOCAL_HEADER_LIBRARIES := display_headers
 LOCAL_MODULE := color_sampling_tool
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
 LOCAL_SRC_FILES := color_sampling_tool.cpp
 
 LOCAL_STATIC_LIBRARIES := libhistogram
@@ -46,6 +50,8 @@
 
 LOCAL_HEADER_LIBRARIES := display_headers
 LOCAL_MODULE := color_sampling_test
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
 LOCAL_SRC_FILES := ringbuffer_test.cpp
 
 LOCAL_STATIC_LIBRARIES := libhistogram libgtest libgmock
diff --git a/liblight/Android.mk b/liblight/Android.mk
index 3db3634..a701e89 100644
--- a/liblight/Android.mk
+++ b/liblight/Android.mk
@@ -28,6 +28,9 @@
 LOCAL_CFLAGS += -Wno-error
 LOCAL_CLANG  := true
 LOCAL_MODULE := lights.qcom
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution
+LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
 LOCAL_MODULE_TAGS := optional
 LOCAL_VENDOR_MODULE := true
 
diff --git a/libmemtrack/Android.mk b/libmemtrack/Android.mk
index 7a35604..bc2e32f 100644
--- a/libmemtrack/Android.mk
+++ b/libmemtrack/Android.mk
@@ -27,4 +27,6 @@
 LOCAL_HEADER_LIBRARIES := libhardware_headers
 LOCAL_SRC_FILES := memtrack_msm.c kgsl.c
 LOCAL_MODULE := memtrack.$(TARGET_BOARD_PLATFORM)
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
 include $(BUILD_SHARED_LIBRARY)
diff --git a/libqdutils/Android.bp b/libqdutils/Android.bp
index 0c1b96a..d088d78 100644
--- a/libqdutils/Android.bp
+++ b/libqdutils/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_qcom_sdm845_display_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-BSD
+    default_applicable_licenses: ["hardware_qcom_sdm845_display_license"],
+}
+
 cc_library_shared {
     name: "libqdutils",
     vendor: true,
diff --git a/libqservice/Android.bp b/libqservice/Android.bp
index fe69d39..6f11a1a 100644
--- a/libqservice/Android.bp
+++ b/libqservice/Android.bp
@@ -1,3 +1,14 @@
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_qcom_sdm845_display_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    //   SPDX-license-identifier-BSD
+    //   legacy_not_a_contribution
+    default_applicable_licenses: ["hardware_qcom_sdm845_display_license"],
+}
+
 cc_library_shared {
     name: "libqservice",
     vendor: true,
diff --git a/sdm/libs/core/Android.mk b/sdm/libs/core/Android.mk
index d4aa933..9d7b6dc 100644
--- a/sdm/libs/core/Android.mk
+++ b/sdm/libs/core/Android.mk
@@ -3,6 +3,8 @@
 include $(LOCAL_PATH)/../../../common.mk
 
 LOCAL_MODULE                  := libsdmcore
+LOCAL_LICENSE_KINDS           := SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS      := notice
 LOCAL_VENDOR_MODULE           := true
 LOCAL_MODULE_TAGS             := optional
 LOCAL_C_INCLUDES              := $(common_includes) $(kernel_includes)
diff --git a/sdm/libs/hwc2/Android.mk b/sdm/libs/hwc2/Android.mk
index 57d9b37..1d602f6 100644
--- a/sdm/libs/hwc2/Android.mk
+++ b/sdm/libs/hwc2/Android.mk
@@ -5,6 +5,8 @@
 ifeq ($(use_hwc2),true)
 
 LOCAL_MODULE                  := hwcomposer.$(TARGET_BOARD_PLATFORM)
+LOCAL_LICENSE_KINDS           := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD legacy_not_a_contribution
+LOCAL_LICENSE_CONDITIONS      := by_exception_only not_allowed notice
 LOCAL_VENDOR_MODULE           := true
 LOCAL_MODULE_RELATIVE_PATH    := hw
 LOCAL_MODULE_TAGS             := optional
diff --git a/sdm/libs/utils/Android.mk b/sdm/libs/utils/Android.mk
index a9d705c..6dddae6 100644
--- a/sdm/libs/utils/Android.mk
+++ b/sdm/libs/utils/Android.mk
@@ -3,6 +3,8 @@
 include $(LOCAL_PATH)/../../../common.mk
 
 LOCAL_MODULE                  := libsdmutils
+LOCAL_LICENSE_KINDS           := SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS      := notice
 LOCAL_VENDOR_MODULE           := true
 LOCAL_MODULE_TAGS             := optional
 LOCAL_C_INCLUDES              := $(common_includes)