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

Commit 3af168c8 authored by James Lemieux's avatar James Lemieux
Browse files

Refactor the mechanism for delivering periodic callbacks

Bug: 25983208
Bug: 26381960

Periodic timed callbacks are used to update portions of the UI that
may change at time boundaries, such as date displays when midnight
passes. The old mechanism required the API user to define their own
Handler and also compute and schedule each callback. Also, no
corrective rescheduling occurred if the device time changed.

The new design introduces PeriodicCallbackModel as a delegate to
UiDataModel. The delegate removes all of the burdens associated
with scheduling and canceling period callbacks. The caller need only
supply the Runnable that contains the logic to execute and an offset
in millis if they want to be called before or after the period ends.

Change-Id: Ibb51b22af081fc4df60ee1c561f2c9aaf1ddef96
parent afe50f77
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