Commit Graph

568 Commits

Author SHA1 Message Date
Elliott Hughes
5bd48b528e am 67ae48f3: am fc91d730: am cbfece82: Merge "Switch over to getting 12-/24-hour time formats from CLDR via icu4c."
* commit '67ae48f32545791fe0a0574f02bfe714e106074b':
  Switch over to getting 12-/24-hour time formats from CLDR via icu4c.
2013-01-14 19:28:20 -08:00
Elliott Hughes
fc91d73067 am cbfece82: Merge "Switch over to getting 12-/24-hour time formats from CLDR via icu4c."
* commit 'cbfece8237cb9cf62547e75ab9572ccbf682369a':
  Switch over to getting 12-/24-hour time formats from CLDR via icu4c.
2013-01-14 19:23:48 -08:00
Elliott Hughes
4caba61ea0 Switch over to getting 12-/24-hour time formats from CLDR via icu4c.
I removed the duplication in DateTimeView rather than fix that copy
of the code.

Bug: 7924970
Change-Id: I60c205d06ad3b50fd2f5d5fc432e4eb186f9c0e7
2013-01-14 15:48:27 -08:00
Jeff Sharkey
06c5f8a768 Examine widget hierarchy to find clocks.
When switching to a widget, examine its hierarchy to determine if it
contains TextClocks that show hour and minute for the local timezone.
If so, hide the status bar clock.  Doesn't fix closing walls.

Bug: 7667638
Change-Id: I1e2c40345c9e5eb0193efd70838c7ca9f779190b
2013-01-11 10:49:19 -08:00
Sangkyu Lee
955beb2b96 Optimize drawHardwareAccelerated method in Editor class
When inserting a new line or breaking a line,
every display list was invalidated and rebuilt before.
However, we can reuse the display lists above intactly and also
reuse the display lists below with only updating drawing locations.

This patch reuses the display lists if possible.
The display lists above the inserted line are just reused
and the display lists below are reused with only updating
drawing locations not fullly rebuilt.

mIndexOfFirstChangedBlock is the index of the first block
which is moved by inserting or breaking a line.
So the display list whose index is >= mIndexOfFirstChangedBlock
only needs to update its drawing location.

Change-Id: Ica20deb0ebb5750de21356ed31fa9f86e657ff92
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
2013-01-08 17:10:24 -08:00
Raph Levien
afe8e9b6d0 Suppress horizontal scrolling with trailing blanks
The existing behavior of EditText is that trailing blanks can cause a
line to exceed the layout width, causing the cursor to extend past the
line, which in turn causes horizontal scrolling. This patch clamps the
cursor to the layout width in the non-scrolling case, which makes the
spaces effectively invisible when they're at the end of the line, but at
least suppresses the scrolling.

The clamping only works reliably in left-to-right alignments, so this
patch checks for than and only enables the clamping in those cases.

Fix for bug 7699295.

Change-Id: I22bc4e6c9ded3d7716edfcf10dd2b5c31a5da9de
2012-12-20 15:42:47 -08:00
Elliott Hughes
a43e9b7c0e am 6647f1bd: am c749261f: Merge "Fix DateUtils.formatElapsedTime."
* commit '6647f1bd2b3a615cf02111aab21eecdd76ce7c09':
  Fix DateUtils.formatElapsedTime.
2012-12-15 15:10:42 -08:00
Elliott Hughes
6647f1bd2b am c749261f: Merge "Fix DateUtils.formatElapsedTime."
* commit 'c749261fea1010dfa2d1337bd210c81d13052540':
  Fix DateUtils.formatElapsedTime.
2012-12-15 14:58:01 -08:00
Elliott Hughes
2eda18485c Fix DateUtils.formatElapsedTime.
More reuse of StringBuilders, less broken home-grown formatting code.

Long-term, we should hand this over to icu4c, but they're not ready yet.

Bug: http://code.google.com/p/android/issues/detail?id=41401
Bug: 7736688
Change-Id: Ib3c1e1aad05827df646aa18645cce19dffb7551f
2012-12-14 14:29:47 -08:00
Romain Guy
a8f6d5f072 Add support for face attribute to HTML string resources
Bug #7480719

This change also adds the alias "color" for the attribute "fgcolor".
This change also unifies HTML colors parsing between the Html class
and StringBlock for consistency.

Change-Id: I696a6e080387901d88e9baf7cb989b892f14b9db
2012-11-27 14:34:33 -08:00
Jeff Sharkey
6dd028cbb9 am 9f43afad: am 68363456: am 7420ab68: Merge "Utility to format human-friendly durations." into jb-mr1.1-dev
* commit '9f43afad9de92fc36dc7b242585ef734e834285c':
  Utility to format human-friendly durations.
