DO NOT MERGE - Mark RQ3A.210410.001 as merged

Bug: 190855093
Merged-In: I632162c432d02911b151498f5d9f64bade6651e6
Change-Id: Ibb1f1cf258ce7af7b3112787b1c6eb7e355df880
diff --git a/Android.bp b/Android.bp
index 913278a..a2b9a2b 100644
--- a/Android.bp
+++ b/Android.bp
@@ -5,3 +5,31 @@
         "hardware/qcom/bootctrl",
     ],
 }
+
+package {
+    default_applicable_licenses: ["device_google_bramble_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_google_bramble_license",
+    visibility: [":__subpackages__"],
+    license_kinds: [
+        "SPDX-license-identifier-Apache-2.0",
+        "SPDX-license-identifier-BSD",
+    ],
+    // large-scale-change unable to identify any license_text files
+}
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index 1523d35..d4cbbda 100644
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -16,6 +16,7 @@
 
 PRODUCT_MAKEFILES := \
     $(LOCAL_DIR)/aosp_bramble.mk \
+    $(LOCAL_DIR)/aosp_bramble_hwasan.mk \
 
 COMMON_LUNCH_CHOICES := \
     aosp_bramble-userdebug \
diff --git a/aosp_bramble.mk b/aosp_bramble.mk
index 6ec72bd..f0aeaf2 100644
--- a/aosp_bramble.mk
+++ b/aosp_bramble.mk
@@ -21,8 +21,7 @@
 $(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
 
 # Enable mainline checking
-# TODO(b/138706293): Enable mainline checking later
-# PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
+PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := strict
 
 #
 # All components inherited here go to system_ext image
@@ -50,6 +49,12 @@
 PRODUCT_COPY_FILES += \
     frameworks/native/data/etc/aosp_excluded_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/aosp_excluded_hardware.xml
 
+# Keep the VNDK APEX in /system partition for REL branches as these branches are
+# expected to have stable API/ABI surfaces.
+ifneq (REL,$(PLATFORM_VERSION_CODENAME))
+  PRODUCT_PACKAGES += com.android.vndk.current.on_vendor
+endif
+
 # Don't build super.img.
 PRODUCT_BUILD_SUPER_PARTITION := false
 
diff --git a/aosp_bramble_hwasan.mk b/aosp_bramble_hwasan.mk
new file mode 100644
index 0000000..5424c5a
--- /dev/null
+++ b/aosp_bramble_hwasan.mk
@@ -0,0 +1,23 @@
+#
+# Copyright 2020 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.
+#
+
+$(call inherit-product, device/google/bramble/aosp_bramble.mk)
+PRODUCT_NAME := aosp_bramble_hwasan
+
+# Add "hwaddress" as a global sanitizer if it's missing.
+ifeq ($(filter hwaddress,$(SANITIZE_TARGET)),)
+  SANITIZE_TARGET := $(strip $(SANITIZE_TARGET) hwaddress)
+endif
diff --git a/bramble/overlay_packages/FrameworkOverlayG6QU3/Android.bp b/bramble/overlay_packages/FrameworkOverlayG6QU3/Android.bp
index 3e9a59c..654bab9 100644
--- a/bramble/overlay_packages/FrameworkOverlayG6QU3/Android.bp
+++ b/bramble/overlay_packages/FrameworkOverlayG6QU3/Android.bp
@@ -1,3 +1,7 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 runtime_resource_overlay {
     name: "FrameworkOverlayG6QU3",
     product_specific: true,
diff --git a/bramble/overlay_packages/SettingsOverlayG025E/Android.bp b/bramble/overlay_packages/SettingsOverlayG025E/Android.bp
index 8b917cc..1c146f7 100644
--- a/bramble/overlay_packages/SettingsOverlayG025E/Android.bp
+++ b/bramble/overlay_packages/SettingsOverlayG025E/Android.bp
@@ -1,3 +1,7 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 runtime_resource_overlay {
     name: "SettingsOverlayG025E",
     product_specific: true,
diff --git a/bramble/overlay_packages/SettingsOverlayG025H/Android.bp b/bramble/overlay_packages/SettingsOverlayG025H/Android.bp
index 2b4c336..39ad188 100644
--- a/bramble/overlay_packages/SettingsOverlayG025H/Android.bp
+++ b/bramble/overlay_packages/SettingsOverlayG025H/Android.bp
@@ -1,3 +1,7 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 runtime_resource_overlay {
     name: "SettingsOverlayG025H",
     product_specific: true,
diff --git a/bramble/overlay_packages/SettingsOverlayG025I/Android.bp b/bramble/overlay_packages/SettingsOverlayG025I/Android.bp
index 11a4252..69f4c2b 100644
--- a/bramble/overlay_packages/SettingsOverlayG025I/Android.bp
+++ b/bramble/overlay_packages/SettingsOverlayG025I/Android.bp
@@ -1,3 +1,7 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 runtime_resource_overlay {
     name: "SettingsOverlayG025I",
     product_specific: true,
diff --git a/bramble/overlay_packages/SettingsOverlayG6QU3/Android.bp b/bramble/overlay_packages/SettingsOverlayG6QU3/Android.bp
index e04c26b..134ded1 100644
--- a/bramble/overlay_packages/SettingsOverlayG6QU3/Android.bp
+++ b/bramble/overlay_packages/SettingsOverlayG6QU3/Android.bp
@@ -1,3 +1,7 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 runtime_resource_overlay {
     name: "SettingsOverlayG6QU3",
     product_specific: true,
diff --git a/dumpstate/Android.mk b/dumpstate/Android.mk
index b716215..74e7e50 100644
--- a/dumpstate/Android.mk
+++ b/dumpstate/Android.mk
@@ -17,6 +17,8 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 LOCAL_MODULE := android.hardware.dumpstate@1.1-service.bramble
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
 LOCAL_INIT_RC := android.hardware.dumpstate@1.1-service.bramble.rc
 LOCAL_MODULE_RELATIVE_PATH := hw
 
diff --git a/self-extractors/qcom/staging/Android.mk b/self-extractors/qcom/staging/Android.mk
index 8d0a9ea..aa9ce88 100644
--- a/self-extractors/qcom/staging/Android.mk
+++ b/self-extractors/qcom/staging/Android.mk
@@ -4,6 +4,9 @@
 include $(CLEAR_VARS)
 LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
 LOCAL_MODULE := ims
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../COPYRIGHT $(LOCAL_PATH)/../LICENSE
 LOCAL_MODULE_TAGS := optional
 LOCAL_BUILT_MODULE_STEM := package.apk
 LOCAL_SYSTEM_EXT_MODULE := true
@@ -17,6 +20,9 @@
 include $(CLEAR_VARS)
 LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
 LOCAL_MODULE := qcrilmsgtunnel
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../COPYRIGHT $(LOCAL_PATH)/../LICENSE
 LOCAL_MODULE_TAGS := optional
 LOCAL_BUILT_MODULE_STEM := package.apk
 LOCAL_SYSTEM_EXT_MODULE := true
@@ -30,6 +36,9 @@
 include $(CLEAR_VARS)
 LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
 LOCAL_MODULE := QtiTelephonyService
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../COPYRIGHT $(LOCAL_PATH)/../LICENSE
 LOCAL_MODULE_TAGS := optional
 LOCAL_BUILT_MODULE_STEM := package.apk
 LOCAL_SYSTEM_EXT_MODULE := true
diff --git a/usb/Android.bp b/usb/Android.bp
index 671c546..0fbe841 100644
--- a/usb/Android.bp
+++ b/usb/Android.bp
@@ -13,6 +13,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 cc_binary {
     name: "android.hardware.usb@1.2-service.bramble",
     relative_install_path: "hw",
diff --git a/vibrator/drv2624/Android.bp b/vibrator/drv2624/Android.bp
index 3cb11b2..69f8cb0 100644
--- a/vibrator/drv2624/Android.bp
+++ b/vibrator/drv2624/Android.bp
@@ -13,6 +13,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 cc_defaults {
     name: "android.hardware.vibrator-defaults.bramble",
     cflags: [
diff --git a/vibrator/drv2624/bench/Android.bp b/vibrator/drv2624/bench/Android.bp
index bab4656..1ce0641 100644
--- a/vibrator/drv2624/bench/Android.bp
+++ b/vibrator/drv2624/bench/Android.bp
@@ -13,6 +13,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 cc_benchmark {
     name: "VibratorHalDrv2624BenchmarkBramble",
     defaults: ["VibratorHalDrv2624TestDefaultsBramble"],
diff --git a/vibrator/drv2624/tests/Android.bp b/vibrator/drv2624/tests/Android.bp
index 0179950..f4e3ac5 100644
--- a/vibrator/drv2624/tests/Android.bp
+++ b/vibrator/drv2624/tests/Android.bp
@@ -13,6 +13,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 cc_test {
     name: "VibratorHalDrv2624TestSuiteBramble",
     defaults: ["VibratorHalDrv2624TestDefaultsBramble"],
diff --git a/voice_processing/Android.bp b/voice_processing/Android.bp
index 48d21dd..2fe366e 100644
--- a/voice_processing/Android.bp
+++ b/voice_processing/Android.bp
@@ -12,6 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
 cc_library_shared {
     name: "libqcomvoiceprocessingdescriptors",
     srcs: ["voice_processing_descriptors.c"],