29118 Commits

Author SHA1 Message Date
Elliott Hughes
8326b9a429 Improve DateFormat.format.
Add support for the 'c' format character, required in many non-English locales.
Reimplement 'c' and 'E', and 'L' and 'M', so they correctly interpret 5-count
pattern characters.

Replace the old incorrect class documentation with a pointer to the
well-maintained libcore equivalent and the Unicode UTS to which these two
implementations are supposed to conform.

Deprecate the useless constants for pattern characters. No one sane is going
to write MONTH + MONTH + MONTH + MONTH instead of "MMMM".

Correct the documentation for getLongDateFormat and getMediumDateFormat.

Also fix DateUtils.getStandaloneMonthString for LENGTH_SHORTEST.

Tests are in https://android-review.googlesource.com/53291.

Change-Id: I4dda8b18070f05ccdc11c1f0a9381a9d233db4e8
2013-03-08 15:06:14 -08:00
Elliott Hughes
95d5ab30f2 Improve the Resource.getQuantityString/getQuantityText documentation.
Natural languages differ so much and in such odd ways that you can't
use getQuantityString as an "if" statement. It's really just for grammaticality.
This is explained well in
http://developer.android.com/guide/topics/resources/string-resource.html#Plurals
but we need to make more of an effort to motivate people to read that, and to
at least get the most important point across if they don't read it.

Change-Id: I549b9f3563462c45f2dea34c558185e0714127cd
2013-03-08 11:26:57 -08:00
Elliott Hughes
5acc6e5214 Use getRelativeDayString in getRelativeTimeSpanString.
The bug we're fixing here is that languages that don't
distinguish the "one" case grammatically (such as Japanese)
would say the equivalent of "In 1 day" rather than "Tomorrow"
because of the misuse of getQuantityString.

This has the side-effect of switching us over to the CLDR
strings for relative day names, which have consistent capitalization;
the Android donottranslate-cldr.xml strings varied even within
a language, so although this is a change, it seems like a step
in the right direction.

In a future change, we should actually push all relative
day formatting down into icu4c.

Bug: 7098707
Change-Id: Ia2f9af3d18c441d6093dd5da7956a3d0130e5b06
2013-03-07 16:46:55 -08:00
Victoria Lease
7d4e52baee Merge "FIX Null Pointer Exception on dialog cancel" 2013-03-05 23:25:16 +00:00
Roger Chen
002ecd2122 Audio continue to played even if paused manually
Currently, audio will resume playing after a phone call
or notification even if the user had manually paused playback.

This patch addresses that by introducing a new player state
to distinguish the user pausing playback and the browser
losing audio focus for some other reason. Audio will only
 resume if the browser temporarily lost audio focus and
not when the user has manually paused playback.

Change-Id: I9e8beaedb0fcc5afe920068297ed9c387eab2ac8
Signed-off-by: Roger Chen <cxr514033970@gmail.com>
2013-03-05 13:05:34 +00:00
Brian Carlstrom
6bae82a2ae Tracking libcore change to use longs instead of ints to store pointers in OpenSSL binding
Change-Id: Ieba5705f4faa7cea619cf509db3ef081fda570d5
2013-03-01 09:13:26 -08:00
Ian Rogers
7c9f30bfb3 Track stack memory in MemoryInfo.
In /proc/pid/maps the main stack is identified as "[stack]". In Linux 3.4
thread stacks are identified as "[stack:<tid>]" where <tid> is the thread ID of
the thread using that stack. Add support in MemInfo's otherStats to track
memory being used by the stack.

Add sanity check on the length of the otherStats array.
Add detail messages to two null pointer exceptions.

Bug: 8265251

Change-Id: I2b228b147da9bdc5c7a4d825dfc628fcc7923927
2013-02-27 11:34:42 -08:00
Ian Rogers
545464df28 Merge "Deprecate and document memory allocation counting." 2013-02-27 16:45:39 +00:00
Ian Rogers
fe067a4cc5 Deprecate and document memory allocation counting.
Bug: 8241521
Change-Id: I174c4024600c5b78e74030ecc99e784a98295f09
2013-02-26 13:30:08 -08:00
Elliott Hughes
3f5778c858 Merge "Fix incorrect FloatMath documentation." 2013-02-26 17:37:58 +00:00
Elliott Hughes
f732a2f83f Fix incorrect FloatMath documentation.
Change-Id: I30bbe500e634b73f3456ccc797106ad261fd0ce7
2013-02-26 09:28:17 -08:00
Amit Kumar
fe6c30e44e FIX Null Pointer Exception on dialog cancel
Null Pointer Exception occurs because mWebViewCore instance
is made to null while calling destroyJava(). When 
1.webview hosting activity goest to background, without calling webview onPause().
2. If app is launched again (having launchmode:singletask ) and another activity (not  webview hosting) comes on top top.
3. It destorys the previous activity holding webview which internally tries to cancel the dialog, but webviewcore instance is null. 
Null pointer exception is raised.

