Snap for 11635697 from add0cb7c4f
to 24Q3-release
Change-Id: Ie5637d1c7aaa0dfd0e412ec8435f4d83dc5fa265
This commit is contained in:
commit
117e907772
6 changed files with 116 additions and 29 deletions
18
battery_mitigation/bm_config_comet.json
Normal file
18
battery_mitigation/bm_config_comet.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"MitigationMethod":[
|
||||
{
|
||||
"Name":"AUDIO_MITIGATION",
|
||||
"Module":"AUDIO",
|
||||
"Trigger":["OILO1"],
|
||||
"State":["LIGHT", "MEDIUM", "HEAVY", "DISABLED"],
|
||||
"Condition":"BASIC"
|
||||
},
|
||||
{
|
||||
"Name":"UNDEFINED",
|
||||
"Module":"UNDEFINED",
|
||||
"Trigger":["OILO1", "OILO2", "UVLO1", "UVLO2", "SMPL"],
|
||||
"State":["START", "LIGHT", "MEDIUM", "HEAVY", "DISABLED"],
|
||||
"Condition":"BASIC"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -79,6 +79,8 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.vendor.primarydisplay.vrr.expected_pres
|
|||
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.vendor.primarydisplay.vrr.expected_present.timeout_ns=500000000
|
||||
endif
|
||||
|
||||
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.vendor.primarydisplay.powerstats.entity_name=Inner-Display
|
||||
|
||||
PRODUCT_VENDOR_PROPERTIES += \
|
||||
vendor.primarydisplay.op.hs_hz=120 \
|
||||
vendor.primarydisplay.op.ns_hz=60
|
||||
|
@ -320,7 +322,7 @@ PRODUCT_PRODUCT_PROPERTIES += ro.odm.build.media_performance_class=34
|
|||
|
||||
# OIS with system imu
|
||||
PRODUCT_VENDOR_PROPERTIES += \
|
||||
persist.vendor.camera.ois_with_system_imu=false
|
||||
persist.vendor.camera.ois_with_system_imu=true
|
||||
|
||||
# Haptics
|
||||
# Placeholders for updates later, need to update:
|
||||
|
@ -392,6 +394,14 @@ PRODUCT_PRODUCT_PROPERTIES += \
|
|||
PRODUCT_PRODUCT_PROPERTIES += \
|
||||
persist.bluetooth.leaudio.allow_list=SM-R510
|
||||
|
||||
# Battery Mitigation Config
|
||||
ifeq (,$(TARGET_VENDOR_BATTERY_MITIGATION_CONFIG_PATH))
|
||||
TARGET_VENDOR_BATTERY_MITIGATION_CONFIG_PATH := device/google/comet/battery_mitigation
|
||||
endif
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(TARGET_VENDOR_BATTERY_MITIGATION_CONFIG_PATH)/bm_config_comet.json:$(TARGET_COPY_OUT_VENDOR)/etc/bm_config.json
|
||||
|
||||
# Exynos RIL and telephony
|
||||
# Support RIL Domain-selection
|
||||
SUPPORT_RIL_DOMAIN_SELECTION := true
|
||||
|
@ -404,3 +414,7 @@ PRODUCT_PACKAGES += \
|
|||
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
|
||||
$(call inherit-product-if-exists, device/google/common/etm/device-userdebug-modules.mk)
|
||||
endif
|
||||
|
||||
# Connectivity Resources Overlay
|
||||
PRODUCT_PACKAGES += \
|
||||
ConnectivityResourcesOverlayCometOverride
|
||||
|
|
|
@ -32,36 +32,12 @@ using aidl::android::hardware::power::stats::DisplayStateResidencyDataProvider;
|
|||
using aidl::android::hardware::power::stats::EnergyConsumerType;
|
||||
using aidl::android::hardware::power::stats::PowerStatsEnergyConsumer;
|
||||
|
||||
void addDisplay(std::shared_ptr<PowerStats> p) {
|
||||
// Add display residency stats for inner display
|
||||
struct stat primaryBuffer;
|
||||
if (!stat("/sys/class/drm/card0/device/primary-panel/time_in_state", &primaryBuffer)) {
|
||||
// time_in_state exists
|
||||
addDisplayMrrByEntity(p, "Inner Display", "/sys/class/drm/card0/device/primary-panel/");
|
||||
} else {
|
||||
// time_in_state doesn't exist
|
||||
std::vector<std::string> inner_states = {
|
||||
"Off",
|
||||
"LP: 2152x2076@1",
|
||||
"LP: 2152x2076@30",
|
||||
"On: 2152x2076@1",
|
||||
"On: 2152x2076@10",
|
||||
"On: 2152x2076@60",
|
||||
"On: 2152x2076@120",
|
||||
"HBM: 2152x2076@60",
|
||||
"HBM: 2152x2076@120"};
|
||||
|
||||
p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>(
|
||||
"Inner Display",
|
||||
"/sys/class/backlight/panel0-backlight/state",
|
||||
inner_states));
|
||||
}
|
||||
|
||||
void addOuterDisplay(std::shared_ptr<PowerStats> p) {
|
||||
// Add display residency stats for outer display
|
||||
struct stat secondaryBuffer;
|
||||
if (!stat("/sys/class/drm/card0/device/secondary-panel/time_in_state", &secondaryBuffer)) {
|
||||
// time_in_state exists
|
||||
addDisplayMrrByEntity(p, "Outer Display", "/sys/class/drm/card0/device/secondary-panel/");
|
||||
addDisplayMrrByEntity(p, "Outer-Display", "/sys/class/drm/card0/device/secondary-panel/");
|
||||
} else {
|
||||
// time_in_state doesn't exist
|
||||
std::vector<std::string> outer_states = {
|
||||
|
@ -73,7 +49,7 @@ void addDisplay(std::shared_ptr<PowerStats> p) {
|
|||
"HBM: 1080x2424@120"};
|
||||
|
||||
p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>(
|
||||
"Outer Display",
|
||||
"Outer-Display",
|
||||
"/sys/class/backlight/panel1-backlight/state",
|
||||
outer_states));
|
||||
}
|
||||
|
@ -94,8 +70,9 @@ int main() {
|
|||
|
||||
std::shared_ptr<PowerStats> p = ndk::SharedRefBase::make<PowerStats>();
|
||||
|
||||
addDisplayVrr(p, "Inner-Display");
|
||||
addZumaProCommonDataProviders(p);
|
||||
addDisplay(p);
|
||||
addOuterDisplay(p);
|
||||
|
||||
const std::string instance = std::string() + PowerStats::descriptor + "/default";
|
||||
binder_status_t status = AServiceManager_addService(p->asBinder().get(), instance.c_str());
|
||||
|
|
33
rro_overlays/ConnectivityResourcesOverlayComet/Android.bp
Normal file
33
rro_overlays/ConnectivityResourcesOverlayComet/Android.bp
Normal file
|
@ -0,0 +1,33 @@
|
|||
//
|
||||
// Copyright (C) 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.
|
||||
//
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||
}
|
||||
|
||||
runtime_resource_overlay {
|
||||
name: "ConnectivityResourcesOverlayComet",
|
||||
sdk_version: "current",
|
||||
product_specific: true,
|
||||
resource_dirs: ["res"],
|
||||
}
|
||||
|
||||
override_runtime_resource_overlay {
|
||||
name: "ConnectivityResourcesOverlayCometOverride",
|
||||
base: "ConnectivityResourcesOverlayComet",
|
||||
package_name: "com.google.android.connectivity.resources.comet",
|
||||
target_package_name: "com.google.android.connectivity.resources",
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 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.
|
||||
-->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.google.android.connectivity.resources.comet">
|
||||
<application android:hasCode="false" />
|
||||
<overlay android:targetPackage="com.android.connectivity.resources"
|
||||
android:targetName="ServiceConnectivityResourcesConfig"
|
||||
android:isStatic="true"
|
||||
android:priority="0" />
|
||||
</manifest>
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 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.
|
||||
-->
|
||||
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<bool name="config_thread_default_enabled">false</bool>
|
||||
</resources>
|
Loading…
Add table
Add a link
Reference in a new issue