diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000000000000000000000000000000000000..7f53aec5e7bcf247314f443c3c237777b2a6a71d --- /dev/null +++ b/Android.bp @@ -0,0 +1,44 @@ +// +// Copyright (C) 2021 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package { + default_applicable_licenses: ["external_v4l2_codec2_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: "external_v4l2_codec2_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-BSD", + "legacy_unencumbered", + ], + license_text: [ + "NOTICE", + ], +} diff --git a/accel/Android.bp b/accel/Android.bp index 1bf4805981d1e063d45846f34ea816c88750ea02..fffd41e2aea706bf582a99af93e5643f27afd715 100644 --- a/accel/Android.bp +++ b/accel/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 "external_v4l2_codec2_license" + // to get the below license kinds: + // SPDX-license-identifier-BSD + default_applicable_licenses: ["external_v4l2_codec2_license"], +} + cc_library { name: "libv4l2_codec2_accel", vendor: true, diff --git a/common/Android.bp b/common/Android.bp index 45334d028178cb3afa4c84bda84b02d21e491f22..c1ea4b1dd8b46129ac310f47fa379f739f0d0281 100644 --- a/common/Android.bp +++ b/common/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 "external_v4l2_codec2_license" + // to get the below license kinds: + // SPDX-license-identifier-BSD + default_applicable_licenses: ["external_v4l2_codec2_license"], +} + cc_library { name: "libv4l2_codec2_common", vendor: true, diff --git a/components/Android.bp b/components/Android.bp index 827341268b8fda7d9dd356a1a8a0972aab5c57d0..e1eb56dffcba085f3ab64e1ed362b699d449b4c5 100644 --- a/components/Android.bp +++ b/components/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 "external_v4l2_codec2_license" + // to get the below license kinds: + // SPDX-license-identifier-BSD + default_applicable_licenses: ["external_v4l2_codec2_license"], +} + cc_library { name: "libv4l2_codec2_components", vendor: true, diff --git a/plugin_store/Android.bp b/plugin_store/Android.bp index 73dccafe41f90fa936afc57bba29bcd8e9088bd2..d2ea3a3f8168baba441b78be5c91d1d136df6c35 100644 --- a/plugin_store/Android.bp +++ b/plugin_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 "external_v4l2_codec2_license" + // to get the below license kinds: + // SPDX-license-identifier-BSD + default_applicable_licenses: ["external_v4l2_codec2_license"], +} + cc_library_shared { name: "libc2plugin_store", vendor: true, diff --git a/service/Android.bp b/service/Android.bp index 5fee6578e3513435d2f42617b01dbdc617496fa0..3bd1babcc9a4b49ab37909de7ee3c38f3a80fa9e 100644 --- a/service/Android.bp +++ b/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 "external_v4l2_codec2_license" + // to get the below license kinds: + // SPDX-license-identifier-BSD + default_applicable_licenses: ["external_v4l2_codec2_license"], +} + cc_binary { name: "android.hardware.media.c2@1.0-service-v4l2", diff --git a/store/Android.bp b/store/Android.bp index c2a6169eedcd67971ef10017f266cfcf9270fa11..c36a91282733586c14cb551651ba0368c0ebd18e 100644 --- a/store/Android.bp +++ b/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 "external_v4l2_codec2_license" + // to get the below license kinds: + // SPDX-license-identifier-BSD + default_applicable_licenses: ["external_v4l2_codec2_license"], +} + cc_library_shared { name: "libv4l2_codec2_store", vendor: true, @@ -27,4 +36,3 @@ cc_library_shared { "-Wthread-safety", // Check thread annotation at build time. ], } - diff --git a/tests/c2_comp_intf/Android.bp b/tests/c2_comp_intf/Android.bp index bc7ae83e953aa8a66a902ad8ac2984c02d7bedf8..f402af21bbd556ba28e2808de21ed60fdec8c75d 100644 --- a/tests/c2_comp_intf/Android.bp +++ b/tests/c2_comp_intf/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 "external_v4l2_codec2_license" + // to get the below license kinds: + // SPDX-license-identifier-BSD + default_applicable_licenses: ["external_v4l2_codec2_license"], +} + cc_test { name: "C2VEACompIntf_test", vendor: true, diff --git a/tests/c2_e2e_test/jni/Android.mk b/tests/c2_e2e_test/jni/Android.mk index 78a863bbeeed0510ddbbd790e04525c684816679..890a74b081c1902b0bb628d041272c59352a9074 100644 --- a/tests/c2_e2e_test/jni/Android.mk +++ b/tests/c2_e2e_test/jni/Android.mk @@ -31,6 +31,9 @@ LOCAL_NDK_STL_VARIANT := c++_static LOCAL_STATIC_LIBRARIES := libgtest_ndk_c++ LOCAL_MODULE := libcodectest +LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD legacy_unencumbered +LOCAL_LICENSE_CONDITIONS := notice unencumbered +LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE # TODO(stevensd): Fix and reenable warnings LOCAL_CFLAGS += -Wno-everything