[LSC] Add LOCAL_LICENSE_KINDS to device/generic/goldfish-opengl

Added SPDX-license-identifier-Apache-2.0 to:
  shared/GoldfishAddressSpace/Android.bp
  shared/gralloc_cb/Android.bp
  shared/qemupipe/Android.bp
  system/codecs/c2/decoders/avcdec/Android.bp
  system/codecs/c2/decoders/base/Android.bp
  system/codecs/c2/decoders/vpxdec/Android.bp
  system/egl/Android.mk
  system/hals/Android.mk
  system/hwc2/Android.mk
  tests/gles_android_wrapper/Android.mk

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-MIT
to:
  Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL-2.0
to:
  android-emu/Android.bp

Added SPDX-license-identifier-BSD
to:
  system/codecs/c2/service/Android.bp

Added SPDX-license-identifier-GPL-2.0
to:
  system/codecs/c2/store/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: Ide2b5a35fe02f035b65aa0723799081e38292e7a
diff --git a/Android.bp b/Android.bp
index 482e5a6..b4f361f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -15,3 +15,35 @@
  */
 
 soong_namespace {}
+
+package {
+    default_applicable_licenses: ["device_generic_goldfish-opengl_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: "device_generic_goldfish-opengl_license",
+    visibility: [":__subpackages__"],
+    license_kinds: [
+        "SPDX-license-identifier-Apache-2.0",
+        "SPDX-license-identifier-BSD",
+        "SPDX-license-identifier-GPL-2.0",
+        "SPDX-license-identifier-MIT",
+    ],
+    license_text: [
+        "LICENSE",
+    ],
+}
diff --git a/android-emu/Android.bp b/android-emu/Android.bp
index c32c986..b83cab9 100644
--- a/android-emu/Android.bp
+++ b/android-emu/Android.bp
@@ -1,3 +1,13 @@
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "device_generic_goldfish-opengl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    //   SPDX-license-identifier-GPL-2.0
+    default_applicable_licenses: ["device_generic_goldfish-opengl_license"],
+}
+
 cc_library_shared {
     name: "libandroidemu",
     vendor: true,
diff --git a/shared/GoldfishAddressSpace/Android.bp b/shared/GoldfishAddressSpace/Android.bp
index 4e8d31d..11e2450 100644
--- a/shared/GoldfishAddressSpace/Android.bp
+++ b/shared/GoldfishAddressSpace/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 "device_generic_goldfish-opengl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["device_generic_goldfish-opengl_license"],
+}
+
 cc_library_static {
     name: "libGoldfishAddressSpace",
     vendor: true,
diff --git a/shared/gralloc_cb/Android.bp b/shared/gralloc_cb/Android.bp
index faea798..2e5976a 100644
--- a/shared/gralloc_cb/Android.bp
+++ b/shared/gralloc_cb/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 "device_generic_goldfish-opengl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["device_generic_goldfish-opengl_license"],
+}
+
 cc_library_headers {
     name: "libgralloc_cb.ranchu",
     vendor_available: true,
diff --git a/shared/qemupipe/Android.bp b/shared/qemupipe/Android.bp
index fe72943..478328c 100644
--- a/shared/qemupipe/Android.bp
+++ b/shared/qemupipe/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 "device_generic_goldfish-opengl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["device_generic_goldfish-opengl_license"],
+}
+
 cc_library_headers {
     name: "libqemupipe-types.ranchu",
     vendor_available: true,
diff --git a/system/codecs/c2/decoders/avcdec/Android.bp b/system/codecs/c2/decoders/avcdec/Android.bp
index d31f658..78ffd82 100644
--- a/system/codecs/c2/decoders/avcdec/Android.bp
+++ b/system/codecs/c2/decoders/avcdec/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 "device_generic_goldfish-opengl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["device_generic_goldfish-opengl_license"],
+}
+
 cc_library_shared {
     name: "libcodec2_goldfish_avcdec",
     vendor: true,
diff --git a/system/codecs/c2/decoders/base/Android.bp b/system/codecs/c2/decoders/base/Android.bp
index c9921f5..f4ebb5d 100644
--- a/system/codecs/c2/decoders/base/Android.bp
+++ b/system/codecs/c2/decoders/base/Android.bp
@@ -1,5 +1,14 @@
 // DO NOT DEPEND ON THIS DIRECTLY
 // use libcodec2_soft-defaults instead
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "device_generic_goldfish-opengl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["device_generic_goldfish-opengl_license"],
+}
+
 cc_library_shared {
     name: "libcodec2_goldfish_common",
     defaults: ["libcodec2-impl-defaults"],
diff --git a/system/codecs/c2/decoders/vpxdec/Android.bp b/system/codecs/c2/decoders/vpxdec/Android.bp
index a3085e6..7be2d50 100644
--- a/system/codecs/c2/decoders/vpxdec/Android.bp
+++ b/system/codecs/c2/decoders/vpxdec/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 "device_generic_goldfish-opengl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["device_generic_goldfish-opengl_license"],
+}
+
 cc_library_shared {
     name: "libcodec2_goldfish_vp9dec",
     vendor: true,
diff --git a/system/codecs/c2/service/Android.bp b/system/codecs/c2/service/Android.bp
index e85fa31..0678116 100644
--- a/system/codecs/c2/service/Android.bp
+++ b/system/codecs/c2/service/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 "device_generic_goldfish-opengl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-BSD
+    default_applicable_licenses: ["device_generic_goldfish-opengl_license"],
+}
+
 cc_binary {
     name: "android.hardware.media.c2@1.0-service-goldfish",
 
diff --git a/system/codecs/c2/store/Android.bp b/system/codecs/c2/store/Android.bp
index ee57806..56b1895 100644
--- a/system/codecs/c2/store/Android.bp
+++ b/system/codecs/c2/store/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 "device_generic_goldfish-opengl_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-GPL-2.0
+    default_applicable_licenses: ["device_generic_goldfish-opengl_license"],
+}
+
 cc_library_shared {
     name: "libgoldfish_codec2_store",
     vendor: true,
@@ -24,4 +33,3 @@
       "-Wthread-safety",  // Check thread annotation at build time.
     ],
 }
