Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04b2be42 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Deprecate android.text.AndroidCharacter"

parents 0b2a66c7 9559c20a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -38756,7 +38756,7 @@ package android.text {
    method public java.lang.CharSequence subSequence(int, int);
  }
  public class AndroidCharacter {
  public deprecated class AndroidCharacter {
    ctor public AndroidCharacter();
    method public static void getDirectionalities(char[], byte[], int);
    method public static int getEastAsianWidth(char);
+1 −1
Original line number Diff line number Diff line
@@ -41895,7 +41895,7 @@ package android.text {
    method public java.lang.CharSequence subSequence(int, int);
  }
  public class AndroidCharacter {
  public deprecated class AndroidCharacter {
    ctor public AndroidCharacter();
    method public static void getDirectionalities(char[], byte[], int);
    method public static int getEastAsianWidth(char);
+1 −1
Original line number Diff line number Diff line
@@ -38855,7 +38855,7 @@ package android.text {
    method public java.lang.CharSequence subSequence(int, int);
  }
  public class AndroidCharacter {
  public deprecated class AndroidCharacter {
    ctor public AndroidCharacter();
    method public static void getDirectionalities(char[], byte[], int);
    method public static int getEastAsianWidth(char);
+4 −2
Original line number Diff line number Diff line
@@ -17,9 +17,11 @@
package android.text;

/**
 * AndroidCharacter exposes some character properties that are not
 * easily accessed from java.lang.Character.
 * AndroidCharacter exposes some character properties that used to be not
 * easily accessed from java.lang.Character, but are now available in ICU.
 * @deprecated Use various methods from {@link android.icu.lang.UCharacter}, instead.
 */
@Deprecated
public class AndroidCharacter
{
    public static final int EAST_ASIAN_WIDTH_NEUTRAL = 0;
+3 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.annotation.Nullable;
import android.annotation.PluralsRes;
import android.content.Context;
import android.content.res.Resources;
import android.icu.lang.UCharacter;
import android.icu.util.ULocale;
import android.os.Parcel;
import android.os.Parcelable;
@@ -545,9 +546,10 @@ public class TextUtils {
        }

        public char charAt(int off) {
            return AndroidCharacter.getMirror(mSource.charAt(mEnd - 1 - off));
            return (char) UCharacter.getMirror(mSource.charAt(mEnd - 1 - off));
        }

        @SuppressWarnings("deprecation")
        public void getChars(int start, int end, char[] dest, int destoff) {
            TextUtils.getChars(mSource, start + mStart, end + mStart,
                               dest, destoff);