diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2021-08-18 17:17:57 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-08-18 17:17:57 +0000 |
commit | dd589c6ee1705b61e2b01f5ed6fcf10d0bea4690 (patch) | |
tree | 3de99f48a4bcf852cdae65f0b0b3d6340161abe0 | |
parent | f1637ed57c95916d52c44d00fadae9f0416dc313 (diff) | |
parent | 4b5a0f8e11d175f0e83c1c3475f271321e74f07b (diff) | |
download | hikey-dd589c6ee1705b61e2b01f5ed6fcf10d0bea4690.tar.gz |
suspend_blocker: Use Cuttlefish's workaround to avoid suspending the device am: 4b5a0f8e11
Original change: https://android-review.googlesource.com/c/device/linaro/hikey/+/1799867
Change-Id: I2bf1c7c3b0fb74ddeab4160e60dbb5b6c4bba614
-rw-r--r-- | device-common.mk | 4 | ||||
-rw-r--r-- | init.common.rc | 6 | ||||
-rw-r--r-- | sepolicy/file_contexts | 1 | ||||
-rw-r--r-- | sepolicy/suspend_blocker.te | 6 |
4 files changed, 17 insertions, 0 deletions
diff --git a/device-common.mk b/device-common.mk index 1eb2e56f..e5506ec2 100644 --- a/device-common.mk +++ b/device-common.mk @@ -253,3 +253,7 @@ PRODUCT_COPY_FILES += \ PRODUCT_PACKAGES += \ android.hardware.health@2.1-impl-cuttlefish \ android.hardware.health@2.1-service + +# TODO: disable this service once we implement system suspend +PRODUCT_PACKAGES += \ + suspend_blocker diff --git a/init.common.rc b/init.common.rc index 7018eeff..e864a645 100644 --- a/init.common.rc +++ b/init.common.rc @@ -115,3 +115,9 @@ service bugreport /system/bin/dumpstate -d -p -z class main disabled oneshot + +# TODO: disable this service once we implement system suspend +service suspend_blocker /vendor/bin/suspend_blocker + class early_hal # Start together with system_suspend HAL + group system + user root diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 1e712113..9592d82e 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -20,6 +20,7 @@ /(vendor|system/vendor)/bin/uim u:object_r:hci_attach_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.bluetooth@1\.0-service\.hikey u:object_r:hal_bluetooth_hikey_exec:s0 /(vendor|system/vendor)/bin/nanoapp_cmd u:object_r:nanoapp_cmd_exec:s0 +/(vendor|system/vendor)/bin/suspend_blocker u:object_r:suspend_blocker_exec:s0 /(vendor|system/vendor)/lib(64)?/hw/gralloc\.hikey960\.so u:object_r:same_process_hal_file:s0 /(vendor|system/vendor)/lib(64)?/hw/gralloc\.hikey\.so u:object_r:same_process_hal_file:s0 diff --git a/sepolicy/suspend_blocker.te b/sepolicy/suspend_blocker.te new file mode 100644 index 00000000..fa6e02a8 --- /dev/null +++ b/sepolicy/suspend_blocker.te @@ -0,0 +1,6 @@ +type suspend_blocker, domain; +type suspend_blocker_exec, exec_type, vendor_file_type, file_type; + +init_daemon_domain(suspend_blocker); + +wakelock_use(suspend_blocker); |