Merge changes I5f1a954d,Ibeaac890,Id9f9dfc5
* changes:
hikey/hikey960: Drop old bluetooth HAL as its no longer needed
hikey/hikey960: Clean up old build options for old kernels
hikey960: BoardConfig.mk: Remove legacy dtb fstab logic
diff --git a/device-common.mk b/device-common.mk
index 6525fe6..61e5024 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -246,3 +246,7 @@
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 7018eef..e864a64 100644
--- a/init.common.rc
+++ b/init.common.rc
@@ -115,3 +115,9 @@
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 1e71211..9592d82 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 0000000..fa6e02a
--- /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);