From 66077ef4ed0c8c6b81ac5548f5c69f7a63df709e Mon Sep 17 00:00:00 2001 From: shawnlin Date: Fri, 1 Apr 2022 11:19:28 +0800 Subject: [PATCH 1/2] Fixed status bar glitch for apps that access internal resource dimen Bring back old usage of status_bar_height, status_bar_height_portrait, and status_bar_height_landscape by set the size containing cutout size. Bug: 216782082 Test: make Change-Id: I862dac1658dd54ce03150a2b36d3c260869d878f --- .../overlay/frameworks/base/core/res/res/values/dimens.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bluejay/overlay/frameworks/base/core/res/res/values/dimens.xml b/bluejay/overlay/frameworks/base/core/res/res/values/dimens.xml index 86ad4e7..9242608 100644 --- a/bluejay/overlay/frameworks/base/core/res/res/values/dimens.xml +++ b/bluejay/overlay/frameworks/base/core/res/res/values/dimens.xml @@ -26,7 +26,9 @@ - 28dp + 28dp + 145px + 28dp 5px From 6c790dd4db7b59f6831f966433dbda29179c4481 Mon Sep 17 00:00:00 2001 From: chungkai Date: Thu, 7 Apr 2022 02:04:45 +0000 Subject: [PATCH 2/2] fix path for i2c peripheral device paths are changed when we enable parallel module loading and reorder the initializtaion of devices. Test: without avc denial on B3 when booting Bug: 227541760 Signed-off-by: chungkai Change-Id: I643b4d06b24bbcad069595fedabb63ac6c36ef09 --- powerstats/bluejay/service.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/powerstats/bluejay/service.cpp b/powerstats/bluejay/service.cpp index 0fe1c04..2138fa3 100644 --- a/powerstats/bluejay/service.cpp +++ b/powerstats/bluejay/service.cpp @@ -26,6 +26,7 @@ #include #include #include +#include using aidl::android::hardware::power::stats::DisplayStateResidencyDataProvider; using aidl::android::hardware::power::stats::EnergyConsumerType; @@ -54,6 +55,8 @@ void addDisplay(std::shared_ptr p) { } int main() { + struct stat buffer; + LOG(INFO) << "Pixel PowerStats HAL AIDL Service is starting."; // single thread @@ -63,8 +66,19 @@ int main() { addGs101CommonDataProviders(p); addDisplay(p); - addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-3/i2c-st21nfc/power_stats"); - + if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-3/i2c-st21nfc/power_stats", &buffer)) { + addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-3/i2c-st21nfc/power_stats"); + } else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-4/i2c-st21nfc/power_stats", &buffer)) { + addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-4/i2c-st21nfc/power_stats"); + } else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-5/i2c-st21nfc/power_stats", &buffer)) { + addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-5/i2c-st21nfc/power_stats"); + } else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-6/i2c-st21nfc/power_stats", &buffer)) { + addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-6/i2c-st21nfc/power_stats"); + } else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-7/i2c-st21nfc/power_stats", &buffer)) { + addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-7/i2c-st21nfc/power_stats"); + } else { + addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-8/i2c-st21nfc/power_stats"); + } const std::string instance = std::string() + PowerStats::descriptor + "/default"; binder_status_t status = AServiceManager_addService(p->asBinder().get(), instance.c_str()); LOG_ALWAYS_FATAL_IF(status != STATUS_OK);