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

Commit 09f85276 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Avoid crashing when sensors are under stress

Fixes: 127657926
Test: make
Change-Id: Ifb24032454fd76860758cc983e877f5db314d0d3
parent 5d424061
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -93,7 +93,13 @@ public class DozeUi implements DozeMachine.Part {
                new DozeHost.PulseCallback() {
                    @Override
                    public void onPulseStarted() {
                        try {
                            mMachine.requestState(DozeMachine.State.DOZE_PULSING);
                        } catch (IllegalStateException e) {
                            // It's possible that the pulse was asynchronously cancelled while
                            // we were waiting for it to start (under stress conditions.)
                            // In those cases we should just ignore it. b/127657926
                        }
                    }

                    @Override