vendor: alarm: Fix power_off_alarm on offline charging

[1] - Qualcomm doesn't enable this by default on some platforms, so some OEMs like Xiaomi and OnePlus add this to fix it.

Change-Id: I7c786e090d96d6c5b71eaa4a18222434167a59dc
Signed-off-by: chrisl7 <wandersonrodriguesf1@gmail.com>
This commit is contained in:
chrisl7 2023-06-21 22:23:26 -04:00 committed by CHRISL7
parent 5d404e2955
commit 9e90b95e0c
3 changed files with 18 additions and 0 deletions

9
vendor/alarm/Android.bp vendored Normal file
View File

@ -0,0 +1,9 @@
soong_namespace {
}
prebuilt_etc {
name: "init.qcom.alarm.rc",
src: "init.qcom.alarm.rc",
sub_dir: "init",
vendor: true,
}

2
vendor/alarm/init.qcom.alarm.rc vendored Normal file
View File

@ -0,0 +1,2 @@
on charger
start vendor.power_off_alarm

View File

@ -4,5 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
PRODUCT_SOONG_NAMESPACES += \
device/qcom/common/vendor/alarm
# Init script
PRODUCT_PACKAGES += \
init.qcom.alarm.rc
# Get non-open-source specific aspects. # Get non-open-source specific aspects.
$(call inherit-product-if-exists, vendor/qcom/common/vendor/alarm/alarm-vendor.mk) $(call inherit-product-if-exists, vendor/qcom/common/vendor/alarm/alarm-vendor.mk)