Fix trigger sensor lifecycle

Make sure the mRegistered flag is updated early enough, so we don't
call cancel if we are not registered.

Bug: 23105138
Change-Id: I1feeab9ea3d0ca31eb5deaab97f6de2cfc4c3b3d
This commit is contained in:
Jorim Jaggi
2015-08-17 19:04:54 -07:00
parent aa1fd4e6d3
commit 716a734eec

View File

@@ -534,8 +534,8 @@ public class DozeService extends DreamService {
}
}
requestPulse(mPulseReason);
mRegistered = false;
requestPulse(mPulseReason);
updateListener(); // reregister, this sensor only fires once
// reset the notification pulse schedule, but only if we think we were not triggered