summaryrefslogtreecommitdiff
path: root/telephony
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2023-12-11 18:32:19 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2023-12-11 18:32:19 +0000
commit102e6b907978e036d7ddcb2c8a7ed514834af761 (patch)
tree54732ee64399704d9fc466ab5422633358230f98 /telephony
parentaaf96093826348c6cbfb804eeec014d9da0bd569 (diff)
parent88c0ce8c843dfca888cd269d6fb392f6248e99dd (diff)
downloadbase-102e6b907978e036d7ddcb2c8a7ed514834af761.tar.gz
Merge "Update docs for PhoneNumberFormattingTextWatcher." into main
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java b/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java
index a004cc3a1642..25063606228c 100644
--- a/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java
+++ b/telephony/java/android/telephony/PhoneNumberFormattingTextWatcher.java
@@ -16,6 +16,7 @@
package android.telephony;
+import android.annotation.WorkerThread;
import android.compat.annotation.UnsupportedAppUsage;
import android.os.Build;
import android.text.Editable;
@@ -39,6 +40,9 @@ import java.util.Locale;
* </ul>
* <p>
* The formatting will be restarted once the text is cleared.
+ *
+ * @deprecated This is a thin wrapper on a `libphonenumber` `AsYouTypeFormatter`; it is recommended
+ * to use that instead.
*/
public class PhoneNumberFormattingTextWatcher implements TextWatcher {
@@ -69,6 +73,7 @@ public class PhoneNumberFormattingTextWatcher implements TextWatcher {
* @param countryCode the ISO 3166-1 two-letter country code that indicates the country/region
* where the phone number is being entered.
*/
+ @WorkerThread
public PhoneNumberFormattingTextWatcher(String countryCode) {
if (countryCode == null) throw new IllegalArgumentException();
mFormatter = PhoneNumberUtil.getInstance().getAsYouTypeFormatter(countryCode);