Fix timeout, cancellation and instant display logic
Bug: 20668802 Bug: 20484451 Bug: 20734909 Bug: 20738335 Change the timeout implementation to not rely on removing scheduled timeouts when an evaluation completes. This seems simper, more clearly correct and, unlike its predessessor seems to work reliably. Correctly display "cancelled" message, but only when cancelled for a reason other than timeout. Change SyntaxError to not be a Java "Error", since we routinely recover from it. Better support evaluation of partial expressions by removing trailing operators. Make some attempt to avoid redundant evaluations, since they're not as cheap as they used to be. Change the display logic to avoid frequent clearing of the display, which resulted in visible flashing. Note that the evaluation logic can now stop evaluating before the end of an expression. Substantially lengthen timeout used when computing an unrequested result. Inverse trig functions can be slow. See b/20729963. Make large factorial computations interruptable, as I mistakenly thought they were. Ignore "=" on an empty expression. I'm not positive this fixes the b/20484451, but I haven't been able to reproduce it with this patch. I have no idea whether it addresses b/20738335, but it cleans up code in that vicinity, so it would be interesting to know whether that is still reproducible. Change-Id: I67af5afc00e19a6156e1547ce4e2060c70ca367f
Loading
Please register or sign in to comment