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

Skip to content
Commit 9042b0b5 authored by James Lemieux's avatar James Lemieux
Browse files

Introduce StopwatchListener to gracefully handle BOOT_COMPLETE

After a device reboot, there is a window of opportunity (about 15 seconds)
in which the user may open the Clock app and view the stopwatch. They
will see the stopwatch in a non-operational state. When BOOT_COMPLETE
is finally broadcast, the stopwatch is reset and the laps are cleared.

Prior to this change, the stale lap data would continue to be displayed
because no mechanism existed to notify StopwatchFragment of changes
to the stopwatch data by an external entity.

This change introduces StopwatchListener, which is notified of changes to
the stopwatch and its laps. The StopwatchFragment uses this listener to
react to stopwatch changes from external entities, such as the
BOOT_COMPLETE receiver.

Clearing laps is now a byproduct of resetting the stopwatch instead of an
independent update to the model.

Change-Id: Ie1aa3d3e5006d8a28947cb3cd6343175d1c3644c
parent 19ebe094
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment