Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e2ae5cd4 authored by Prem Edhara's avatar Prem Edhara
Browse files

Check if doze was forced before turning device active.

Bug: 325090418

Test: Manually verified that putting the watch on-body doesn't make the device active when deep doze has been enabled through adb.

Change-Id: I7d5b0334f13f9f0170c909a8fd2b9fc99b99a900
parent dc5a7c2b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -893,8 +893,9 @@ public class DeviceIdleController extends SystemService
            }
            // Fall through when quick doze is not requested.

            if (!mIsOffBody) {
                // Quick doze was not requested and device is on body so turn the device active.
            if (!mIsOffBody && !mForceIdle) {
                // Quick doze wasn't requested, doze wasn't forced and device is on body
                // so turn the device active.
                mActiveReason = ACTIVE_REASON_ONBODY;
                becomeActiveLocked("on_body", Process.myUid());
            }