Commit Graph

1605 Commits

Author SHA1 Message Date
vichang
2b05393251 Merge "Remove @CorePlatformApi LocaleData usage in frameworks" am: 3f89b904a8 am: 226e3d7641 am: 9ee26b06fb am: f82c013ec3 am: 6e4f9e9e06
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1367376

Change-Id: I7f0c730abced6a03fb8952d602a398a724667569
2020-07-22 20:28:18 +00:00
vichang
9ee26b06fb Merge "Remove @CorePlatformApi LocaleData usage in frameworks" am: 3f89b904a8 am: 226e3d7641
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1367376

Change-Id: Ib23a5ff1491c89d5cd0f962b1f609c988111c18b
2020-07-22 19:48:40 +00:00
vichang
3f9e52d88b Merge "Use DateFormatSymbols directly instead of using LocaleData" am: 3bd9f08ae5 am: da5838aa43 am: 36a3657be8 am: afbfec08c7 am: eb59659998
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1364767

Change-Id: I4dd7683e1473cde7ea560d43de38ad640fe752f6
2020-07-21 17:53:25 +00:00
vichang
36a3657be8 Merge "Use DateFormatSymbols directly instead of using LocaleData" am: 3bd9f08ae5 am: da5838aa43
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1364767

Change-Id: I8fbfc4e551396b32c1aafab4aa750af1baa7c827
2020-07-21 16:56:31 +00:00
vichang
ebafe9a39d Merge "Remove the duplicated constant declaration in DateUtilsBridge" am: 3db0441e5c am: c52a84acf3 am: 70862e266e am: ba3ebf0844 am: a23606dd5e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1364765

Change-Id: If89ea1b23a0e34f2f5e556b79f73c44dd257f0bc
2020-07-21 10:23:41 +00:00
vichang
36bde75bdc Merge changes from topic "DateIntervalFormat" am: 6e706c4cee am: 85c56c1fa4 am: c675c3e826 am: d7b8bede26 am: 076b3347b7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365636

Change-Id: I987c7a0bf346d6805b615586a3afe76702f30456
2020-07-21 10:22:49 +00:00
vichang
70862e266e Merge "Remove the duplicated constant declaration in DateUtilsBridge" am: 3db0441e5c am: c52a84acf3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1364765

Change-Id: Iab8475912ecf95b90d24eb5b2dc9165e4442a347
2020-07-21 09:36:43 +00:00
vichang
c675c3e826 Merge changes from topic "DateIntervalFormat" am: 6e706c4cee am: 85c56c1fa4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365636

Change-Id: I6ff83f882fac3cf045defe4aa297495d3b011ddc
2020-07-21 09:36:18 +00:00
Victor Chang
55a6efbfd9 Remove @CorePlatformApi LocaleData usage in frameworks
They can be replaced by the public API provided by ICU4J instead.
No extra layer of caching equivalent to the LocaleData cache is
added because ICU4J has caches instances, e.g. DateFormatSymbols,
etc.

Bug: 160606356
Test: atest FrameworksCoreTests:android.text.format
Change-Id: I07048e0e1a4835d2744b7fce6a5ed79a112e456b
2020-07-20 21:09:40 +01:00
Victor Chang
c744bd5f64 Use DateFormatSymbols directly instead of using LocaleData
Bug: 160606356
Test: atest FrameworksCoreTests:android.text.format
Change-Id: Id5d70328ab146d439ed45135e0fa9d1b9cc95257
2020-07-20 21:09:40 +01:00
Victor Chang
6a691eeec7 Remove the duplicated constant declaration in DateUtilsBridge
Bug: 160606356
Test: m droid FrameworksCoreTests
Change-Id: Ifa79b2a29c6fc0c767337efe569da2d2ba29f959
2020-07-20 21:09:40 +01:00
Victor Chang
3a3a8ada42 Make a copy of DateIntervalFormat from libcore - part 2
Bug: 160606356
Test: atest FrameworksCoreTests:android.text.format
Change-Id: I4c4253c707211f2a5ee0a11da107ab1dd6c4fab8
2020-07-20 21:09:40 +01:00
Victor Chang
8ee3807a01 Make a copy of DateIntervalFormat from libcore
It allows the removal of @CorePlatformApi in libcore.icu

Bug: 160606356
Test: n/a
Change-Id: Id0ed2d212b6cd84ff73edc70794e002ea5f63cd0
2020-07-16 16:23:58 +01:00
vichang
e6b6b491bd Merge changes from topic "DateUtilsBridge" am: 59d12aa8bd am: f65666d055 am: f5ed148053 am: fe1600c0db am: 175a1a7df9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1356708

Change-Id: Ib57a70ae05a872f2037e3da5716639a33985ebcd
2020-07-13 11:07:16 +00:00
vichang
f5ed148053 Merge changes from topic "DateUtilsBridge" am: 59d12aa8bd am: f65666d055
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1356708

Change-Id: Idd5d71f2d6b787ddbece60746c97dd2713ecc7cc
2020-07-13 10:22:38 +00:00
vichang
59d12aa8bd Merge changes from topic "DateUtilsBridge"
* changes:
  Move/Copy some libcore.icu classes to android.text.format
  Copy some libcore.icu classes to android.text.format
2020-07-13 10:02:16 +00:00
vichang
534ea43ebd Merge "Remove libcore.icu.ICU usage in android.text.format.DateFormat" am: ec71624f22 am: 3b25f55042 am: 8a202538bc am: 13121a763b am: 8ec9138f79
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1355737

Change-Id: Ia20f6f9fcc64711e79a9afdd38895ab600b8c691
2020-07-13 02:56:29 +00:00
vichang
8a202538bc Merge "Remove libcore.icu.ICU usage in android.text.format.DateFormat" am: ec71624f22 am: 3b25f55042
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1355737

Change-Id: Ibc2b1561f316afe2371d9549190a0c328a180141
2020-07-13 02:31:18 +00:00
Victor Chang
5e348b2a28 Move/Copy some libcore.icu classes to android.text.format
Bug: 160606356
Test: atest FrameworksCoreTests:android.text.format
Change-Id: I5a3e954419e8bd282ec5dd057b241c3572be6831
2020-07-10 18:00:29 +00:00
Victor Chang
cdf1423650 Copy some libcore.icu classes to android.text.format
Bug: 160606356
Test: N/A
Change-Id: I408ed56e240d2379fb49a52a19f134d83a2b601f
2020-07-07 18:30:55 +01:00
Victor Chang
a0d05f4fdc Remove libcore.icu.ICU usage in android.text.format.DateFormat
The methods can be implemented with ICU4J directly.

Bug: 160606356
Test: atest android.text.format.DateFormatTest
Test: atest CtsTextTestCases:android.text.format.cts.DateFormatTest
Change-Id: I3d5f639a94026c599b487563c95bf9d165adfeec
2020-07-06 21:30:24 +01:00
vichang
26ed852eaf Merge "Use new package name for ZoneInfo and libcore.timezone" am: af6f8e2301 am: 64937407f2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1346485

Change-Id: I5ded5092e4c7706f58417a5c97f3207524b44a95
2020-06-30 17:23:46 +00:00
Victor Chang
2ea241f6ee Use new package name for ZoneInfo and libcore.timezone
Bug: 141747409
Test: None
Merged-In: Id99a345ec024179295063c3644f72c062cb50554
Change-Id: Id99a345ec024179295063c3644f72c062cb50554
2020-06-30 13:53:47 +01:00
Victor Chang
6c22f6adb0 Use new package name for ZoneInfo and libcore.timezone
Bug: 141747409
Test: None
Change-Id: Id99a345ec024179295063c3644f72c062cb50554
2020-06-25 18:30:29 +01:00
Jason Hsu
27f8500443 Merge "Fix talkback did not speak out ReplacementSpan's content description." into rvc-dev am: dac6071aca am: 5684903daa am: 6005f85a64 am: b1b7ef92a7
Change-Id: I22d864f337efb115dba4fbe5410332ec7fdddff4
2020-05-30 02:01:05 +00:00
Jason Hsu
b1b7ef92a7 Merge "Fix talkback did not speak out ReplacementSpan's content description." into rvc-dev am: dac6071aca am: 5684903daa am: 6005f85a64
Change-Id: I9df0b450741d01b95ab53a1b3ddc663921aafc3f
2020-05-30 01:39:50 +00:00
Jason Hsu
540918349a Merge "Fix talkback did not speak out ReplacementSpan's content description." into rvc-dev am: dac6071aca
Change-Id: I762f05ffdba5a63e1d805beed44e28a8020fbc33
2020-05-30 01:12:12 +00:00
jasonwshsu
c70a456060 Fix talkback did not speak out ReplacementSpan's content description.
* setContentDescription() back to ReplacementSpan when receiving parcel
* extend writeToParcel to handle AccessibilityReplacementSpan

Bug: 155833272
Test: atest AccessibilityNodeInfoTest#testSetTextWithImageSpan_shouldTextSetToInfo
Change-Id: Iab902bdcee53fc09cbba2c7c06858823524a3af9
2020-05-28 03:34:16 +08:00
Neil Fuller
29867f046d Merge "Be more defensive around invalid tzids" am: f60c302dad am: 96c57398b4
Change-Id: If8695ee257155eaedc901aa797f1939eab0c721e
2020-05-26 10:54:50 +00:00
Neil Fuller
26fe60a188 Be more defensive around invalid tzids
Add checks during boot in case the persist.sys.timezone property is set
to a bad ID.

This can happen in the rare case of a mainline rollback: i.e. if a device has
been set to a new ID and then the update is rolled back. Using GMT as a
fallback probably works without this change (it does in java.util.TimeZone),
but relies on all code, including native code that uses
persist.sys.timezone directly, knowing to interpret a bad ID as "GMT".
This commit makes that choice more explicit and defensive.

This change also removes the possibility of IOException, which is never
thrown, from some ZoneInfoDb methods.

Bug: 155738410
Test: boot with a valid id, verify persist.sys.timezone is unchanged
Test: boot with an invalid id set,  verify persist.sys.timezone is "GMT"
Merged-In: I6dc0f4f81848efbbaec6a11a62014471a0ef01fd
Change-Id: I6dc0f4f81848efbbaec6a11a62014471a0ef01fd
Exempt-From-Owner-Approval: Approved / landed internally
2020-05-26 10:19:53 +00:00
Neil Fuller
29fba44b58 Be more defensive around invalid tzids
Add checks during boot in case the persist.sys.timezone property is set
to a bad ID.

This can happen in the rare case of a mainline rollback: i.e. if a device has
been set to a new ID and then the update is rolled back. Using GMT as a
fallback probably works without this change (it does in java.util.TimeZone),
but relies on all code, including native code that uses
persist.sys.timezone directly, knowing to interpret a bad ID as "GMT".
This commit makes that choice more explicit and defensive.

This change also removes the possibility of IOException, which is never
thrown, from some ZoneInfoDb methods.

Bug: 155738410
Test: boot with a valid id, verify persist.sys.timezone is unchanged
Test: boot with an invalid id set,  verify persist.sys.timezone is "GMT"
Change-Id: I6dc0f4f81848efbbaec6a11a62014471a0ef01fd
2020-05-21 13:34:59 +01:00
Leon Scroggins III
1a05b72cc4 Remove @hide from android.graphics.Color
Bug: 156505010
Test: HtmlTest
Test: I060478a4e46f4ed153007d42cb5b7c5eae04de27

Remove Color#getHtmlColor, which was marked as @hide. Its only caller
was outside the in-progress UI rendering module, so it would no longer
be able to access it after the move.

Make the calling code call either the already-public Color#parseColor or
the (@hide, which is okay from android.text) XmlUtils.convertValueToInt
directly to achieve the same effect as before.

Change-Id: I8fde97bb866689849ba49932c6d7ca10bbd618c5
2020-05-14 16:31:22 -04:00
Andrew Sapperstein
3b0ca2b358 Merge changes from topic "cherrypick-ctor-refs-03y8i58ine" into rvc-dev am: 975ca816ec
Change-Id: I30efa4f3aefc466e138541b34ae8901005ee9902
2020-05-02 00:36:11 +00:00
Andrew Sapperstein
f181c2f44b Fix broken @see tags in public documentation. am: 8fe35e5f21
Change-Id: Ic95104f61b736d05f18c7465e77951771f39fcbf
2020-05-02 00:36:07 +00:00
Andrew Sapperstein
8fe35e5f21 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
(cherry picked from commit e0624c7a40)
2020-05-01 18:25:32 +00:00
Andrew Sapperstein
4c4aa41272 Update inner class constructor refs to use proper syntax.
Previously, we generally required fully qualified names for referring
to inner class constructors (like #Notification.Builder()) despite that
not being valid javadoc. Now, we properly support #Builder() syntax and
the old syntax will error.

Bug: 6963924
Test: make doc-comment-check-docs
Change-Id: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
2020-04-29 13:16:02 -07:00
Andrew Sapperstein
e0624c7a40 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
2020-04-28 12:37:15 -07:00
Lucas Dupin
fc36319458 Merge "Translate text by top" into rvc-dev am: 9d3b2a446e am: 7a69c08004
Change-Id: Id736b38e8791166da06eebd8682910963da90425
2020-04-22 19:02:44 +00:00
Lucas Dupin
5ed8accfa2 Merge "Translate text by top" into rvc-dev am: 9d3b2a446e
Change-Id: Idf2aa1f5399d19cd8a642a4d49fd8fd3d9640b21
2020-04-22 18:46:44 +00:00
Lucas Dupin
9d3b2a446e Merge "Translate text by top" into rvc-dev 2020-04-22 18:42:42 +00:00
Lucas Dupin
798562bfbd Translate text by top
We were centralizing without considering that there could be some
additional translation passed to DynamicDrawableSpan#draw

Test: atest DynamicDrawableSpanTest
Fixes: 154489406
Change-Id: I9615f478d1962b2d6fd54123fc391554073f5bf1
2020-04-21 16:42:27 -07:00
Jeff Sharkey
a650421e92 Merge changes from topic "apr19" into rvc-dev am: b67e70aa40 am: ed91f7aabf
Change-Id: I9713e76a78868c7ef2e57c697e141643e1681a81
2020-04-21 23:12:09 +00:00
Jeff Sharkey
eb80b15511 Merge changes from topic "apr19" into rvc-dev am: b67e70aa40
Change-Id: Ic5abb1e4e727a6d7869dcb7a46cee64d225c4c61
2020-04-21 23:01:53 +00:00
Jeff Sharkey
0223df096c Update some Parcelables to send Strings UTF-8.
An earlier CL with benchmarks has shown that sending strings as UTF-8
is 50% faster for US-ASCII strings, and still 68% faster for complex
strings referencing higher Unicode planes.  (So an improvement in
both cases!)

Since code across the OS still makes heavy assumptions about Parcel
strings typically being UTF-16, we need to carefully migrate
Parcelables by hand, which is what this CLs begins doing.

This is a purely mechanical refactoring with no functional changes.

Bug: 154436100
Test: manual
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Ia9e581efd7c40269342b7528ca07363deb843c0f
2020-04-21 22:59:26 +00:00
Fredrik Roubert
f030962cce Merge "Add "ftp" to the list of URL schemes that get linkified." am: cc7a0e7152 am: d13a70de57
Change-Id: I0a0099a4fdc1bcdf76d097313f4f938f3bf9049b
2020-04-01 19:21:38 +00:00
Fredrik Roubert
0b4907e839 Add "ftp" to the list of URL schemes that get linkified.
Fixes: 152892738
Change-Id: I888c5b12ebb417309250a25dc70baedad2cf7d7c
2020-03-31 21:40:41 +02:00
Rod S
b573a9d949 Update frameworks/base Emoji.java to Unicode 13.
As ICU is updated, delete special cases.

Test: atest core/tests/coretests/src/android/text/EmojiTest.java
Bug: 151964652

Change-Id: I89032c22e5464d257866d926062db34c65943572
(cherry picked from commit 31d7c155b7)
2020-03-19 23:12:53 +00:00
menghanli
a7d97f7ec5 Refines the javadoc of the ReplacementSpan.getContentDescription
- inconsistent for the doc & API implementation.

Bug: 150472098
Test: Manual test
Change-Id: Idb1e35245487ac161225f1e53c6308541694b481
2020-03-18 18:06:36 +08:00
Jayachandran C
207aa3a8e4 Remove API getDefaultSimCountryIso() as per API council feedback
Change Linkify to
1) use fallback context from activity thread when a valid context
   is not passed in the API.
2) use default locale if activity thread returns null context

Bug: 144576376
Bug: 148514283
Test: atest com.android.frameworks.coretests

Change-Id: I145821d12b49fcd4036dafce27857547f293124f
2020-03-09 13:22:36 -07:00
Automerger Merge Worker
fdb676b4dd Merge "Rename ZoneInfoDB -> ZoneInfoDb" am: 402674f2a0 am: c3e31d6ac5 am: f8a4287915
Change-Id: I72978765010e3da52bcdf00299f7ba999bc9201b
2020-01-29 14:33:04 +00:00