Change-Id: Idbcd30d0b0d4a35819444bbaa5c73cced8bb35a3
Signed-off-by: Amit Kumar <amitkecian@gmail.com>
2013-02-24 09:20:26 +00:00
Adam Powell
d61ff77ee1 Merge "Fix ListView is not scrolled properly with arrows" 2013-02-22 21:29:44 +00:00
Wink Saville
b5a1ce2f5d Merge "Allow three digit phone numbers" 2013-02-20 23:04:32 +00:00
Victoria Lease
c36303a66d Merge "Applying ChannelScrolling to remove calculateDragAngle" 2013-02-19 17:40:09 +00:00
kiwon
72034953bf Applying ChannelScrolling to remove calculateDragAngle
To avoid angle calculation changed the logic to use virtual areas.
When try to drag or pan, check where the current touch point locates
and determine how to drag a page.

Change-Id: Id9bd08a69c4ac93ff385c8088e6c16bed5dc5f88
Signed-off-by: kiwon <kiwon98.lee@samsung.com>
2013-02-18 14:30:58 +09:00
Bin Zhu
a37fc575a4 Allow three digit phone numbers
The comment for the PHONE pattern says:

"<digit><digit|sdd>+<digit>"

But the actual pattern requires that the string contains
more than that. A phone number should be allowed to be
three digits.

