From 312ccd4c636a1307731fd655d1e41afa52902902 Mon Sep 17 00:00:00 2001 From: Roger Liao Date: Wed, 13 Jul 2022 00:29:19 +0800 Subject: [PATCH 1/3] gs201: exclude vendor telephony code if BOARD_WITHOUT_RADIO Bug: 235907512 Bug: 238702410 Bug: 238702413 Test: build pass, boot successfully, adb shell pm list features Change-Id: Id2923e5b8ea0cce844a6436ce2a4b83a428c5b14 --- device-common.mk | 2 ++ device.mk | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/device-common.mk b/device-common.mk index 0ceb1242..05d0d4ed 100644 --- a/device-common.mk +++ b/device-common.mk @@ -14,7 +14,9 @@ # limitations under the License. # +ifneq ($(BOARD_WITHOUT_RADIO),true) -include vendor/google_devices/gs201/proprietary/telephony/device-vendor.mk +endif include device/google/gs201/device.mk include device/google/gs101/tts/voice_packs.mk diff --git a/device.mk b/device.mk index c94a8902..d3725496 100644 --- a/device.mk +++ b/device.mk @@ -60,9 +60,11 @@ LOCAL_KERNEL := $(TARGET_KERNEL_DIR)/Image.lz4 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ ro.oem_unlock_supported=1 +ifneq ($(BOARD_WITHOUT_RADIO),true) # Include vendor telephony soong namespace PRODUCT_SOONG_NAMESPACES += \ vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY) +endif ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) #Set IKE logs to verbose for WFC @@ -848,6 +850,7 @@ PRODUCT_PACKAGES += \ calliope_iva.bin \ vts.bin +ifneq ($(BOARD_WITHOUT_RADIO),true) # This will be called only if IMSService is building with source code for dev branches. $(call inherit-product-if-exists, vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)/shannon-ims/device-vendor.mk) @@ -858,6 +861,7 @@ PRODUCT_PACKAGES_DEBUG += \ TestRcsApp PRODUCT_PACKAGES += ShannonRcs +endif # Boot Control HAL PRODUCT_PACKAGES += \ From bf885d8d525a34838d0ad088cfd4c36cbd60a0cb Mon Sep 17 00:00:00 2001 From: Roger Liao Date: Thu, 14 Jul 2022 23:08:13 +0800 Subject: [PATCH 2/3] gs201: exclude telephony.carrierlock feature if BOARD_WITHOUT_RADIO Bug: 238702278 Test: build pass, boot successfully, adb shell pm list features Change-Id: I16e25061ca63a9134a20db249e469e1a4b227657 --- device-common.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/device-common.mk b/device-common.mk index 05d0d4ed..bd7ad344 100644 --- a/device-common.mk +++ b/device-common.mk @@ -20,9 +20,11 @@ endif include device/google/gs201/device.mk include device/google/gs101/tts/voice_packs.mk +ifneq ($(BOARD_WITHOUT_RADIO),true) # Telephony PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.telephony.carrierlock.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.carrierlock.xml +endif # Android Verified Boot PRODUCT_COPY_FILES += \ From 19b932eb41e9973ea52547d3494b96e272209048 Mon Sep 17 00:00:00 2001 From: Darren Hsu Date: Tue, 26 Jul 2022 18:02:24 +0800 Subject: [PATCH 3/3] powerstats: remove bluetooth data provider on the specific device The specific device uses QC solution on Bluetooth. Remove support of Bluetooth state residency data provider in PowerStatsHAL on the specific device. Bug: 231395549 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: Ic94d9ca2ddefa5ac09bc83bf156a4972562506ea Signed-off-by: Darren Hsu --- powerstats/Gs201CommonDataProviders.cpp | 12 ++++++++++-- powerstats/include/Gs201CommonDataProviders.h | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/powerstats/Gs201CommonDataProviders.cpp b/powerstats/Gs201CommonDataProviders.cpp index e361fc56..35e405d4 100644 --- a/powerstats/Gs201CommonDataProviders.cpp +++ b/powerstats/Gs201CommonDataProviders.cpp @@ -632,10 +632,9 @@ void addPixelStateResidencyDataProvider(std::shared_ptr p) { p->addStateResidencyDataProvider(std::move(pixelSdp)); } -void addGs201CommonDataProviders(std::shared_ptr p) { +void addCommonDataProviders(std::shared_ptr p) { setEnergyMeter(p); - addPixelStateResidencyDataProvider(p); addAoC(p); addDvfsStats(p); addSoC(p); @@ -655,6 +654,15 @@ void addGs201CommonDataProviders(std::shared_ptr p) { addPlaceholderEnergyConsumers(p); } +void addGs201CommonDataProviders(std::shared_ptr p) { + addCommonDataProviders(p); + addPixelStateResidencyDataProvider(p); +} + +void addGs201CommonDataProvidersQc(std::shared_ptr p) { + addCommonDataProviders(p); +} + void addNFC(std::shared_ptr p, const std::string& path) { const GenericStateResidencyDataProvider::StateResidencyConfig nfcStateConfig = { .entryCountSupported = true, diff --git a/powerstats/include/Gs201CommonDataProviders.h b/powerstats/include/Gs201CommonDataProviders.h index a4b9232a..9fca9ba9 100644 --- a/powerstats/include/Gs201CommonDataProviders.h +++ b/powerstats/include/Gs201CommonDataProviders.h @@ -21,5 +21,5 @@ using aidl::android::hardware::power::stats::PowerStats; void addGs201CommonDataProviders(std::shared_ptr p); - +void addGs201CommonDataProvidersQc(std::shared_ptr p); void addNFC(std::shared_ptr p, const std::string& path);