From 4d90bc1647d2c99362abad405a25df4c8c9526a2 Mon Sep 17 00:00:00 2001 From: Nelson Li Date: Thu, 2 May 2024 07:30:50 +0000 Subject: [PATCH] Refactor product inheritance for slider products Add an additional layer of inheritance for `aosp_slider`, `full_slider`, and `aosp_slider_hwasan`. This change adds a common layer of inheritance for non-factory products (slider_generic.mk). This makes it easier to configure factory and non-factory products differently. Non-factory `slider` products now inherits from `device/google/raviole/slider_generic.mk` which inherit from `device/google/raviole/device-slider.mk`. aconfig flags: Flag: EXEMPT mechanical refactoring build flags: Flag: EXEMPT mechanical refactoring Bug: 338332183 Bug: 338333277 Test: lunch aosp_slider-trunk_staging-userdebug && m lunch full_slider-trunk_staging-userdebug && m lunch aosp_slider_hwasan-trunk_staging-userdebug && m Change-Id: If0bbcdf2d4de3c2eca14e514b863f7416ef12e45 --- aosp_slider.mk | 2 +- slider_generic.mk | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 slider_generic.mk diff --git a/aosp_slider.mk b/aosp_slider.mk index 29351f5..9e65926 100644 --- a/aosp_slider.mk +++ b/aosp_slider.mk @@ -14,7 +14,7 @@ # limitations under the License. # $(call inherit-product, device/google/gs101/aosp_common.mk) -$(call inherit-product, device/google/raviole/device-slider.mk) +$(call inherit-product, device/google/raviole/slider_generic.mk) PRODUCT_NAME := aosp_slider PRODUCT_DEVICE := slider diff --git a/slider_generic.mk b/slider_generic.mk new file mode 100644 index 0000000..52d2542 --- /dev/null +++ b/slider_generic.mk @@ -0,0 +1,17 @@ +# +# Copyright 2024 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/raviole/device-slider.mk)