[BugFix]Fix enter deep doze when moving
We should reset mRunningStats after getStationaryStatus as it was used in getStationaryStatus. This issue leads to enter deep doze and disable gps when driving. Change-Id: I0e43c64e89ec1450f9241d0a550dde17de37bee0 Signed-off-by: xiamengsen <xiamengsen@xiaomi.com>
This commit is contained in:
@@ -231,8 +231,8 @@ public class AnyMotionDetector {
|
||||
Slog.d(TAG, "mCurrentGravityVector = " + currentGravityVectorString);
|
||||
Slog.d(TAG, "mPreviousGravityVector = " + previousGravityVectorString);
|
||||
}
|
||||
mRunningStats.reset();
|
||||
status = getStationaryStatus();
|
||||
mRunningStats.reset();
|
||||
if (DEBUG) Slog.d(TAG, "getStationaryStatus() returned " + status);
|
||||
if (status != RESULT_UNKNOWN) {
|
||||
if (mWakeLock.isHeld()) {
|
||||
|
||||
Reference in New Issue
Block a user