2012-11-16 10:37:54 -08:00
Jeff Sharkey
9f43afad9d am 68363456: am 7420ab68: Merge "Utility to format human-friendly durations." into jb-mr1.1-dev
* commit '68363456c1f360c0f1afe637a1f3028519e059ed':
  Utility to format human-friendly durations.
2012-11-15 11:54:43 -08:00
Jeff Sharkey
68363456c1 am 7420ab68: Merge "Utility to format human-friendly durations." into jb-mr1.1-dev
* commit '7420ab681eaad22f4b8f884e12d3b2ce82cd203a':
  Utility to format human-friendly durations.
2012-11-15 11:51:38 -08:00
Jeff Sharkey
53f6e8a9b9 Utility to format human-friendly durations.
Bug: 6777872
Change-Id: Ie7ebcb456306f4f88b4707030dd7beda3fc90368
2012-11-13 17:26:39 -08:00
Romain Guy
331b552734 am aabe4bb4: am 9c0010f8: am 998d03bd: Merge "A new clock widget to create lock screen appwidgets" into jb-mr1-dev
* commit 'aabe4bb4776c21592db7e0714b3fec960b6778c7':
  A new clock widget to create lock screen appwidgets
2012-11-01 11:45:40 -07:00
Romain Guy
aabe4bb477 am 9c0010f8: am 998d03bd: Merge "A new clock widget to create lock screen appwidgets" into jb-mr1-dev
* commit '9c0010f856d623845b20a7dd13c024023626623c':
  A new clock widget to create lock screen appwidgets
2012-11-01 11:28:13 -07:00
Romain Guy
9c0010f856 am 998d03bd: Merge "A new clock widget to create lock screen appwidgets" into jb-mr1-dev
* commit '998d03bd943053741bab17a8ef0abb355f6bc3ae':
  A new clock widget to create lock screen appwidgets
2012-11-01 11:26:10 -07:00
Romain Guy
3d1728c03a A new clock widget to create lock screen appwidgets
This new widget replaces DigitalClock. It listens to all the correct
system events and offer the ability to customize the formatting
patterns in 12-hour and 24-hour modes. It also supports fixed
time zones to create world clocks.

One more step towards becoming ClockOS!

Change-Id: I677e5dfca8cd8c8d1f8c49e54d7507f4d1885bf4
2012-10-31 20:31:58 -07:00
Raph Levien
103dbdc5a6 am fdf26397: am 9defd066: am 74437532: Merge "Fix for bug: Gmail (and other places): cursor placed on top of letter" into jb-mr1-dev
* commit 'fdf263971b3bbc93d743195e840967063ccf5fcb':
  Fix for bug: Gmail (and other places): cursor placed on top of letter
2012-10-22 16:04:12 -07:00
Raph Levien
fdf263971b am 9defd066: am 74437532: Merge "Fix for bug: Gmail (and other places): cursor placed on top of letter" into jb-mr1-dev
* commit '9defd0663e2b6a486f5bc72621bbbd4dfab666fb':
  Fix for bug: Gmail (and other places): cursor placed on top of letter
2012-10-22 16:01:39 -07:00
Raph Levien
9defd0663e am 74437532: Merge "Fix for bug: Gmail (and other places): cursor placed on top of letter" into jb-mr1-dev
* commit '74437532fe2a3e9ebd15c61327fd3f2b68c299b3':
  Fix for bug: Gmail (and other places): cursor placed on top of letter
2012-10-22 15:59:22 -07:00
Raph Levien
42ef515d18 Fix for bug: Gmail (and other places): cursor placed on top of letter
This patch fixes bug 7346656. In this particular case, the text line in
the EditText was split into multiple spans, with the boundary between
the "r" and "," in "r,". These were being drawn as two separate runs,
but measured as a single run, leading to inconsistent measurements
because this is a kern pair in Roboto.

The fix is to eliminate the special-case code for measuring. This will
actually improve efficiency, as the value computed in one pass is now
more likely to be reused in another.

Change-Id: I04142a0ec98f280fc1027c7cbdbf903e3096f8e4
2012-10-22 15:01:17 -07:00
Raph Levien
cb98505e94 am e9d419f5: am 6594eca0: am 9704b563: Merge "Fix for 7301594 Html.toHtml creating potentially invalid html" into jb-mr1-dev
* commit 'e9d419f524317828a5edaf2b3350acaacf91cab8':
  Fix for 7301594 Html.toHtml creating potentially invalid html
2012-10-08 12:47:56 -07:00
Raph Levien
e9d419f524 am 6594eca0: am 9704b563: Merge "Fix for 7301594 Html.toHtml creating potentially invalid html" into jb-mr1-dev
* commit '6594eca0a9d9e9e0b429f950a673fa1820d43813':
  Fix for 7301594 Html.toHtml creating potentially invalid html
