Commit Graph

1603 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
d3d76d8063 Remove usage of hidden NetworkUtils from Formatter
Use the Inet4AddressUtils common utility instead.
NetworkUtils is moving to the connectivity module, so its hidden symbols
are not accessible from the framework. Use the Inet4AddressUtils utility
instead.

NetworkUtils.intToInetAddress is also deprecated.

Bug: 174436414
Test: m

Change-Id: Ia4f4de2f23b2e2be056f78cc30259814f9a4dc91
2021-01-18 17:01:56 +09:00
Andrei-Valentin Onea
5bba56e147 Merge "Update DISALLOW_DUPLICATE_FIELD_IN_SKELETON" 2020-11-09 14:58:38 +00:00
Mathew Inwood
f8abe13db4 Merge "Add maxTargetSdk restriction to unused APIs." 2020-11-09 14:41:20 +00:00
vichang
65d1fda8f6 Merge "Move WallTime out of ZoneInfoData" 2020-11-06 18:01:08 +00:00
Andrei Onea
4299e79da7 Update DISALLOW_DUPLICATE_FIELD_IN_SKELETON
Use @EnabledSince instead of @EnabledAfter for DISALLOW_DUPLICATE_FIELD_IN_SKELETON

Test: m
Bug: 172238506
Change-Id: I041e1e2694f310d638e31b475f29d0d214711dd5
2020-11-06 14:55:06 +00:00
Victor Chang
1925c89f8f Move WallTime out of ZoneInfoData
Bug: 139480281
Test: m droid
Change-Id: I4a81bb45e874480c7d1dd5f7736b529344d8d9fa
2020-11-06 11:36:13 +00:00
Mathew Inwood
5d123b6775 Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
2020-11-04 09:45:53 +00:00
Kohsuke Yatoh
5a6e2cf4ce Fix typo in documentation.
There's no such a thing as SpannedStringBuilder.

Change-Id: I41e1f257bb21807e4fc4943798887519ed5b40a9
2020-10-22 18:44:03 +00:00
Victor Chang
02d0c76bc6 Allow the skeleton of "jmma" in DateFormat.getBestDateTimePattern()
'a' and 'j' specify the intent to use 12-hour format,
and the locale default 12-hour format, and they shouldn't be used
in the same skeleton, because they contradict to each other.

A skeleton, e.g. "jmma", is mapped into "ahmma" internally
by #mapSkeletonMetacharacters, and thus the internal skeleton
has duplicated fields "a".

This is a regression when we moved the implementation of
android.text.format.DateFormat#getBestPattern() from
udatpg_getBestPattern in ICU4C to ICU4j DateTimePatternGenerator
in the CL https://r.android.com/1355735.
The expected pattern generated from skeleton of "jmma" is
"h:mm a".

Bug: 170233598
Test: DateFormatTest
Change-Id: I13929f4b5bc66aaa90e0cef666cf52d7c32122ac
2020-10-14 14:10:01 +01:00
Jeff Sharkey
a8cec413b6 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I245b8d9cac722da76ea67983738a3cbb9deb68df
2020-09-14 10:00:07 -06:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Clara Bayarri
0ac2e4ac31 Remove clarabayarri from text OWNERS
Change-Id: Ic67b5937d150096fddfe839d3406b29ba4bcb3a7
2020-08-21 17:07:57 +00:00
vichang
f7b2126b75 Merge "Update language in android.text.format to comply with Android’s inclusive language guidance" 2020-07-28 15:08:47 +00:00
Victor Chang
304910489a Update language in android.text.format to comply with Android’s inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: m droid
Change-Id: I643275c1ea39fa1a5fef7283076827b93dffcab1
2020-07-27 15:44:28 +01:00
Treehugger Robot
dce2f1c04b Merge "Update language to comply with Android’s inclusive language guidance" 2020-07-23 17:56:04 +00:00
Seigo Nonaka
f47561320f Update language to comply with Android’s inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: atest TextViewTest
Change-Id: I83f253f6edfb2724972793b3495835540b7b52e4
2020-07-22 22:54:14 -07:00
Victor Chang
bbe4493efb Add vichang into OWNER of android.text.format
Most android.text.format classes are wrappers of ICU4J or libcore.

Test: n/a
Change-Id: I3269efece738cfc7344d1823f7a79677f6cb93fc
2020-07-20 21:17:48 +01: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
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
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
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
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
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
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
Neil Fuller
f14b18e153 Rename ZoneInfoDB -> ZoneInfoDb
Rename ZoneInfoDB -> ZoneInfoDb to conform with coding standards.

Bug: 148086409
Test: treehugger
Change-Id: I2a5eca6bd013d3ca2ba93aabf36745f8873fc6fb
2020-01-28 13:49:48 +00:00
Michael Wallstedt
b73f706c56 Merge "Avoid ambiguous overloads in SpannableStringInternal." 2020-01-10 03:54:29 +00:00