58ed708c1dcdf621b8918b437aafc64373ef9e83 |
|
22-Jan-2016 |
Hans Boehm <hboehm@google.com> |
Cancel in-progress computations before saving state Bug: 26177070 We weren't cancelling in-progress computations, which caused the resulting events to arrive after the state was already saved. Change-Id: If694ca6e01d53fc2c8ee451e917b7a0f8510f51d
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
5e6a0ca2fcccb9ed16a465cf2a7e30ee5f7e0e67 |
|
23-Sep-2015 |
Hans Boehm <hboehm@google.com> |
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
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
5d79d10734b45133be7753955afd9e5edec58a1d |
|
17-Sep-2015 |
Hans Boehm <hboehm@google.com> |
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
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
db6f99979b713e491ace2f0cd9315e5c1616269b |
|
19-Aug-2015 |
Hans Boehm <hboehm@google.com> |
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
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
3666e6390cea89085f65ba507f6eac346abbf009 |
|
28-Jul-2015 |
Hans Boehm <hboehm@google.com> |
Evaluator.java and CalculatorExpr.java cleanup 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)
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
8a4f81c5b30edd4e62d222a17f4e0e2140bfd99d |
|
09-Jul-2015 |
Hans Boehm <hboehm@google.com> |
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
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
0b9806f624f25e7e0302da4cf55eda21f8c28163 |
|
30-Jun-2015 |
Hans Boehm <hboehm@google.com> |
Support pasting of scientific notation numbers Bug: 21470972 Support pasting of numbers using scientific notation with 'E'. This is intentionally very restricted to dodge ambiguities with the constant e. We only accept a scientific notation constant if it is 1) Contained within a single pasted text element. 2) Uses capital 'E' to introduce the exponent. 3) Does not contain an explicit '+' in the exponent. We do currently use the same notion of 'digit' as elsewhere, i.e. Character.isDigit(), which might be too general. For consistency, and to make sure that we can recognize machine generated output, this also adds a few more aliases for text input of arithmetic operators. For consistency, always use 'E' internally for scientific notation as well. We ensure that a pasted numeric string is not concatenated with a pre-existing constant. This is a judgment call, but it means that pasting a previous calculator result gets similar treatment whether or not we are still running the same calculator instance. We support limited editing on exponents. Once an exponent is deleted, the only way to restore it is via pasting. The 10^x button produces similar results, though with different operator precedence behavior. Change-Id: I2d0f3dceb641cdad327fd3c3540b5eea38030146
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
ccc556621d3c0fe59c4878ce9c62322ff326041e |
|
07-Jul-2015 |
Hans Boehm <hboehm@google.com> |
Have TalkBack announce results and formula changes Bug: 21048155 Bug: 19189356 Incrementally announce additions to the formula. Explicitly announce result after hitting equals. Announce when display is cleared. Remove old FIXME comment after a bit more testing. Change-Id: I836ff6672de3f891888b2724470290c8721d4fcf
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
a3723849baeec57260a83e01131e6db612a4ec44 |
|
25-Jun-2015 |
Hans Boehm <hboehm@google.com> |
Reimplement overflow menu messages as DialogFragments Bug: 20650813 This preserves fraction and "with leading digits" displays during rotation. It also turns out to easily support copy, which is a useful bonus, since it was an obvious hole in the UI for the fraction display. For the "with leading digits" display, this is similar to a plain display copy, but it allows character-level selection. Much of the code here was cloned from Justin's. Change-Id: I4805280fa6a46f06833be0bde9563c3ce04dca45
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
c1ea091ae1a4d5145069bfc6248f83f5ca8f0b31 |
|
20-Jun-2015 |
Hans Boehm <hboehm@google.com> |
Improve logic for evaluation/animation interruption Bug: 21471857 Bug: 20819212 End rather than cancel() in-progress animation in the event of user interaction. Discard input that interrupted a computation only for delete, and clear, where it seems to make sense. Use similar interruption logic for physical keyboard input as for touch. Make integer exponentiation more interruptible. This remains imperfect; the latencies in a single BigInteger multiplication can be high. Filed b/21957088 to track that. Clear "instant" result before launching reevaluation. Otherwise the example from b/21957088 shows incorrect instant results for an uncomfortably long time as it's being entered. Correct some of the state maintenance operations in Calculator.java. The ANIMATE state was not being used correctly. Remove redundant cancelAll() and onCancelled() calls. Add an option to cancel without a message. Use it for clear. Change-Id: Ibab90dca0cb894e7985642f212ff41030f2fc52d
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
017de9893efd33e179db10bc71189e150bc3486d |
|
11-Jun-2015 |
Hans Boehm <hboehm@google.com> |
Rework the key insertion logic Bug: 21495243 This changes the behavior to be much more compatible with L. We generally do not allow consecutive binary operators to be inserted. In the case of a minus operator however, the logic is more complicated. We do allow a minus after multiplication, division and power. When the minus is explicitly entered, so the user sees our corrections, we do not allow a minus after additive operators. In pasted text, we do. We no longer reject additions that would result in implicit multiplications. We do immediately reject binary operators in leading contexts, e.g. after a left parenthesis, in which they must result in a syntax error. Change-Id: I1d35d74335371f6f113808d68a4f293b699d9bd0
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
fc5ac82775fb126b8ec555cfd8af9f419cd707c6 |
|
18-Jun-2015 |
Justin Klaassen <justinklaassen@google.com> |
Remove clickable flag from formula TextView Bug: 21921280 Also some general refactoring of CalculatorText. Change-Id: If10f7329f1bfb4c2967c1c85f160efe6d3d1390c
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
e4a959ec862ff83a1ceb5904225fbe2d4248a9b8 |
|
09-Jun-2015 |
Hans Boehm <hboehm@google.com> |
Merge "Consistently avoid displaying trailing zeroes" into mnc-dev
|
a0e45f306463394d9eeeb887b42ae18c72d69136 |
|
30-May-2015 |
Hans Boehm <hboehm@google.com> |
Consistently avoid displaying trailing zeroes Bug: 21405924 Bug: 21529236 Bug: 21534231 This limits the display of trailing zeroes to the case in which they avoid the need for scientic notation, and to the case of results we did not identify as rational. This means that you can use scrolling as an indicator of whether there may be more digits. The old code exhibited some misbehavior around this, the most serious of which was probably the second bug listed above. This now uses scientific notation more aggressively for small numbers (b/21534231). This patch unfortunately needs to deal with many odd corner cases to make sure that we stop scrolling at just the right point, before the first trailing zero appears, even if there are exponents involved. I tested as many corner cases as I could think of. And the testing exposed other preexisting bugs. I do not know of a good way to avoid this without reverting to the old scroll-through-trailing-zeroes behavior. This significantly changes the behavior on e.g. 10^30 (Previously allowed scrolling to the decimal point, now is unscrollable.) 10^-20 (Weird initial display with trailing zeroes; which could not be reproduced after scrolling.) It turns out that formatResult() scientific notation formatting could accidentally extend the input result by 1 or 2 characters. Based on my testing, the one character case was actually a feature: Since there was a decimal point in the result the extra ellipsis space seems to always give us plenty of room. The two character case whoever sometimes resulted in wrapping, and is fixed here. The one character case is now official. Ideally we should check that we actually have enough space; currently I just assume a single additional character. Disallow scrolling left of the default position. This seems more consistent with TextView scrolling and eliminates some crufty code. Fixed an off-by-one error in getPreferredPrec, which resulted in positive results that were one character too short. Change-Id: I13657377d098055def99e7a173f71f40d361fe3c
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
06c4944949254d1d34d6b6dde44f289c332156da |
|
04-Jun-2015 |
Justin Klaassen <justinklaassen@google.com> |
Limit interactions to only the current pad Bug: 18908042 - Hide the descendents of the non-current pad using the IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS flag. - Intercept touch events that may be sent to the non-current pad. - Allow DPAD key events to be handled by the formula TextView so that it can be scrolled using a hardware keyboard. Change-Id: Ib92c72f939a6b7469eed060adcc5cefdcfc98666
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
4db31b490443e4454d98a5ae2bc44b87149accfe |
|
31-May-2015 |
Hans Boehm <hboehm@google.com> |
Implement percent and new inverse functions Bug: 21493470 Add x^2 10^x and e^x functions, to make the recently added INV key work as expected. Implement % functionality. 10^x is essentially just macro expansions for now. % and x^2 need trivial evaluator support to provide reasonable display syntax. We decided to add evaluator support for exp() as well. Add corresponding exp() support to BoundedRational and its tests. Tiny incidental changes for problems uncovered in the process: Fix bug in tests/README.txt Evaluate the constant e only once. Add one more power test along with the exp() test. Fix proguard.flags so BRTest runs again. Change-Id: I26cfcaf6d99aeec11387297cc5586e2ddcab6add
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
4459516a2c116ddf80725d6a96a69186ccddc329 |
|
29-May-2015 |
Justin Klaassen <justinklaassen@google.com> |
Polish display and evaluate animation Bug: 20915670 Bug: 21489377 - Adjust font metrics across all supported device configurations to support font scaling and min touch size requirements. - Support proper font scaling for non-scrollable results when performing the evaluate animation. - Remove restriction for only using 4/5 of the width of the result display (NOTE: the result's textSize must match the formula's minTextSize). - Add AlignedTextView base class to ensure formula/result padding is based on the displayed text's ascent/baseline. Change-Id: Id53e9bdc6e699fb05fdf331a6a472ecc170edf38
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
721ec84263a26b859c57eb9fb4eb66939fe94272 |
|
28-May-2015 |
Justin Klaassen <justinklaassen@google.com> |
Fix typo: invertable -> invertible Change-Id: I2db32c54d0ceb3bd055129a08193fb3e65dc0ff3
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
e2711cbb1569ab6c7a7c4506505ec403286d5ab4 |
|
28-May-2015 |
Justin Klaassen <justinklaassen@google.com> |
Update advanced pad layout Bug: 7263319 Bug: 20841915 - Switch to using GridLayout instead of custom ViewGroup. - Added '%' operator button (Note: evaluation support WIP). Change-Id: I0d07f01fe4224c43e53c916b034362d906bea405
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
61568a15c8d88d86aba14a7800d0bfb46f22c8ba |
|
19-May-2015 |
Hans Boehm <hboehm@google.com> |
Prevent scrolling of finite results. Bug: 20562484 Inhibit scrolling past the last nonzero digit when we can identify it. Increase length of immediate result a bit, to make it closer to the L calculator. On "=", expand less for scrollable results, more for short non-scrollable results. This allows us to use larger fonts for short finite results. Fix up animation logic when displaying result. The old version was never quite right, and became more visibly wrong with variable enlargement. This version is simpler and seems to give much better results. This still does not add ellipsis at the right end of a result. But it is now easily possible to tell whether a result is known finite by attempting to scroll it. That may be good enough. Remove some obsolete TODO entries. Change-Id: I25a842a743e1c27191ca18ac69aa9eef0f0ea9b1
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
1176f23dae4d3740782e46463003e9f36a381c9d |
|
12-May-2015 |
Hans Boehm <hboehm@google.com> |
Improve copy/paste handling, minor instant result fixes Bug: 20764417 Bug: 20838790 Finish the action mode when we do almost anything else. We should probably be even more aggressive about terminating it, and we may eventually want to use a different approach. But this avoids the crashes, and greatly improves the behavior. Display copy menu only when there is something to copy. Fix a couple of bugs introduced by recent instant display overhaul (one line each): - Instant display disappeared on rotation. - It was sometimes still possible to scroll the previous result after CLR. Change-Id: I1a91d312358898add1e281aaba116d709b4c92a7
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
e57fb01d48dbb06b4ee9c331a108212cd21a1c39 |
|
08-May-2015 |
Hans Boehm <hboehm@google.com> |
Set mCurrentButton after keyboard = Bug: 20826880 This avoids a null pointer exception in reveal(). This avoids a crash produced by e.g. 2/0<rotate screen><keyboard => Change-Id: I651398104992e93137d8dd62523c74b0780d3c1e
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
d36d63e0b261d896e5bcfdab09e3aecb7e4d086c |
|
05-May-2015 |
Justin Klaassen <justinklaassen@google.com> |
Cleanup options menu and licenses UI Bug: 20503109 - Open source licenses are now displayed as a standalone Licenses activity. - Show/hide result options instead of enabling/disabling them. Change-Id: I7e1e43ac83d2417b2f59f90e6a1fc3e491c6ddc7
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
c023b734310f231244f17189788ae9c17c90b9a8 |
|
29-Apr-2015 |
Hans Boehm <hboehm@google.com> |
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
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
fbcef7005de4436682072927f83000b502928d25 |
|
28-Apr-2015 |
Hans Boehm <hboehm@google.com> |
Fix strings, stability bug, easy UI & correctness issues Bug: 20625562 Bug: 20649711 Bug: 20561890 Bug: 20561528 Bug: 20442590 Bug: 15473140 Bug: 20503008 Bug: 20503007 - Improve timeout text. - Recalculate when Calculator is rotated, e.g. in error state, thus reproducing message. It's unclear this is good enough, but it's better. - Fix square root parsing. - Fix concatenation of numbers when pasting by adding explicit multiplication. - Display divide by zero error differently from other domain errors. - Improved advanced keypad layout of portrait-mode tablet calculator. - Improved overflow menu order. (More to be done.) - Report zero division as zero division when we can recognize it. - Switch to floating menus for copy/paste. Change-Id: I3875414f293e62a59b0e41f0de822f29bd5ac6a6
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
08e8f322b0d93e06aaa2a15acc869dfd70791461 |
|
21-Apr-2015 |
Hans Boehm <hboehm@google.com> |
Restructure display formatting, use TextView for formula. This fixes issues with inappropriate keyboard popups and cleans up the code. This substantially rewrites the result formatting code; it intentionally removes a heuristic to avoid conventional scientific notation for short results, which only seemed to confuse things. There are some other tweaks and simplifications. Transitions to and from conventional scientific notation should be smoother, though there is still an issue with numbers like 10^-30. The formatting code is completely extracted from Evaluator, cutting off various tentacles, and moved to CalculatorResult. Fixes a bug that resulted in digits being inappropriately displayed without an exponent if the decimal point was just off the left edge of the screen. It's still not clear that we should always be integrating the exponent into the result window. Bug: 20483801 Bug: 20480081 Change-Id: I1bb777b871e9fa8b6cd510c533e4b94bde6d4a20
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
760a9dc6573e35bcbf9097dece06cd90c4abb551 |
|
20-Apr-2015 |
Hans Boehm <hboehm@google.com> |
Fix result overlap, clear logic, display bugs, etc. Adjust result padding to prevent overlapping with options menu, resulting in inability to access options menu. Reset state correctly after clear, preventing occasional crashes. Do this at end of animation to prevent animation glitches. Have clear but the display in a state in which COPY does nothing interesting. Treat a not-known-to-be-exact zero result better. Before this we displayed it as just "0", giving the mistaken impression of exactness. It is unclear whether we should display it as "0.00000000" or add an exponent to indicate the real evaluation precision. The former probably works better for beginners; the latter for experts. We now do the former, which is probably right. Also correctly save and restore not-yet analyzed characters. Change-Id: Iac46d0d3b5a06f61beb6af7d4f0910e43284f52b
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
d48b756434bda6a5f66740a8ea603aca1f536544 |
|
17-Apr-2015 |
Justin Klaassen <justinklaassen@google.com> |
Adopt Toolbar for overflow menu Change-Id: I55958260b4279b504e79b7a104a813a1273ae403
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
013969e98ce9e3eb4f87ec6159b06a74d07b2592 |
|
14-Apr-2015 |
Hans Boehm <hboehm@google.com> |
Internationalize display again. Plus minor cleanups. Adds code for internationalization of numeric results, both in the result and formula displays. Update some now obsolete TODO comments. Change-Id: I42731bf87f5488375457f1c5c094c7f0d17b71da
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
4a6b7cb235c305761af5d7f40e74d4704e5058c8 |
|
04-Apr-2015 |
Hans Boehm <hboehm@google.com> |
Fix UI holes and bugs. Fix eval bugs. Change layout to make the result display use a fixed font size and limit the number of characters when it appears below the formula. This allows us to always get the proper expansion effect and prevents scrolling from affecting the font size. Add copy support for result display. Add paste support for the formula. Add keyboard input support. Copy/paste can be used to remember old results in the calculator. We save an identifying tag URI in the clip, in addition to text, allowing us to paste old calculator results without precision loss. Copy/paste currently does not rely on selection at all. I had trouble making it work that way in the formula. It's unclear that would be better, since we only allow copy of the entire text and paste at the end. Add a couple of alternate result display options to the overflow menu. (These appear quite useful, were trivial to implement, and give us a better excuse for the overflow menu.) Changed the behavior of the delete key in error state. Changing it to CLEAR seemed unfriendly, since it prevents corrections. This is a change from L. Made it clear that the CalculatorHitSomeButtons test is currently 95% worthless. It was apparentlly failing (due to test infrastructure issues) but throwing an exception in a thread from which it was not getting reported. Decided to keep it, since I would like a place to continue collecting regression tests, even if we can't actually run them yet. Includes some easy drive-by fixes for expression evaluation: a) 2 / 2 * 3 was mis-parsed as 2 / (2 * 3). b) Cosine evaluation had the sense of the test for a rational result reversed. c) Constants without leading digits, like .1, are now handled correctly, and decimal points in the formula are now internationalized. (That's not yet true for the result.) Change-Id: Ic24466b444b4a4633cfb036c67622c7f4fd644ec
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
bfe8c22fd15ff965ed97c7245b49565c645c2cee |
|
03-Apr-2015 |
Hans Boehm <hboehm@google.com> |
Add degree/radian mode, improve button layout Add a button for switching between degree and radian mode. Handle display updates in response to mode switching in a reasonoble way. Improve the button layout so that it is usable on tablets. Add DEG/RAD mode display at the top. Fiddle with some of the layout parameters so they make more sense to me. This may need further tuning. Change-Id: I8d04b235cfcb1f0a0d8f4a0ad6a0dc6e5eac8c5d
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
84614957604253d51296e06c97daced699a0a9de |
|
26-Nov-2014 |
Hans Boehm <hboehm@google.com> |
Beginnings of ExactCalculator based on L Replace the arity library with a new evaluation engine based on an open source "constructive reals" library. This provides answers that are correct to the last displayed digit, and can be scrolled to get more precision, with evaluation to additional precision proceeding on demand. This uses pieces of an old prototype calculator with a pre-Material-Design UI. Since the code structure of the KitKat and Lollipop calculators is quite different, this merge required major changes to make the pieces fit again. An egregious bug in the prototype related to the evaluation of the power operator was fixed. Many new UI bugs are introduced to compensate :-) Add separate buttons for inverse trig functions. Add long TODO lists for various missing pieces. This is really designed to get something up and running that looks like it has a Material Design UI. This version kind of works, though with many UI deficiencies. This addresses external issues 63368, 81089, and 80990. It partially address the degree vs radian (80330) issue as well, though we're still missing the UI for that. This fixes Bug:15284587 (More work is needed to make this interact correctly with keyboard support.) Degree/Radian mode is also internal Bug:17059768 This provides much more robust solutions to the following, which were previously fixed by favoring round numbers over precise solutions: Bug:15747298 Bug:15332726 Change-Id: Ib64ffcee9760a3195ae2a48302308eeb09a156bd
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
06360f9211fc2c6df4c5749bebb65202e1bb12a8 |
|
28-Aug-2014 |
Justin Klaassen <justinklaassen@google.com> |
Add reveal view to overlay before creating animator Bug: 17316066 - Additional checks introduced by ag/534856 now require that the target of ViewAnimationUtils#createCircularReveal has a parent before being invoked. Change-Id: I21702486443e1c8fcae62d541e53a5237e50cfb4
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
bfc4e4d88011b33b4cf142a89b9125bd07393ab5 |
|
27-Aug-2014 |
Justin Klaassen <justinklaassen@google.com> |
Improve hardware keyboard support Bug: 17188394 - Ensure cursor is always at end of the current expression. - Allow the delete key to be handled by the EditText fixing an issue where delete would occur twice on keyUp and keyDown. - Prevent text freezing in onSaveInstanceState so that text can be restored at the Activity level. Change-Id: Ie20a7f88b9c43223ae840a1191361de7f1e35127
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
f79d6f699b04a735e1627b47a059760ff40c26b9 |
|
26-Aug-2014 |
Justin Klaassen <justinklaassen@google.com> |
Fix NPE resulting from invalid instance state Bug: 17281017 - Ensure any transient state is cleared before saving instance state by cancelling the current animator if applicable. Change-Id: Ibebf5f4d89046453d36f43b98240a2cbef74288e
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
ad8e88a5d28ba7f5b8dfa63f92b00b3b96ada360 |
|
12-Aug-2014 |
Budi Kusmiantoro <budi@google.com> |
Add basic support to handle hardware keyboard Bug: 15710817 Change-Id: Icf50f4ddd6f7e3e8606074b533a34db66703da00
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
2be4fdbfcd5f16bc12066d1ccac181bca3dfaa7a |
|
07-Aug-2014 |
Justin Klaassen <justinklaassen@google.com> |
Preserve/restore calculator instance state Bug: 15597963 Bug: 16850193 - Manage tokenizer instance at activity level so it is re-created on locale changes. - Preserve normalized form of expression in instance state and restore/evaluate on activity creation. - Remove selection hack from CalculatorEditText since setting a selection makes TextView save instance state and it no longer appears necessary. Change-Id: Ic15924f4026ec45b4775b36568c3cdc46443cca8
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
04f79c7a5f46f6c2cf07a164ce352ab54dfe7f47 |
|
28-Jun-2014 |
Justin Klaassen <justinklaassen@google.com> |
Rename CalculatorActivity back to Calculator Bug: 15907395 Change-Id: Idc3445230c541bdf50cc3b15187c0776010ccff3
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
4b3af0578b1a44038856bc56244aea8aaeac22d1 |
|
28-May-2014 |
Justin Klaassen <justinklaassen@google.com> |
Overhaul Calculator UI. Bug: 14418545 Bug: 14419084 Bug: 14419142 Bug: 14420277 Bug: 14466652 Bug: 14564559 Bug: 14564608 Bug: 14846724 Bug: 15090154 Bug: 15287699 Bug: 15289526 Bug: 15289616 Change-Id: I93e1530446d5bd6a4c3189f751c88ece1abc7767
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
1c84eb099b10008256f87c3098743731894479df |
|
10-Mar-2014 |
Alan Viverette <alanv@google.com> |
Clean up tablet layouts in Calculator BUG: 13394618 BUG: 13361558 Change-Id: Ia58f7ad2425b3ce97facd79c1f87098bb6402c32
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
461992df853ace2b0624aac4e372d3ed8efc7059 |
|
07-Mar-2014 |
Alan Viverette <alanv@google.com> |
Clean up calculator BUG: 13340961 Change-Id: Idb1bdc8f49cf66e8a1412a9eaa3458b85f5c5124
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
7387add6feefeb9be1d99b7da0b5848996c9b45a |
|
06-Mar-2014 |
Alan Viverette <alanv@google.com> |
Rename calculator back to Calculator Also renames some assets, removes the stationary button style, and restores the default clear / delete icon switching. BUG: 13322842 BUG: 13321800 Change-Id: I43ccf7a7eb40a670289ca61c3582f0914a4bacee
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
8bea49415c6de57f7e14517bf64769d24e3f099d |
|
03-Mar-2014 |
Alan Viverette <alanv@google.com> |
Quantum of Calculator Change-Id: Ic79777951621c42f03e7da9dd73c350f5182f48e
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
f73af2f3b387b98e9a3ec178e9b41a49984a0d5d |
|
24-Sep-2013 |
Alan Viverette <alanv@google.com> |
Add drag-to-open to Calculator's overflow menu button BUG: 10903793 Change-Id: If3cd48910c5003e90bb352be6f6fce58fe2b09b7
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
05a16111459d080a310009c1caec18eef07946f2 |
|
18-May-2012 |
Mindy Pereira <mindyp@google.com> |
Smooth scroll to advanced/ basic. Currently, the animation doesn't look better. But when the rest of b/6516391 Selecting 'advanced panel' in overflow menu is janky is fixed, it should Change-Id: If0db9bbb3ef87d99be174a256e82cde2ee54f587
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
6702e4b5d52ec458a18ecc1382d020debedb2a8f |
|
03-May-2012 |
Mindy Pereira <mindyp@google.com> |
Do null checks. Fixes monkey bugs: fixes b/6436988 com.android.calculator2: java.lang.NullPointerExceptionat com.android.calculator2.Calculator.onOptionsItemSelected(Calculator.java:212) fixes b/6438256 com.android.calculator2: java.lang.NullPointerExceptionat com.android.calculator2.Calculator.onOptionsItemSelected(Calculator.java:206) Change-Id: I608c45a0d45d3b2d13fece35e3dc9c9bac4f9223
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
e5179484230da096d6f681eee2f488d582b7fa9f |
|
14-Sep-2011 |
Mindy Pereira <mindyp@google.com> |
Fix back behavior/ switching to advanced. The getBasicVisibility and getAdvancedVisibility methods were backwards This happened as a result of recent changes, probably to the view pager. Fixes bug:5318179 Cannot close Calculator app clicking the back key. Change-Id: Id1552b9f25ddd5a2eec700e0d9c9b3d7c4baab6c
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
353efcf389f91927b825a1d2db18c6b6e616f25b |
|
13-Sep-2011 |
Adam Powell <adamp@google.com> |
Convert calculator to use ViewPager for multi-page layouts. Change-Id: Icb6b136e72cfac98119b639259818f5363be7176
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
df54c1ed29f4ca4b8b81c6085e393a4b59034475 |
|
23-Aug-2011 |
Mindy Pereira <mindyp@google.com> |
Clear the calculator display when clearing the history. Fixes b/5186736 Calculated history is not cleared if user click on clear history in menu option. Change-Id: Ib1f1ae4fcb87db9561fafda937d860031ba5bea4
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
0a1148f5ac3a09c3a2bf6cb50b50a900f370853d |
|
23-Aug-2011 |
Mindy Pereira <mindyp@google.com> |
Make a menu affordance for devices that don't have a hard menu key. Also, updated menus to use a menu layout. Fixes Bug:5129431 No Menu option in Calculator for additional options Change-Id: I3409e175c0fec9bb51900b994235ae98cbfdf7ef
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
92ccd21f8cad535532827ad4d10d743676019e0f |
|
12-Aug-2011 |
Gilles Debunne <debunne@google.com> |
Bug 5074527: IME no longer pops up. Text suggestions disabled. Change-Id: I89e77b091a44a59c43cf4c84ff58655feced130d
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
6bef2f85bef66323b10a58b7bb3c4d20e8e1eaa7 |
|
08-Apr-2011 |
Joe Onorato <joeo@google.com> |
Remove the deprecated things from Config.java. These havent been working since before 1.0. Change-Id: I406ceee99a14af362f942efeb4c06f5e9976b8f3
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
582273d77e6ee8335447cbd524e7b47b851c7b46 |
|
22-Jan-2011 |
Dmitri Plotnikov <dplotnikov@google.com> |
Fixing rounding on rotation Bug: 3366316 Change-Id: I63e0a17ca91c331c11f17b2ec390cf411aaa0add
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
2501811e0d216bce30ce01823ed1a8191333d4c1 |
|
18-Jan-2011 |
Dmitri Plotnikov <dplotnikov@google.com> |
Introducing an explicit delete mode: clear vs. backspace Also, fixing bug: 3360891 Change-Id: I5faa0553d549d7e931c655f3920b82bb91563678
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
9476df20f8c944746814d3e7ebd1f1eb41499025 |
|
17-Jan-2011 |
Dmitri Plotnikov <dplotnikov@google.com> |
Placeholder asset and a new layout for the display Also, bug: 3361241 Change-Id: I222368104ca47af3200e08db668e3f324106d7a7
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
e2092454e13850c551550db9879fa4fa93218c75 |
|
17-Jan-2011 |
Dmitri Plotnikov <dplotnikov@google.com> |
New calculator button styles and initial xlarge layouts. Bug: 3235798 Change-Id: Iad1f46cec8d073d4b01f90f5e5b0b230c0af3f24
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
052c92af9b70c42a84c989876c513b456d0a500e |
|
11-Jan-2011 |
Dmitri Plotnikov <dplotnikov@google.com> |
Adding action bar to calculator Bug: 3332171 Change-Id: I8f40cbb5c1648f9bf23201345eb8ee06444a8dce
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
b1cdfe80d93363e5719d71d719657b69eadbd984 |
|
19-May-2010 |
The Android Open Source Project <initial-contribution@android.com> |
merge from open-source master Change-Id: Idf59c10780096b92c7c76b90bc34512dee2f978e
|
5a589624ae4c334987e725c710833cd3588b90fe |
|
17-May-2010 |
Christian Mehlmauer <FireFart@gmail.com> |
Removed unused Imports and variables Change-Id: Ib6d79ce3f0b7cf3cbb6716c316ecaefd2dae67f7
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
cf3ca321fa8cc1f5427454c5e2501b7978bb3711 |
|
09-Mar-2010 |
Mihai Preda <preda@google.com> |
Calculator: preserve basic/advanced panel on orientation change. Bug 2154998. Change-Id: Ie40ebe485cdb0721a5394c4d19450fddf035134f
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
e08c8309119c462f04ec33746d63b895e4f0417d |
|
22-Sep-2009 |
Mihai Preda <preda@google.com> |
Fix calculator line size computation to work on different resolution devices.
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
1d3117595c5849929588741c4ded20ceb26e7336 |
|
25-Aug-2009 |
Jacek Surazski <jaceks@google.com> |
Give Calculator a screen-size agnostic, more moddern look.
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
bcabcbb48e784ca9e466204b63edd9b0729b5df0 |
|
05-Aug-2009 |
Mihai Preda <preda@google.com> |
Calculator: BACK key on Advanced panel moves to Basic panel. BUG 1890261.
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
0c464d2a9998866d7f21ae5cf2761f2365d16fbc |
|
11-Apr-2009 |
Jeff Hamilton <jham@android.com> |
Fix the Calculator theme to be NoTitleBar.
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
b301ed2e1720fc9190eaf99ab33b5f49eabcebc5 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
852aa32e662b10b68ca4af100ef424b6229b07ac |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|
979004c651c1dc2327c4d74688cbaa5cbb9f08e1 |
|
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
/packages/apps/ExactCalculator/src/com/android/calculator2/Calculator.java
|