| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |\ \
| | | | | |
| | | | | |
| | | | | | |
into ub-calculator-euler
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Bug: 34698125
Test: Pasting while dragging history down no longer causes crashes.
Remove EvaluatorStateUtils since we now only check the display state once.
Change-Id: I22d0f3f0c967abcd8a8f70dd4cc157247bea8bed
|
| | | | |/
| | | |/|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Test: Manually verified that the floating menu never appears in error
states.
Fixes: 34888339
Change-Id: If240fb25f45d67df6562d3cd164ad5efbdf66842
|
| | | |\ \ |
|
| | | | |/
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fixes: 34801945
Immediate is no longer necessary since we don't reuse HistoryFragments.
Change-Id: Ieb31882df8e9c01b753f27f91aa9f0f70e219019
|
| | | |/
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: 34697529
We were potentially saving HISTORY_MAIN_INDEX (-1) as the expression
index for the clipboard or memory expression, without actually saving
expression at that index.
Deal with the fact that sharedpreferences or the database may have
been corrupted with such spurious -1 values.
As part of this, we also make the memory operations much more
robust against trying to use an erroneous answer. This seems like
a good idea anyway, since there are probably other, also extremely
unlikely, cases in which this can occur. (Recall that some expressions
evaluate to an error only when the precision is increased
sufficiently.)
Test: Unit tests pass. Installed old calculator and arranged to
corrupt saved location as well as some history entries. The bad
history entries show up with an answer of "Bad Expression".
Trying th use the "Bad Expression" result no longer crashes for me.
Change-Id: I0b1a897ce018353c4b67248f84fccde82fc43e92
(cherry picked from commit 7451da4b6bb1cb40440fb755e8344f90bc38ecb5)
|
| | | |\ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fixes: 34833842
Change-Id: Ie0dcaf000e423995c7c4457456ee86acf9bc0ec1
|
| | | |/
| | | |
| | | |
| | | | |
Change-Id: If72961d61d4c0ba948288ab77fb50fc9973c2ccd
|
| | | |\ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fixes: 34742420
Change-Id: Ia1e99a121855b43fbaec648a0be25e6b40d9b255
|
| | | |/
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Also removed obsolete testing files.
Test: tapas ExactCalculator && make -j8
Change-Id: I87e525e978f76ab0ffbd4d9d13789e82f1693247
|
| | | |\ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Prior to this change is was possible for DragLayout to end up in an open
state without a visible HistoryFragment. With this change we only enter
an open state after a successful view capture.
Fixes: 34157451
Test: manually verified on API 21, 23 & 25 device
Change-Id: Ia3631692ccc4281d06fd53f9b926e3043a9827f1
|
| | | |\ \
| | | | |/
| | | |/| |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Bug: 34134606
Test: manual - Talkback correctly pronounces "M minus"
Change-Id: I1f898fc9a96e685d80ba0c133e3c83fab5d94a71
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Make a new HistoryFragment every time we enter and exit history to work
around a bug on older platforms where a Fragment's internal state may
not be reset correctly when detached.
Also the HistoryFragment open/close transition is now properly animated
using a custom Animator returned by DragLayout.
Fixes: 33587141
Fixes: 33789131
Fixes: 33789337
Fixes: 34132294
Fixes: 34132998
Fixes: 34134349
Fixes: 34135442
Test: manually verified no crash occurs on API 22, 23, & 24 emulator
Change-Id: Iaefbe2bbf4ca186b6396397579887774ed5906d3
|
| | | |\ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fixes: 33747824
Change-Id: I0f41407209e2ffb3dd0b209b3370baf90e820734
|
| | | |\ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Fixes: 34081054
Fixes: 34081005
Fixes: 32987283
-Hide quick result from current expression when we are in one-line
display mode.
-Adjust bottom padding for history item in one-line mode.
-Add font padding when bottom padding for items is 0 to prevent running
into the bottom edge of the display.
Change-Id: Icf3ddd4951ac0e4ab680124ecff7dd5258ccc05f
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Fixes: 33587141
Fragment entry animation is there by default, but this removes the exit
animation for all platforms.
Change-Id: I326bf64c1eae1fe251d7729333eeee8aeea0fa1c
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Test: Verify that dragging history open/closed still works properly.
Fixes: 34079549
Change-Id: I9a53a6631cfc97e40bbfd0dccfe6e28e03792c09
|
| | | |\ \ \ \
| | | | |_|_|/
| | | |/| | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Bug: 33458518
Test: manual - compiles, and can still enter, calculate, and inflate
the context menus on API 21 and 25.
Change-Id: Ib5f01e89854248c77cb6484bca46086f34be1ca7
|
| | | |\ \ \ \
| | | | |/ / /
| | | |/| | | |
|
| | | | |/ /
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Change-Id: If51da04c83df2184e1dc0877b4e57d52f4afe5ec
Auto-generated-cl: translation import
|
| | | |/ /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Bug: 34051652
Add a mechanism to wait for (asynchronous) database writes to
complete.
Invoke it in Calculator.onSaveInstanceState(). This avoids a potential
situation in which the saved instance state bundle includes a reference
to an expression that never made it to the database. This may be more
likely than it appears, since we run all background tasks on a single
thread. A database save operation can get hung up behind a computation.
Note that in almost all cases, the wait operation will return
immediately, as evidenced by the fact that this very rarely
leads to crashes without the wait operation.
Change-Id: I7c2bdcd9bf19f6cb4bd653fb9244bca0f6b25435
|
| | | |\ \ |
|
| | | | |/
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fixes: 33752155
Update status bar colors to better match.
Change-Id: Ie0872b7371eaf1e85e85a90cf33fcba5b5537d96
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Bug: 34051652
Change-Id: I8b504ad4a5b0e12b9ad4496b4a1e2a30e8017971
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I73f25e8bcfd5bfe2ac59b30bb8683144f84bdc8c
Auto-generated-cl: translation import
|
| | | |\ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Change-Id: If175f1b94004d17ec8992326bb8ec193c90fac34
Auto-generated-cl: translation import
|
| | | |/ /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Bug: 33751444
When reinitializing the calculator after restarting in RESULT state,
we were reconstructing the last history entry from the main expression,
without correctly restoring the timestamp. Instead read the expression,
together with its timestamp, from the database.
Correctly distinguish between result-already-saved and
result-not-yet-saved states when evaluation completes.
There may be very odd cases in which we generate an error the first
time, setting the state to INIT, and successfully evaluate the
second time (because we need less precision) that the old logic
didn't handle. And testing for INIT_FOR_RESULT is cleaner anyway.
(We can still, under very weird conditions, put expressions in the
history that generate an error after evaluating correctly the
first time. We should be robust against that already.)
Add a couple of comments that would have made this easier to track
down.
Change-Id: I85756cca5d8fb76b2cbeb9ed32a788ae71b6d65e
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Bug: 33703223
Evaluator was remembering the Activity with which it had been
created, not necessarily the current one. This interfered with
proper display of things like timeout messages that rely on the
remembered Activity.
Use the Application rather than Activity context for the DB helper,
since it outlives the Activity.
Remove unused mActivity from ExpressionDB.
Also acouple of trivial cleanups for minor annoyances found while
debugging:
1. Add some missing final declarations.
2. Fix a comment.
Change-Id: Iefe1fb588f66a1c77c82164680306377917c07af
|
| | | |/
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: 33461918
Test: manual - tested on API 25 device and API 21 emulator
Change-Id: I2e143795c395c4e191f4c7f1f1c1e78f7e011994
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: I51b8d36cbc9d70add0c82add93922dbca92fafe8
Auto-generated-cl: translation import
|
| | | |\ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Bug: 26175989
Bug: 33458621
Fix the determination of whether the currently displayed result is
already exact. The old logic failed to deal with the odd corner
case in which we force an initial scientific notation display because
we don't have room for digit separators.
When we recompute the exact result as part of a copy operation,
and the exact result is an integer, do not add a trailing decimal
point.
Change-Id: I3f673fc428cf6982eeaf6aa1037b9f522ea2d6f9
|
| | | |\ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fixes: 33429660
Toggle accessibility importance of main Calculator elements based on
the open state of DragLayout. This is necessary due to the fact that
Talkback does not use visibility as a cue for determining accessibility
importance in RelativeLayout, which is the base class of DragLayout.
Without this workaround, it's possible to traverse to main Calculator
elements even when HistoryFragment is open.
Change-Id: Iff3d775ec72aa50fe8972c1def32f4999d90a8f9
|
| | | |\ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
ub-calculator-euler
|
| | | | |/ /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Bug: 33555997
Otherwise the history display would see the erroneous result
and force reevaluation and error message display, even when the user
did not type "=".
Change-Id: Id3954abb886ad20cb526131cbe405db4bf5ca16b
|
| | | |\ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
ub-calculator-euler
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Bug: 33458518
Test: manual - have nothing in the clipboard, open the app, tap
'MS' in the context menu, long-press the formula and the 'MR'
button should appear in the context menu.
Change-Id: I690906cb8ad57c4f5b45309c0670550f7089cbf6
|
| | | | |/ /
| | | |/| |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Bug: 33580318
Evaluator.cancel needs to check that the evaluator is not an
AsyncReevaluator before calling suppressCancelMessage.
Change-Id: I379fdebcc7e14aff894b2b4d3fcc7553f8dc2fe3
|
| | | |\ \ \ |
|
| | | | | |/
| | | | |/|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Bug: 33555997
We were losing the error message by never evaluating for
HISTORY_MAIN_INDEX. But in the error case, we need to regenerate the
error notification.
We now store a special error value in the result string, so that
we can distinguish the error case.
Change-Id: I1311ce94a214da01d2e975666f6cb927fcd836f1
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Bug: 33533120
Change-Id: I8aebade6689ff6011d2019a9ff8c32f629defb9e
|