From 9ac41106d8cd552b9f86781f772eae3c106294f7 Mon Sep 17 00:00:00 2001 From: Subbaraman Narayanamurthy Date: Wed, 14 Oct 2020 12:32:55 -0700 Subject: [PATCH] health: Add CAP_BLOCK_SUSPEND Add CAP_BLOCK_SUSPEND to android.hardware.health@1.0 and android.hardware.health@2.1 service so that when epoll_wait() is waiting on uevents and timer_fd events it can block suspend to take the necessary action. Without this permission, eventpoll is going to ignore the flags EPOLLWAKEUP used in health HAL or healthloop. Bug: 169873088 Change-Id: If9b0e1f60e47d7bf54942f589acbfbb883b9bac8 --- health/1.0/default/android.hardware.health@1.0-service.rc | 2 +- health/2.1/default/android.hardware.health@2.1-service.rc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/health/1.0/default/android.hardware.health@1.0-service.rc b/health/1.0/default/android.hardware.health@1.0-service.rc index 405784f9fa..569dc8851a 100644 --- a/health/1.0/default/android.hardware.health@1.0-service.rc +++ b/health/1.0/default/android.hardware.health@1.0-service.rc @@ -2,4 +2,4 @@ service vendor.health-hal-1-0 /vendor/bin/hw/android.hardware.health@1.0-service class hal user system group system - capabilities WAKE_ALARM + capabilities WAKE_ALARM BLOCK_SUSPEND diff --git a/health/2.1/default/android.hardware.health@2.1-service.rc b/health/2.1/default/android.hardware.health@2.1-service.rc index b6d9e3bcf3..8728257862 100644 --- a/health/2.1/default/android.hardware.health@2.1-service.rc +++ b/health/2.1/default/android.hardware.health@2.1-service.rc @@ -2,5 +2,5 @@ service health-hal-2-1 /vendor/bin/hw/android.hardware.health@2.1-service class hal charger user system group system - capabilities WAKE_ALARM + capabilities WAKE_ALARM BLOCK_SUSPEND file /dev/kmsg w