Change-Id: I86d2f3d634cd0c1654dad9814906f151055dc23a
2013-02-15 11:54:41 +01:00
Kenny Root
e151f281d5 Track keystore binder changes
Change-Id: Id6133be059a8a0901d16355a9152e40e4a255454
2013-02-13 15:22:25 -08:00
Jeff Brown
d9f98c8106 Fix build break due to merge.
Change-Id: I08c39690ee9de825ff51afc7d102ee622af6ba13
2013-02-11 11:34:43 -08:00
Jeff Brown
4fd6079247 am 5262a108: Merge "Complete documentation of whereArgs (Issue #43061)"
# By Tim Roes
# Via Gerrit Code Review (1) and Tim Roes (1)
* commit '5262a1082663610a888d1145fd9676f7db41d397':
  Complete documentation of whereArgs (Issue #43061)
2013-02-08 16:58:14 -08:00
Jeff Brown
5262a10826 Merge "Complete documentation of whereArgs (Issue #43061)" 2013-02-08 23:49:51 +00:00
Jeff Brown
110fe9b303 am fe1f3a1b: Merge "Fix ViewRootImpl to find missing focus using D-pad."
# By Ki-Hwan Lee
# Via Gerrit Code Review (1) and Ki-Hwan Lee (1)
* commit 'fe1f3a1beff9f73f6a04bcc35239038a21bc38ff':
  Fix ViewRootImpl to find missing focus using D-pad.
2013-02-08 15:49:46 -08:00
Jeff Brown
fe1f3a1bef Merge "Fix ViewRootImpl to find missing focus using D-pad." 2013-02-08 23:29:11 +00:00
Jaewan Kim
db68fac12d Fix ListView is not scrolled properly with arrows
According to ListView's layoutChildren logic, it detaches all children
and rebuilds its children based on visible area which might omit
invisible elements in the adapter.

In this case, arrowScroll methods only tries to find next scroll
candidates from its children so user is unable to scroll more with
D-pad.

This fixes the issue by look forward next child among the adapter as
well as children.

Bug: 7346868
Change-Id: I01ab19ad899b5bcb5ab420ddf08c9ffd136933d1
2013-02-09 03:27:09 +09:00
Marco Nelissen
85a1ee3021 am b683f354: am 69abccc3: Merge "MediaStore.Audio.Media.getContentUriForPath() returns unexpected content"
# By Jan Bjernler
# Via Gerrit Code Review (2) and Android Git Automerger (1)
* commit 'b683f3542a123a07823b51643b1973507bfb57e2':
  MediaStore.Audio.Media.getContentUriForPath() returns unexpected content
2013-02-08 08:44:36 -08:00
Marco Nelissen
b683f3542a am 69abccc3: Merge "MediaStore.Audio.Media.getContentUriForPath() returns unexpected content"
# By Jan Bjernler
# Via Gerrit Code Review
* commit '69abccc3cdacee354dec8867865a0577a4e14e63':
  MediaStore.Audio.Media.getContentUriForPath() returns unexpected content
2013-02-08 08:41:20 -08:00
Jan Bjernler
66eb589957 MediaStore.Audio.Media.getContentUriForPath() returns unexpected content
MediaStore.Audio.getContentUriForPath() returns an uri to
internal storage if anything but /mnt/sdcard/ is sent in.
This fix checks if there is an additional sdcard
(normally called ext_card) or usb mass storage attached to
the device and then returns an uri to the external db.
The extra sdcard name and the usb mass storage name info is read from
the system environment variable SECONDARY_STORAGE so if a customer
chooses to change the name this will work as expected.

Change-Id: Ib78bca929fe382d4770df895149a0132f0e56994
2013-02-08 16:17:23 +00:00
Katie McCormick
89e7aa3dae am 2306f0ee: am ee27bcda: am b68702eb: am 0e66f16a: Merge "Doc change: Scroller Javadoc Bug # 7966653" into jb-mr1-dev
# Via Android Git Automerger (3) and others
* commit '2306f0ee3396cd8a85d04dfbc08fb8c5ffa6699f':
  Doc change: Scroller Javadoc Bug # 7966653
2013-02-07 17:26:13 -08:00
Katie McCormick
2306f0ee33 am ee27bcda: am b68702eb: am 0e66f16a: Merge "Doc change: Scroller Javadoc Bug # 7966653" into jb-mr1-dev
# Via Android Git Automerger (2) and others
* commit 'ee27bcda8644f8c3f2328acc248b8c5c9d152f59':
  Doc change: Scroller Javadoc Bug # 7966653
2013-02-07 17:23:00 -08:00
Katie McCormick
b68702eb05 am 0e66f16a: Merge "Doc change: Scroller Javadoc Bug # 7966653" into jb-mr1-dev
# Via Android (Google) Code Review (1) and Katie McCormick (1)
* commit '0e66f16abd651bdf5833f4aede4899e627d7b333':
  Doc change: Scroller Javadoc Bug # 7966653
2013-02-07 17:18:48 -08:00
Katie McCormick
87cfad7d74 Doc change: Scroller Javadoc Bug # 7966653
Change-Id: I4365946f890a76fcfa78ca9d69f2a8e0848095a9
2013-02-07 16:42:26 -08:00
Jeffrey Brown
2990ed7a3b am 3c6ee5b5: am d2bec096: Merge "NullPointerException in SQLiteSession"
# By László Dávid
# Via Android Git Automerger (1) and others
* commit '3c6ee5b509d6360a431290fff4b366848c293899':
  NullPointerException in SQLiteSession
2013-02-06 22:03:51 -08:00
Jeffrey Brown
3c6ee5b509 am d2bec096: Merge "NullPointerException in SQLiteSession"
# By László Dávid
# Via Gerrit Code Review (1) and László Dávid (1)
* commit 'd2bec0960d04578182905b34795c6895760944dd':
  NullPointerException in SQLiteSession
2013-02-06 22:01:34 -08:00
Jeffrey Brown
edc933318c am a0d547b4: am dac4a90d: Merge "fix hover events consume issue"
# By Masanori Ogino
# Via Android Git Automerger (1) and others
* commit 'a0d547b43b3508c7253da234f529acf60d00fd13':
  fix hover events consume issue
2013-02-06 20:53:21 -08:00
Jeffrey Brown
4e68024c7e am 1e48b386: am 04ce0d25: Merge "Keep native callbacks when primary SQLiteConnection is recreated"
# By Niklas Brunlid
# Via Android Git Automerger (1) and others
* commit '1e48b386eac8cb1ca9e6e50d73422661691512dc':
  Keep native callbacks when primary SQLiteConnection is recreated
2013-02-06 20:53:14 -08:00
Jeffrey Brown
e646f943fd am ca7b1210: am ea56499d: Merge "Potential NPE in SQLiteConnection"
# By Sylvain Becuwe
# Via Android Git Automerger (1) and others
* commit 'ca7b1210292c2fc80fd40f1f4c8662a1faf0b7a5':
  Potential NPE in SQLiteConnection
2013-02-06 20:53:10 -08:00
Jeffrey Brown
f2873456dd am 352d84b8: am 0d47af11: Merge "Clear loaders array after they are destroyed."
# By Roman Mazur
# Via Android Git Automerger (1) and others
* commit '352d84b841e7c81c259f5de576ea127d177b39f8':
  Clear loaders array after they are destroyed.
2013-02-06 20:53:06 -08:00
Jeffrey Brown
a3f82b1b2d am e4ce2517: am b314f433: Merge "add reply.writeNoException() for quick response"
# By Sungmin Choi
# Via Android Git Automerger (1) and others
* commit 'e4ce25177bdf7720c6b3dd5ea7b48f6b03b06469':
  add reply.writeNoException() for quick response
2013-02-06 20:52:59 -08:00
Jeffrey Brown
a0d547b43b am dac4a90d: Merge "fix hover events consume issue"
# By Masanori Ogino
# Via Gerrit Code Review (1) and Masanori Ogino (1)
* commit 'dac4a90d656dca86bd14cd91d685c07d8a6b29a4':
  fix hover events consume issue
2013-02-06 20:50:13 -08:00
Jeffrey Brown
1e48b386ea am 04ce0d25: Merge "Keep native callbacks when primary SQLiteConnection is recreated"
# By Niklas Brunlid
# Via Gerrit Code Review (1) and Johan Redestig (1)
* commit '04ce0d253de9ec16f921824409a7b2c13195c19e':
  Keep native callbacks when primary SQLiteConnection is recreated
2013-02-06 20:50:04 -08:00
Jeffrey Brown
ca7b121029 am ea56499d: Merge "Potential NPE in SQLiteConnection"
# By Sylvain Becuwe
# Via Gerrit Code Review (1) and You Kim (1)
* commit 'ea56499dc36d863f92857ab7f93e5c4436f9654f':
  Potential NPE in SQLiteConnection
2013-02-06 20:50:00 -08:00
Jeffrey Brown
352d84b841 am 0d47af11: Merge "Clear loaders array after they are destroyed."
# By Roman Mazur
# Via Gerrit Code Review (1) and Roman Mazur (1)
* commit '0d47af1131c4d4f9f29dad790d919d8599e3a3cc':
  Clear loaders array after they are destroyed.
2013-02-06 20:49:54 -08:00
Jeffrey Brown
e4ce25177b am b314f433: Merge "add reply.writeNoException() for quick response"
# By Sungmin Choi
# Via Gerrit Code Review (1) and Sungmin Choi (1)
* commit 'b314f433905ea2cbc62bd5af658f05261a752e5a':
  add reply.writeNoException() for quick response
2013-02-06 20:49:41 -08:00
Jeffrey Brown
d2bec0960d Merge "NullPointerException in SQLiteSession" 2013-02-07 04:43:00 +00:00
Jeffrey Brown
dac4a90d65 Merge "fix hover events consume issue" 2013-02-07 04:40:30 +00:00
Ki-Hwan Lee
4ef158baa3 Fix ViewRootImpl to find missing focus using D-pad.
By using D-pad, no-focus in non touch mode is rare but legal in a case like below.

1. The first request to get focus for a new activity is handled in the first
   performTraversals() call when activity is not ready for a complete view hierarchy.
   So there might be no focusable yet.
2. If the activity has some menus, ActionMenuView can be attached to the view hierarchy
   in the PhoneWindow.preparePanel() soon.
   So there can be focusables but still not focused.

Fixed ViewRootImpl.deliverKeyEventPostIme() to handle this case to resurrect a focus
if there are focusables.

How to reproduce:
(1) Open "API Demos" application -> Views -> Search View
(2) Select "Action Bar" item using the D-pad
(3) Try to focus the Search View, using the D-pad.

Change-Id: Ic379774f0307f168f0ed775d0f6a9078ac5c9713
2013-02-07 13:26:14 +09:00
Jeffrey Brown
04ce0d253d Merge "Keep native callbacks when primary SQLiteConnection is recreated" 2013-02-07 04:15:32 +00:00
Jeffrey Brown
ea56499dc3 Merge "Potential NPE in SQLiteConnection" 2013-02-07 04:04:58 +00:00
Jeffrey Brown
0d47af1131 Merge "Clear loaders array after they are destroyed." 2013-02-07 03:59:20 +00:00
Jeffrey Brown
b314f43390 Merge "add reply.writeNoException() for quick response" 2013-02-07 03:46:48 +00:00