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

Skip to content
Commit 31ea252f authored by Hans Boehm's avatar Hans Boehm
Browse files

Clean up Calculator state, evaluation and cancellation logic

Bug: 33216049
Bug: 33219408
Bug: 33107696

Add INIT_FOR_RESULT state to represent INIT state, when we know that
computation has previously ended in RESULT state.

Stubbornly refuse to display the history view if we are currently
in EVALUATE or INIT state. Both of these are very temporary.

Break up Calculator.onCreate() to make it a bit more manageable.

Add a number of assertion checks to detect unexpected states, etc.

Add HISTORY_MAIN_INDEX to ensure that we only have one evaluation
listener per expression being evaluated.

Add cancelNonMain to better target cancellation requests.

Remove evaluateInstantIfNecessary() hack in HistoryFragment.
We should no longer be randomly cancelling evaluations we don't
own.

Be a little more aggressive about avoid redundant evaluations.

Change-Id: I5eaf6390b597926f9255c635fb44d50b47cbd1e1
parent 03a566a1
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