2012-10-08 12:46:03 -07:00
Raph Levien
6594eca0a9 am 9704b563: Merge "Fix for 7301594 Html.toHtml creating potentially invalid html" into jb-mr1-dev
* commit '9704b563d63d8b5fe8e568dfb7190f8440b56698':
  Fix for 7301594 Html.toHtml creating potentially invalid html
2012-10-08 12:43:12 -07:00
Raph Levien
286da7b6f5 Fix for 7301594 Html.toHtml creating potentially invalid html
Generate <p dir="rtl"> instead of <p dir=rtl>. The form with the quotes
is cleaner and will reduce warnings in apps that consume the output.

Change-Id: Ic9879c8c882c42079598b741e897a24415d96374
2012-10-07 16:57:27 -07:00
Fabrice Di Meglio
df0732c3a8 am b4a80baa: am 5e5169b0: am 33c36895: Merge "Fix bug #7282594 EditText does not allow to move the cursor when typing RTL text and if gravity is set to LEFT" into jb-mr1-dev
* commit 'b4a80baaff113f0f9ba357bfbd5dc0cb85dc8987':
  Fix bug #7282594 EditText does not allow to move the cursor when typing RTL text and if gravity is set to LEFT
2012-10-03 17:49:56 -07:00
Fabrice Di Meglio
b4a80baaff am 5e5169b0: am 33c36895: Merge "Fix bug #7282594 EditText does not allow to move the cursor when typing RTL text and if gravity is set to LEFT" into jb-mr1-dev
* commit '5e5169b0d0d51e042a79ca32d2825fc5f4a25531':
  Fix bug #7282594 EditText does not allow to move the cursor when typing RTL text and if gravity is set to LEFT
2012-10-03 17:48:09 -07:00
Fabrice Di Meglio
5e5169b0d0 am 33c36895: Merge "Fix bug #7282594 EditText does not allow to move the cursor when typing RTL text and if gravity is set to LEFT" into jb-mr1-dev
* commit '33c36895a294c7b731fd59017a7ea0f06ac2a356':
  Fix bug #7282594 EditText does not allow to move the cursor when typing RTL text and if gravity is set to LEFT
2012-10-03 17:45:16 -07:00
Fabrice Di Meglio
db24f0a73f Fix bug #7282594 EditText does not allow to move the cursor when typing RTL text and if gravity is set to LEFT
- fold LEFT/RIGHT into NORMAL/OPPOSITE cases

Change-Id: Idf14342ffed4840e7b4ea53cc42f1cde8f196a4c
2012-10-03 17:17:14 -07:00
Tadashi G. Takaoka
22816c34da Fix DigitsKeyListener to be able to accept "+" sign
Bug: 7255318
Change-Id: Id5a6c11ffc62cc79c1db0baaf8d184174691d034
2012-10-01 15:48:27 +09:00
Elliott Hughes
dbd0abd6f9 am ce14f217: am 3d5be42e: Merge changes I87c2ab9e,I2dafcc34,I731c96c2 into jb-mr1-dev
* commit 'ce14f2176028108b649b3b068ac1275b81287b21':
  Fix formatDateRange month names for Farsi.
  Use localized digits for Time formatting.
  Use proper digits in formatElapsedTime and format3339
2012-09-20 13:00:44 -07:00
Elliott Hughes
3a8b3a85e1 am 3d5be42e: Merge changes I87c2ab9e,I2dafcc34,I731c96c2 into jb-mr1-dev
* commit '3d5be42eaa35914d9b37fe052fa7222dc1992dc0':
  Fix formatDateRange month names for Farsi.
  Use localized digits for Time formatting.
  Use proper digits in formatElapsedTime and format3339
2012-09-20 12:50:52 -07:00
Elliott Hughes
3d5be42eaa Merge changes I87c2ab9e,I2dafcc34,I731c96c2 into jb-mr1-dev
* changes:
  Fix formatDateRange month names for Farsi.
  Use localized digits for Time formatting.
  Use proper digits in formatElapsedTime and format3339
2012-09-20 10:05:44 -07:00
Elliott Hughes
9ccf13cd6b Fix formatDateRange month names for Farsi.
This removes the LLLs seen in Calendar and Settings, for example.

Bug: 6811327
Change-Id: I87c2ab9ee8d897171ce7ca4fe06cfa8b11d36536
2012-09-18 16:40:20 -07:00
Elliott Hughes
6323b6c617 Use localized digits for Time formatting.
This fixes the digits in places like Settings' data usage page
and Calendar's drop-down, for languages such as Arabic.

Bug: 6811327
Change-Id: I2dafcc342e3279937735697b3748b47fdfc8e691
2012-09-18 15:16:00 -07:00
Fabrice Di Meglio
8bf1cb378b am 20586fa0: Merge "Fix bug #7173351 API REVIEW: android.util.LocaleUtil" into jb-mr1-dev
* commit '20586fa0353f63453766140b32a4778793ce2b43':
  Fix bug #7173351 API REVIEW: android.util.LocaleUtil
