summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvichang <vichang@google.com>2021-05-10 10:49:51 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-05-10 10:49:51 +0000
commit11efbe4561f40f9f776d5a694a8964157359fc9c (patch)
tree086b00f855f385226022d4945112942404cbd18e
parenta52707c51160f2b1564406ba333d0a667fcccf99 (diff)
parent3cb73c4aad9b5b7e3b42a1cd9c058e70bcd0851e (diff)
downloadicu-11efbe4561f40f9f776d5a694a8964157359fc9c.tar.gz
Merge "Rename the return type of ExtendedTimeZoneNames.matchName method - part 2" am: 3cb73c4aad
Original change: https://android-review.googlesource.com/c/platform/external/icu/+/1697677 Change-Id: I2a1b5c869647e9c62ef4f07d98426f1f37eb609d
-rw-r--r--android_icu4j/api/intra/current.txt1
-rw-r--r--android_icu4j/libcore_bridge/src/java/com/android/icu/text/ExtendedTimeZoneNames.java28
2 files changed, 0 insertions, 29 deletions
diff --git a/android_icu4j/api/intra/current.txt b/android_icu4j/api/intra/current.txt
index 8426b9cc8..cdba19f4d 100644
--- a/android_icu4j/api/intra/current.txt
+++ b/android_icu4j/api/intra/current.txt
@@ -74,7 +74,6 @@ package com.android.icu.text {
method @NonNull public static com.android.icu.text.ExtendedTimeZoneNames getInstance(@NonNull android.icu.util.ULocale);
method @NonNull public android.icu.text.TimeZoneNames getTimeZoneNames();
method @Nullable public com.android.icu.text.ExtendedTimeZoneNames.Match matchName(@NonNull CharSequence, int, @NonNull String);
- method @Nullable public com.android.icu.text.ExtendedTimeZoneNames.Match matchNameToBeRenamed(@NonNull CharSequence, int, @NonNull String);
}
public static final class ExtendedTimeZoneNames.Match {
diff --git a/android_icu4j/libcore_bridge/src/java/com/android/icu/text/ExtendedTimeZoneNames.java b/android_icu4j/libcore_bridge/src/java/com/android/icu/text/ExtendedTimeZoneNames.java
index 46ac47722..2afbd3330 100644
--- a/android_icu4j/libcore_bridge/src/java/com/android/icu/text/ExtendedTimeZoneNames.java
+++ b/android_icu4j/libcore_bridge/src/java/com/android/icu/text/ExtendedTimeZoneNames.java
@@ -152,34 +152,6 @@ public class ExtendedTimeZoneNames {
* @hide
*/
@IntraCoreApi
- public @Nullable Match matchNameToBeRenamed(@NonNull CharSequence text, int start,
- @NonNull String currentTzId) {
- return matchName(text, start, currentTzId);
- }
-
- /**
- * Returns {@link Match} if a time zone name in ICU can be matched against the input
- * CharSequence {@code s}.
- * The best match is found by the following principles:
- * <ul>
- * <li>Length of the matched name. Longest name matched to the given {@code s} has the
- * highest priority.</li>
- * <li>The current time zone and meta zones possible in the current country have higher
- * priority than other zones.</li>
- * <li>If only meta zones are matched, the country/region in the locale is used to select
- * a reference time zone. For example, if the name is "Pacific Standard Time" and the country
- * is US, America/Los_Angeles is returned.</li>
- * </ul>
- *
- * @param text input string to be matched against time zone names in ICU
- * @param start the begin index in the CharSequence {@code s}
- * @param currentTzId the time zone ID prioritized to be matched if multiple time zone IDs can
- * be matched and this is one of the matched IDs.
- * @return null if no match is found
- *
- * @hide
- */
- @IntraCoreApi
public @Nullable Match matchName(@NonNull CharSequence text, int start,
@NonNull String currentTzId) {
currentTzId = TimeZone.getCanonicalID(currentTzId);