-
diff --git a/system/egl/Android.mk b/system/egl/Android.mk
index f312efb..b72db0e 100644
--- a/system/egl/Android.mk
+++ b/system/egl/Android.mk
@@ -55,6 +55,9 @@
 include $(CLEAR_VARS)
 
 LOCAL_MODULE := egl.cfg
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE
 LOCAL_SRC_FILES := $(LOCAL_MODULE)
 
 LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/egl
diff --git a/system/hals/Android.mk b/system/hals/Android.mk
index 1641d23..72ac6ce 100644
--- a/system/hals/Android.mk
+++ b/system/hals/Android.mk
@@ -18,6 +18,9 @@
 include $(CLEAR_VARS)
 
 LOCAL_MODULE := android.hardware.graphics.allocator@3.0-service
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE
 LOCAL_MODULE_RELATIVE_PATH := hw
 LOCAL_VENDOR_MODULE := true
 LOCAL_SRC_FILES := allocator3.cpp
@@ -54,6 +57,9 @@
 include $(CLEAR_VARS)
 
 LOCAL_MODULE := android.hardware.graphics.mapper@3.0-impl-ranchu
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE
 LOCAL_MODULE_RELATIVE_PATH := hw
 LOCAL_VENDOR_MODULE := true
 LOCAL_SRC_FILES := mapper3.cpp
@@ -87,4 +93,3 @@
 LOCAL_SHARED_LIBRARIES += libdrm
 
 include $(BUILD_SHARED_LIBRARY)
-
diff --git a/system/hwc2/Android.mk b/system/hwc2/Android.mk
index 24a8a58..060a2f2 100644
--- a/system/hwc2/Android.mk
+++ b/system/hwc2/Android.mk
@@ -59,6 +59,9 @@
 LOCAL_MODULE_RELATIVE_PATH := $(emulator_hwcomposer_relative_path)
 
 LOCAL_MODULE := hwcomposer.ranchu
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE
 LOCAL_MODULE_TAGS := optional
 
 include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/gles_android_wrapper/Android.mk b/tests/gles_android_wrapper/Android.mk
index 13e0cfc..78bab3c 100644
--- a/tests/gles_android_wrapper/Android.mk
+++ b/tests/gles_android_wrapper/Android.mk
@@ -53,6 +53,9 @@
 include $(CLEAR_VARS)
 
 LOCAL_MODULE := egl.cfg
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE
 LOCAL_SRC_FILES := $(LOCAL_MODULE)
 
 LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/egl
@@ -66,6 +69,9 @@
 include $(CLEAR_VARS)
 
 LOCAL_MODULE := gles_emul.cfg
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE
 LOCAL_SRC_FILES := $(LOCAL_MODULE)
 
 LOCAL_MODULE_PATH := $(TARGET_OUT)/etc