mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-02-01 03:40:35 +00:00
Merge "Power: Fix interaction boost calculation" into oc-dr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3283943836
@@ -148,7 +148,7 @@ void InteractionHandler::Acquire(int32_t duration) {
|
||||
|
||||
struct timespec cur_timespec;
|
||||
clock_gettime(CLOCK_MONOTONIC, &cur_timespec);
|
||||
if (finalDuration <= mDurationMs) {
|
||||
if (mState != INTERACTION_STATE_IDLE && finalDuration <= mDurationMs) {
|
||||
long long elapsed_time = CalcTimespecDiffMs(mLastTimespec, cur_timespec);
|
||||
// don't hint if previous hint's duration covers this hint's duration
|
||||
if (elapsed_time <= (mDurationMs - finalDuration)) {
|
||||
|
||||
Reference in New Issue
Block a user