Snap for 11373247 from 76d156d5cb
to 24Q2-release
Change-Id: Ifd2d0eb433dab6d31df95e93bf21dfd087071258
This commit is contained in:
commit
2e8eab1e7f
2 changed files with 18 additions and 11 deletions
|
@ -232,7 +232,7 @@ PRODUCT_VENDOR_PROPERTIES += \
|
||||||
|
|
||||||
# Increment the SVN for any official public releases
|
# Increment the SVN for any official public releases
|
||||||
PRODUCT_VENDOR_PROPERTIES += \
|
PRODUCT_VENDOR_PROPERTIES += \
|
||||||
ro.vendor.build.svn=31
|
ro.vendor.build.svn=33
|
||||||
|
|
||||||
# Set support hide display cutout feature
|
# Set support hide display cutout feature
|
||||||
PRODUCT_PRODUCT_PROPERTIES += \
|
PRODUCT_PRODUCT_PROPERTIES += \
|
||||||
|
|
|
@ -36,6 +36,12 @@ using aidl::android::hardware::power::stats::PowerStatsEnergyConsumer;
|
||||||
|
|
||||||
void addDisplay(std::shared_ptr<PowerStats> p) {
|
void addDisplay(std::shared_ptr<PowerStats> p) {
|
||||||
// Add display residency stats
|
// Add display residency stats
|
||||||
|
struct stat buffer;
|
||||||
|
if (!stat("/sys/class/drm/card0/device/primary-panel/time_in_state", &buffer)) {
|
||||||
|
// time_in_state exists
|
||||||
|
addDisplayMrr(p);
|
||||||
|
} else {
|
||||||
|
// time_in_state doesn't exist
|
||||||
std::vector<std::string> states = {
|
std::vector<std::string> states = {
|
||||||
"Off",
|
"Off",
|
||||||
"LP: 1080x2400@30",
|
"LP: 1080x2400@30",
|
||||||
|
@ -47,6 +53,7 @@ void addDisplay(std::shared_ptr<PowerStats> p) {
|
||||||
p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>("Display",
|
p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>("Display",
|
||||||
"/sys/class/backlight/panel0-backlight/state",
|
"/sys/class/backlight/panel0-backlight/state",
|
||||||
states));
|
states));
|
||||||
|
}
|
||||||
|
|
||||||
// Add display energy consumer
|
// Add display energy consumer
|
||||||
p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterAndEntityConsumer(p,
|
p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterAndEntityConsumer(p,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue