37282 Commits

Author SHA1 Message Date
Elliott Hughes
cdafd37f31 Clean up (some of) our many clocks to use H instead of k.
Bug: 8359981
Change-Id: I3c0c38c2bf5adc4b5bdc11c3d10cf41dd8fb6462
2013-03-18 17:21:33 -07:00
Elliott Hughes
fc55c2ba49 Deliberately break DateFormat.format's formatting of 'k' for compatibility.
Bug: 8359981
Change-Id: I44ed816c644f94783c77952d544c5444b966868b
2013-03-18 14:59:59 -07:00
Robert Greenwalt
519ba7b10c Merge "update APN version for MVNO" 2013-03-16 00:18:52 +00:00
John Reck
733329a274 Merge "Fix NPE when pasting non-text from Clipboard" 2013-03-12 20:24:14 +00:00
Kenny Root
7ad514094c Merge "Switch TLS Channel ID API from ECPrivateKey to PrivateKey." 2013-03-12 20:05:09 +00:00
Alex Klyubin
ac5eb03a7c Switch TLS Channel ID API from ECPrivateKey to PrivateKey.
This is to accept both the "transparent" and "opaque" ECC private
keys. "Transparent" keys provide structured access to their key
material -- these are instances of ECPrivateKey. "Opaque" private
keys are not required to provide structured (or even any) access to
their key material -- these are instances of PrivateKey.

Change-Id: Ib22e18b45b638b429f994ed965416c753226c4ee
2013-03-12 10:33:13 -07:00
Nils Holmström
df337f30e9 Fix NPE when pasting non-text from Clipboard
When copying a link from a bookmark and then pasting it into
a textfield a NullPointerException will occur.
A ClipData.Item is not guaranteed to always contain a text string
and therefore getText() can be set to null.

Using method coerceToText() instead of getText() makes sure that
a text string is always returned.

Change-Id: I81343c0371835a3a7a52045dcd1760e69e59a967
2013-03-12 20:49:14 +09:00
Elliott Hughes
7a89f62877 Fix DateFormat k and h, and implement K and H for the first time.
Bug: 8359981
Change-Id: I52ef937a77e9e28f2719c2ee6f59e4b74514f0b2
2013-03-11 14:49:44 -07:00
Sungmin Choi
9a2ada418b use Calendar in DateUtils format method
The DatePickerDialog is using DateUtils to format the dialog's title
and the DateUtils class does not work with dates outside to the
specified range.
For example, if user selects 2038-03-07, DatePickerDialog shows
1902-01-30 on Title.
The reason for the DateUtils class not being able to format dates
outside the range of 1902 and 2036 is because internally it is using
the Time class which does not support such dates.
To fix it, use Calendar class in DataUilts format method.

Steps to reproduce:
1. Settings -> Date & time
2. uncheck Automatic date & time
3. Set Date
4. choose any date before 1902 or after 2037
5. update wrong date on Title

Bug: https://code.google.com/p/android/issues/detail?id=13050
Change-Id: I003266765751b5c340426af84daef271f39f771e
2013-03-11 11:24:02 -07:00
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
Elliott Hughes
025148cc4d Explain why the frameworks/base DateUtilsTest isn't merged with CTS' DateUtilsTest.
Change-Id: Icbdb4e9133a9ae1c1b37f822367e1ac86e9e36cb
2013-03-07 14:30:17 -08:00
Victoria Lease
7d4e52baee Merge "FIX Null Pointer Exception on dialog cancel" 2013-03-05 23:25:16 +00:00
Victoria Lease
f45efd276c Merge "Audio continue to played even if paused manually" 2013-03-05 23:20:45 +00:00
Bruce Beare
d625127db9 jni: remove obsolete flag from makefile
Change-Id: Ia7e67694a736745333e9d36396b8cb6194fd26ec
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2013-03-05 14:29:46 -08: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
Nick Kralevich
b3c4a0bb5c ZygoteInit: use correct header files.
Don't define capget / capset when we already have definitions
of it in our header files.

Change-Id: Ia2d7e408879bd09019f99aef52acb63a7a243d48
2013-02-28 16:56:16 -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
Ian Rogers
9f8589c31f Recognize odex files in memory accounting.
Give odex files the same heap category as dex files.

Change-Id: I82539e20ac20a2b80c63c0cfceb266d9c59e22b7
2013-02-22 20:35:56 -08:00
Adam Powell
d61ff77ee1 Merge "Fix ListView is not scrolled properly with arrows" 2013-02-22 21:29:44 +00:00
Ian Rogers
afc10e174d Account malloc mmaped pages as native heap.
Currently when malloc uses a page rather than brk the heap gets accounted as
ashmem memory. Previously the memory would be accounted as unknown but since
[1] it gets accounted as ashmem. This change makes the accounting see this
memory as being native, ie the same kind of memory we associate with brk.

[1] https://android-review.googlesource.com/#/c/49583/3

Change-Id: I6f496cfeb590268d41d8e047b12cd5c90359e2b0
2013-02-22 09:40:58 -08: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
Wink Saville
1c2acdc6e8 Fix broken test.
Change-Id: I8c5649c9b3d917cf13b94d49da44eaf510643df6
2013-02-15 15:20:37 -08:00
Irfan Sheriff
46e0931080 Fix connectivitymanagertest
Change-Id: If5687eacec0f502c39b102eb5cf7d9383f0ec056
2013-02-15 14:55:15 -08: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
Jesse Hall
93194ffbf1 am c2edfa2b: am 7c292062: Merge "Process all display events in order"
# Via Gerrit Code Review (2) and Android Git Automerger (1)
* commit 'c2edfa2b9649f67c142b181c54580c015badfca3':
  Process all display events in order
2013-02-07 20:26:27 -08:00
Jesse Hall
c2edfa2b96 am 7c292062: Merge "Process all display events in order"
# Via Gerrit Code Review
* commit '7c2920625eb72216025aeb8ea8dce544df0eca36':
  Process all display events in order
2013-02-07 17:41:50 -08: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