sdm660-common: power-libperfmgr: Add support for tap-to-wake feature control
Signed-off-by: Subhajeet Muhuri <kenny3fcb@gmail.com> Change-Id: Ideb02c659d64cdde4ee2f46c2631f7b42d003b05
This commit is contained in:
parent
b5e7add355
commit
1bb29d8296
1 changed files with 14 additions and 2 deletions
|
@ -29,6 +29,10 @@
|
|||
#include <utils/Log.h>
|
||||
#include <utils/Trace.h>
|
||||
|
||||
#ifndef TAP_TO_WAKE_NODE
|
||||
#define TAP_TO_WAKE_NODE "/sys/touchpanel/double_tap"
|
||||
#endif
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace power {
|
||||
|
@ -136,8 +140,16 @@ Return<void> Power::powerHint(PowerHint_1_0 hint, int32_t data) {
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> Power::setFeature(Feature /*feature*/, bool /*activate*/) {
|
||||
// Nothing to do
|
||||
Return<void> Power::setFeature(Feature feature, bool activate) {
|
||||
switch (feature) {
|
||||
#ifdef TAP_TO_WAKE_NODE
|
||||
case Feature::POWER_FEATURE_DOUBLE_TAP_TO_WAKE:
|
||||
::android::base::WriteStringToFile(activate ? "1" : "0", TAP_TO_WAKE_NODE);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return Void();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue