mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-21 11:55:31 -04:00
universal7885: powerhint: Add battery_saver hint
This commit is contained in:
parent
6f758b2ca6
commit
53c941bb94
5 changed files with 23 additions and 6 deletions
|
|
@ -110,17 +110,15 @@ BOARD_ROOT_EXTRA_SYMLINKS := /factory:/efs
|
|||
|
||||
BOARD_SEPOLICY_TEE_FLAVOR := teegris
|
||||
include device/samsung_slsi/sepolicy/sepolicy.mk
|
||||
include hardware/samsung-ext/interfaces/sepolicy/SEPolicy.mk
|
||||
|
||||
# Sepolicy
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += \
|
||||
$(COMMON_PATH)/sepolicy/vendor \
|
||||
hardware/samsung-ext/interfaces/sepolicy/vendor
|
||||
$(COMMON_PATH)/sepolicy/vendor
|
||||
SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += \
|
||||
$(COMMON_PATH)/sepolicy/public \
|
||||
hardware/samsung-ext/interfaces/sepolicy/public
|
||||
$(COMMON_PATH)/sepolicy/public
|
||||
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += \
|
||||
$(COMMON_PATH)/sepolicy/private \
|
||||
hardware/samsung-ext/interfaces/sepolicy/private
|
||||
$(COMMON_PATH)/sepolicy/private
|
||||
|
||||
# Vendor
|
||||
TARGET_COPY_OUT_VENDOR := vendor
|
||||
|
|
|
|||
|
|
@ -9,6 +9,15 @@
|
|||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "KernelBatterySaver",
|
||||
"Path": "/sys/module/battery_saver/parameters/enabled",
|
||||
"Values": [
|
||||
"1",
|
||||
"0"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "DoubleTapToWakeEnable",
|
||||
"Path": "/sys/class/sec/tsp/cmd",
|
||||
|
|
@ -32,6 +41,12 @@
|
|||
"Node": "TouchscreenEnable",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LOW_POWER",
|
||||
"Node": "KernelBatterySaver",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
1
universal7885-common/sepolicy/vendor/file.te
vendored
1
universal7885-common/sepolicy/vendor/file.te
vendored
|
|
@ -24,3 +24,4 @@ type sysfs_modem, fs_type, sysfs_type, mlstrustedobject;
|
|||
type sysfs_mmc, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_ss_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_gpu_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_battery_saver, sysfs_type, rw_fs_type, fs_type;
|
||||
|
|
|
|||
|
|
@ -112,3 +112,5 @@ genfscon sysfs /kernel/gpu/gpu_min_clock
|
|||
genfscon sysfs /devices/platform/11500000.mali/dma_buf_gpu_mem u:object_r:sysfs_gpu:s0
|
||||
genfscon sysfs /devices/platform/11500000.mali/kprcs u:object_r:sysfs_gpu:s0
|
||||
genfscon sysfs /devices/platform/11500000.mali/total_gpu_mem u:object_r:sysfs_gpu:s0
|
||||
|
||||
genfscon sysfs /module/battery_saver/parameters/enabled u:object_r:sysfs_battery_saver:s0
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ allow hal_power_default sysfs_touchscreen_writable:dir r_dir_perms;
|
|||
allow hal_power_default sysfs_sec_touchscreen:dir r_dir_perms;
|
||||
allow hal_power_default sysfs_sec_touchscreen:file r_file_perms;
|
||||
allow hal_power_default sysfs_decon:dir search;
|
||||
w_file_recursive(hal_power_default, sysfs_battery_saver)
|
||||
|
||||
set_prop(hal_power_default, vendor_powerhal_prop)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue