1. 14 Jul, 2015 4 commits
  2. 13 Jul, 2015 2 commits
  3. 11 Jul, 2015 1 commit
  4. 09 Jul, 2015 4 commits
    • Hans Boehm's avatar
      am c2269122: am 8f4a8c73: am 0b9806f6: Support pasting of scientific notation numbers · e1343214
      Hans Boehm authored
      * commit 'c2269122':
        Support pasting of scientific notation numbers
      e1343214
    • Hans Boehm's avatar
      am 8f4a8c73: am 0b9806f6: Support pasting of scientific notation numbers · c2269122
      Hans Boehm authored
      * commit '8f4a8c73':
        Support pasting of scientific notation numbers
      c2269122
    • Hans Boehm's avatar
      am 0b9806f6: Support pasting of scientific notation numbers · 8f4a8c73
      Hans Boehm authored
      * commit '0b9806f6':
        Support pasting of scientific notation numbers
      8f4a8c73
    • Hans Boehm's avatar
      Support pasting of scientific notation numbers · 0b9806f6
      Hans Boehm authored
      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
      0b9806f6
  5. 08 Jul, 2015 5 commits
  6. 06 Jul, 2015 4 commits
  7. 02 Jul, 2015 2 commits
  8. 01 Jul, 2015 4 commits
  9. 30 Jun, 2015 2 commits
    • Hans Boehm's avatar
      am a3723849: Reimplement overflow menu messages as DialogFragments · 3d0758aa
      Hans Boehm authored
      * commit 'a3723849':
        Reimplement overflow menu messages as DialogFragments
      3d0758aa
    • Hans Boehm's avatar
      Reimplement overflow menu messages as DialogFragments · a3723849
      Hans Boehm authored
      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
      a3723849
  10. 28 Jun, 2015 1 commit
  11. 27 Jun, 2015 1 commit
    • Hans Boehm's avatar
      Make trailing operator handling consistent with L · e8553769
      Hans Boehm authored
      Bug: 246391
      
      Only ignore trailing BINARY operators when computing instant results.
      We used to be much more aggressive.
      
      Also ignore trailing binary operators when the user hits "=".
      
      This makes us consistent with the L design and ensures that instant
      results don't turn into errors when the user hits "=".
      
      Change-Id: I260e95d152168b70774330ac95d5bc567cf79b3d
      e8553769
  12. 24 Jun, 2015 7 commits
  13. 23 Jun, 2015 3 commits
    • Hans Boehm's avatar
      am 6e8087f4: Merge "Correct off-by-1 errors in display formatting code." into mnc-dev · d5ba5a89
      Hans Boehm authored
      * commit '6e8087f4':
        Correct off-by-1 errors in display formatting code.
      d5ba5a89
    • Hans Boehm's avatar
    • Hans Boehm's avatar
      Correct off-by-1 errors in display formatting code. · 5e802f30
      Hans Boehm authored
      Bug: 21986868
      Bug: 21960281
      
      Fix and restructure the formatting and scroll-limit-calculation
      code.  This code is inherently tricky, and has had more bugs than
      we would like to admit to.  Use the opportunity to clean up the
      code a bit, renaming variables consistently.
      
      The good news is that the code seems to be getting slightly
      simpler with each bug fix.
      
      This fixes several separate off-by-one errors related to result
      formatting:
      
      The expLen() exponent string length calculation was off by 1
      for exact powers of 10.
      
      The dropDigits calculation in the formatting code was off for
      negative exponents just shorter than an exact power of 10.
      
      The exponent space calculation for a few results like -1.2*10^-8
      was off by one.
      
      For a result like -10^-500 we did not reserve space for the leading
      minus sign, since that's not computed until after scrolling.
      
      [Less serious] The ellipses were omitted when we had just barely
      scrolled a leading minus sign off the screen.  (This only occurred
      in exactly one position, which could never be the default one.)
      
      Change-Id: If1bfbbb70a624998be3d996592d129b16aade745
      5e802f30