| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
* commit 'fc6db0729d7f4e4570c9e56d969f4bd983065711':
Cleanup of timeout handling and message
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug: 21470513
Prevent timeout message from disappearing on rotation.
Have long timeout setting survive rotation. Following Justin's
suggestion, associate it with a given expression and reset when
expression is cleared.
This does mean that when you rotate a device displaying an expensive-
-to-compute result, the device will initially display the formula for
several seconds, before it redisplays the result. Previously you
had to reenable the long timeout. Neither is 100% ideal.
Change-Id: Ibf8e151dd37ebadf1e86adee4718e8fa8f66b975
(cherry picked from commit 5e6a0ca2fcccb9ed16a465cf2a7e30ee5f7e0e67)
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
mnc-dr-dev
* commit 'd5f67fe2d2ddabecd0618a4bc8ac899cc316ca10':
Implicitly clear on incomplete keyboard input
|
| |\ \ |
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug: 22931305
When the calculator is in result mode, cause a typed function name to
clear the display, just as touching the function on the screen would.
Change-Id: I77c69737a571ad8d2e6396fa3f34d5ada324fee4
(cherry picked from commit 5d79d10734b45133be7753955afd9e5edec58a1d)
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
mnc-dr-dev
* commit '68db0665c1e0e608c23f8a35bf97b4d39305827f':
Generalize % operator: Handle 100+10% as expected
|
| |\ \ |
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug: 22836179
Handle + or - operators specially if they are followed by a constant
or pre-evaluated expression and the % operator.
Since this is basically an idiomatic use of the operators, we
apply it very conservatively. When in doubt we use the old
interpretation.
Also fixes one unrelated anachronism in a comment.
Change-Id: I2f9fd26dd6c0456f0210815ef2bc1afca3a2b4d7
(cherry picked from commit 8afd0f85ed0b9fa1c96297c540cb74e6d8b9a64d)
|
|\| |
| | |
| | |
| | |
| | | |
* commit 'ec7517f38758f67233f2b06bc7bab17a8ffeccba':
Check for decimal point after adding ellipsis
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug: 23728152
This avoids the one case in which we displayed neither a decimal
point nor an exponent, and the decimal point was not just to the
right of the number.
Remove a redundant test, which obscured the logic.
Add a couple of suggested manual tests that helped me find a
(newly introduced, not submitted) bug.
Change-Id: Iead1efa0a4e8ea74512e9e1f77334f80bbcdd202
(cherry picked from commit 73ecff20d9dfd80d1cff09e0210d8987049b9df3)
|
|\| |
| | |
| | |
| | |
| | | |
* commit 'e4b8ff7c9c8a041ab451cdc78a019b2a4a666b99':
Don't evaluate a lone decimal point to zero
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug: 22917707
Make a constant consisting of just a decimal point produce an error
when evaluated.
Change-Id: I970c8b396894f301553171dad3c325ffac09ff57
(cherry picked from commit fa5203c051fb5139c8fc678cae3997c8a7293c84)
|
|\|
| |
| |
| |
| |
| |
| | |
mnc-dr-dev
* commit 'b7bd34886fb39401b6e38ad97634655a0d025902':
Announce when formula has been completely deleted.
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug: 23224425
Bug: 23695835
This adds a "cleared" announcement when last token/character is deleted.
Also change the existing "clear" announcements to "cleared".
Improve the comments for desc_clr and desc_del to address prior
misunderstandings.
Improve xml comment formatting consistency.
Change-Id: Ibe5197ceac132b73d72f8ace3982238249f5e82b
(cherry picked from commit db6f99979b713e491ace2f0cd9315e5c1616269b)
|
|\| |
| | |
| | |
| | |
| | | |
* commit '3d4a67d1ed392dd4788b84259d3d7ed7d694edf7':
Address FIXME comments from previous cleanup CL
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug: 24811759
Bug: 22047258
Add code to actively prevent ...99999 from getting turned back into
...00000 . This may have been imposssible anyway, but I couldn't
prove it.
Add tests for some Evaluator static functions, including the new
unflipZeroes().
Fix a minor bug in exponentEnd() discovered in the process.
The logic for limiting exponent length was wrong.
Remove some no longer needed code to force a reevaluation.
Generalize getPadding() function to repeat() and make it static.
Remove leadingZeroes() which is no longer used.
Make getMsdIndex() return the correct result even if it has changed
due to reevaluation.
Change-Id: Id457d8327ce0bc184d72ef78ddd3dbdaab7c6c78
(cherry picked from commit 7a432880b9d42b91a7069c6fb5398470f3cff19e)
|
|\| |
| | |
| | |
| | |
| | | |
* commit 'a4eb1c0703c6bef81b4446f929111419f595cd3d':
Add docs directory and contents
|
| |\ \ |
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug: 24811759
Add the following documentation files:
arithmetic-overview.html describes the approach used to get "exact"
arithmetic.
implementation-overview.html outlines the major parts of the
implementation.
Change-Id: I3c8645aabbc5fb8aa894372a1eea0b5aad4a6473
(cherry picked from commit dd895bcaedc095c6dbb4d6df7cbc941e7a2a9d8d)
|
|\| |
| | |
| | |
| | |
| | | |
* commit '114e08db3c0ed3ffb77129ee5db62645edc580bb':
BoundedRational.java cleanup
|
| |\ \ |
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug: 24811759
Bug: 21469726
Bug: 23080519
Reformat to 100 columns. Reformat simple if-statements and rename
variables for better consistency with coding conventions.
Switch many comments to javadoc style.
Consistently use signum() to compare to zero. It's more concise and
probably slightly more efficient.
Change the asBigInteger implementation to use a single
divideAndRemainder call instead of relying on gcd. Add tests.
Eliminate redundant test in maybeReduce().
Change-Id: I4c275494e076612d09a05bc317c9972008619cda
(cherry picked from commit a4511f349124ca9cd2a7f9cb742be02b832a0206)
|
|\| |
| | |
| | |
| | |
| | | |
* commit 'b13daf1050757fe3c69c2f0246de33e7e69b5fa9':
Evaluator.java and CalculatorExpr.java cleanup
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug: 24811759
Bug: 21960281
Bug: 22047258
No substantive changes.
Reformat to 100 columns.
Correct and/or remove obsolete comments and occasional bits of clearly
dead code.
Better follow coding conventions.
Rename variables for both internal consistency and consistency with
other files. This included a few renamings in Calculator.java
and CalculatorResult.java, and a comment fix in CalculatorResult.java.
Rename public fields per coding convention. Correctly declare more
nested classes static.
Document FIXME issues to be addressed in followup CL. This includes
a careful look at the msd computations. I cannot construct any
failing examples, but I also cannot currently construct a correctness
argument.
Change-Id: I5c67493eeb7730edb4b3ca3ba1cb8b7d2b87dbc2
(cherry picked from commit abe2862bc936dd083b5ba19b68c68ea4cc44b2f6)
|
|\|
| |
| |
| |
| | |
* commit '51fc9bddf33616aa8abaf4a37889efa90679e445':
Import translations. DO NOT MERGE
|
| |
| |
| |
| |
| | |
Change-Id: I3634105b46b3a4410a88c8041cecb8a77bfd8ff7
Auto-generated-cl: translation import
|
|\|
| |
| |
| |
| | |
* commit '63bd424a237b2a30240a1695ad0359bd6a6f4c99':
Properly reserve display space for non-digits
|
| |\
| | |
| | |
| | |
| | | |
* commit '80018c885a8f8c2ae32b05c4b2bcd7ae164b04fe':
Properly reserve display space for non-digits
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug: 22882700
We did not correctly calculate the extra space we might need to add
a decimal point to a scientific notation results. We also
incorrectly assumed that minus signs are the same width as a
digit. As a workaround we now reserve extra space for the possible
non-digit characters to ensure that a result is never inadvertently
truncated.
Change-Id: I79b499121703cd51bbbf3e1d85b2285a2dd5e025
|
|\| |
| | |
| | |
| | |
| | | |
* commit 'a629d7d24abebe50b3aefba4072e29b06ed259e6':
Import translations. DO NOT MERGE
|
| |\|
| | |
| | |
| | |
| | | |
* commit '9fd976e427c1c6d7242bb84787c01009e3261fdc':
Import translations. DO NOT MERGE
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I34d56cc0f6022088837820b7452ff84637355dad
Auto-generated-cl: translation import
|
|\| |
| | |
| | |
| | |
| | | |
* commit '84d6b6d289cb663c3efbfb4c1f305a3dae41f1d0':
Import translations. DO NOT MERGE
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I2cb5501fd2278919ccbc2d4168bf85ce99cc27d0
Auto-generated-cl: translation import
|
|\| |
| | |
| | |
| | |
| | | |
* commit '51f5acc6069b0ed9b4ee15132cc09e15b0307161':
Avoid starting long uninterruptible computations
|
| |\|
| | |
| | |
| | |
| | | |
* commit '82e5a2f60afd1cc330ccfa0b81b8824964e976c7':
Avoid starting long uninterruptible computations
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug: 21957088
Shorten timeouts.
We usually do short computations first, so this helps to avoid
starting absurdly big ones.
Check size of result before converting to decimal. If the decimal
conversion is likely to time out anyway, just pretent we timed out.
This turns out to avoid a lot of problems, since BigInteger decimal
conversion is the clear bottleneck for something like 100000!
And its uninterruptible.
Remove the timeout in one case in which we had previously forgotten.
Check for interrupts in a couple of more places in BoundedRational.
One of these caused log(10^100000) to hang for a long time.
One or two trivial cleanups in code that was touched anyway.
Change-Id: I3494a8ed28f681fb26634ecd90042e2f2a8008a8
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
Talkback
* commit '9d75c1ac50abcd44ab5870a56e112196dc8c87c1':
More correctly pronounce advanced operators in Talkback
|
| |\|
| | |
| | |
| | |
| | | |
* commit '8a4f81c5b30edd4e62d222a17f4e0e2140bfd99d':
More correctly pronounce advanced operators in Talkback
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug: 19190211
Bug: 19202945
Bug: 21052751
Bug: 19165054
Bug: 22594908
Add TtsSpans for operators that are otherwise misread by TalkBack.
Force correct reading for some individual characters.
This greatly improves Talkback for advanced operators in Calculator.
This is imperfect. There is no guarantee that the strings I'm
using will work in all languages. But they're almost certainly better than
what we have now. And it makes parentheses and factorial usable,
though perhaps a bit verbose.
We also no longer pronounce "sine" as "sin".
Removed some now obsolete TODO comments.
Change-Id: I5236f682be828699e08dca04ee6fa073269964f6
|
|\| |
| | |
| | |
| | |
| | | |
* commit 'd28d46e33c3303b9723c5cab7cfd0d198db01579':
Import translations. DO NOT MERGE
|
| |\|
| | |
| | |
| | |
| | | |
* commit '22c0a189febb3ee2d0149f6babc3a84e25e3594d':
Import translations. DO NOT MERGE
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ie444e4259eb75707b8549ee4e62f25844f897736
Auto-generated-cl: translation import
|
|\| |
| | |
| | |
| | |
| | | |
* commit 'b9762f77255c4980d364165bc95e7bf05f82b4c6':
Force reevaluation if mChangedValue is true
|
| |\|
| | |
| | |
| | |
| | | |
* commit 'ae807e1d4d5764d74fcbc44556945ff345c27157':
Force reevaluation if mChangedValue is true
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug: 22481292
This could result in display of an old result.
Factor out code to start a result evaluation.
Change-Id: I651d4386323c0abd7a86176b386072093345a1b1
|
|\| |
| | |
| | |
| | |
| | | |
* commit '3c46e93981e5e056df30cd7ab286b3cc0c5644b4':
Import translations. DO NOT MERGE
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ic4484a9655f7ace9bf03b310b6ee97ac5819c185
Auto-generated-cl: translation import
|