2012-09-18 15:00:14 -07:00
Fabrice Di Meglio
ad31d027ca am 684f1078: am 20586fa0: Merge "Fix bug #7173351 API REVIEW: android.util.LocaleUtil" into jb-mr1-dev
* commit '684f10788707f154e54a614b2d60cc28542aee3a':
  Fix bug #7173351 API REVIEW: android.util.LocaleUtil
2012-09-18 14:59:00 -07:00
Fabrice Di Meglio
20586fa035 Merge "Fix bug #7173351 API REVIEW: android.util.LocaleUtil" into jb-mr1-dev 2012-09-18 14:48:48 -07:00
Roozbeh Pournader
315a7c0335 Use proper digits in formatElapsedTime and format3339
Use getZeroDigit() instead of a hard-coded '0' for formatting times using
formatElapsedTime, so locales with different digits like Arabic and Persian
could display the elapsed time properly. This is visible in Settings' list
of running apps.

Also changed android.text.format.Time's format3339 method to always use ASCII
digits, irrespective of the locale.

Change-Id: I731c96c21b3712ec347d9526e4ec3fe884dec276
2012-09-18 14:11:55 -07:00
Fabrice Di Meglio
d3d9f3f100 Fix bug #7173351 API REVIEW: android.util.LocaleUtil
Change-Id: I08fd491eff714059e9ec874fadebe7eb556c34d5
2012-09-18 12:55:32 -07:00
Elliott Hughes
af73eb8526 am 45b09c00: am 7134ef60: Merge "Fix date formatting for fa locales." into jb-mr1-dev
* commit '45b09c0044893e9b549de0eeb20a925a8549cd52':
  Fix date formatting for fa locales.
2012-09-17 14:55:09 -07:00
Elliott Hughes
e09e3a1a0d am 7134ef60: Merge "Fix date formatting for fa locales." into jb-mr1-dev
* commit '7134ef60b7ebe81b37dffdd65f22a9aae80e3d14':
  Fix date formatting for fa locales.
2012-09-17 14:48:49 -07:00
Elliott Hughes
7850a41871 am 42e7af25: am 9ceede6d: am 086676a4: am f5437ee8: am 297ad257: Merge "Deprecate those parts of DateUtils the documentation says not to use."
* commit '42e7af25c06e2d1dbf8201d1ff1528311cf8c44e':
  Deprecate those parts of DateUtils the documentation says not to use.
2012-09-17 12:45:47 -07:00
Elliott Hughes
34de3bc309 Fix date formatting for fa locales.
This adds support for standalone months (L versus M) and localized
digits.

Bug: 6811327
Change-Id: I4687a4c67605c31b155c0b8d44b3da6ed378fc82
2012-09-17 11:17:10 -07:00
Elliott Hughes
1a698714b9 am c3ff72f5: Use icu4c for CLDR "yesterday", "today", and "tomorrow" strings.
* commit 'c3ff72f5bd5896ad2584e0cc0582cbd2ad8191f2':
  Use icu4c for CLDR "yesterday", "today", and "tomorrow" strings.
2012-09-15 16:12:09 -07:00
Elliott Hughes
5f09b9f52d am 08153ee0: Switch DateUtils and Time over to using the CLDR for all week and month names.
* commit '08153ee01e6aa67061f628bc3fed66c6400dfd1c':
  Switch DateUtils and Time over to using the CLDR for all week and month names.
2012-09-15 16:12:06 -07:00
Elliott Hughes
ee783e6075 am 23321b88: Merge "Use ICU\'s CLDR data for "AM" and "PM" strings." into jb-mr1-dev
* commit '23321b88578a4b4438e7563ff7616b98a1c1a520':
  Use ICU's CLDR data for "AM" and "PM" strings.
2012-09-15 16:12:02 -07:00
Elliott Hughes
c3ff72f5bd Use icu4c for CLDR "yesterday", "today", and "tomorrow" strings.
(cherry-pick of 47a0539ecaf7d7a15008704bd89f748aebf85d47.)

Conflicts:

	core/res/res/values/public.xml

Bug: 6811501
Change-Id: Ifb2e030a9fda85a7f664feac812b63e67780e68f
2012-09-14 20:22:17 -07:00
Elliott Hughes
08153ee01e Switch DateUtils and Time over to using the CLDR for all week and month names.
(cherry-pick of 99c406e42ba154584070ca7ec100e8be7ff8a800.)

Conflicts:

	core/res/res/values-fa/donottranslate-cldr.xml
	core/res/res/values/public.xml

Bug: 6811501
Change-Id: I2ad9608ae34804e02c6b0271197e96611df12b0a
2012-09-14 20:22:17 -07:00