kunlun2: power-libperfmgr: Add support for tap-to-wake feature control
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
This commit is contained in:
parent
5c6a44f762
commit
3cb57f00ca
1 changed files with 14 additions and 2 deletions
|
@ -32,6 +32,10 @@
|
||||||
#include "Power.h"
|
#include "Power.h"
|
||||||
#include "display-helper.h"
|
#include "display-helper.h"
|
||||||
|
|
||||||
|
#ifndef TAP_TO_WAKE_NODE
|
||||||
|
#define TAP_TO_WAKE_NODE "/sys/class/touch/tp_dev/gesture_on"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace android {
|
namespace android {
|
||||||
namespace hardware {
|
namespace hardware {
|
||||||
namespace power {
|
namespace power {
|
||||||
|
@ -212,8 +216,16 @@ Return<void> Power::powerHint(PowerHint_1_0 hint, int32_t data) {
|
||||||
return Void();
|
return Void();
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<void> Power::setFeature(Feature /*feature*/, bool /*activate*/) {
|
Return<void> Power::setFeature(Feature feature, bool activate) {
|
||||||
// Nothing to do
|
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();
|
return Void();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue