Loading core/java/android/text/TextUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -738,7 +738,7 @@ public class TextUtils { /** @hide */ public static final int ACCESSIBILITY_REPLACEMENT_SPAN = 29; /** @hide */ public static final int LAST_SPAN = LINE_HEIGHT_SPAN; public static final int LAST_SPAN = ACCESSIBILITY_REPLACEMENT_SPAN; /** * Flatten a CharSequence and whatever styles can be copied across processes Loading core/java/android/text/style/AccessibilityReplacementSpan.java +13 −8 Original line number Diff line number Diff line Loading @@ -22,30 +22,35 @@ import android.os.Parcel; import android.os.Parcelable; import android.text.ParcelableSpan; import android.text.TextUtils; import android.view.accessibility.AccessibilityNodeInfo; /** * This class serves as a parcelable placeholder for the ReplacementSpans. * This class serves as a parcelable placeholder for the {@link ReplacementSpan}. * * This span contains content description of original span to let Accessibility service to do the * substitution for it. * It is used to replace ReplacementSpans in {@link AccessibilityNodeInfo#setText(CharSequence)}. * * @hide */ public class AccessibilityReplacementSpan extends ReplacementSpan implements ParcelableSpan { // The content description of the span this one replaces private CharSequence mContentDescription; /** * Sets the content description to the parent class. * * @param contentDescription The content description of the span this one replaces */ public AccessibilityReplacementSpan(CharSequence contentDescription) { this.setContentDescription(contentDescription); mContentDescription = contentDescription; } /** * Sets the content description to the parent class. * * @param p The parcel to de-serialize from */ public AccessibilityReplacementSpan(Parcel p) { mContentDescription = p.readCharSequence(); final CharSequence contentDescription = p.readCharSequence(); this.setContentDescription(contentDescription); } @Override Loading @@ -70,7 +75,7 @@ public class AccessibilityReplacementSpan extends ReplacementSpan @Override public void writeToParcelInternal(Parcel dest, int flags) { dest.writeCharSequence(mContentDescription); dest.writeCharSequence(this.getContentDescription()); } @Override Loading Loading
core/java/android/text/TextUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -738,7 +738,7 @@ public class TextUtils { /** @hide */ public static final int ACCESSIBILITY_REPLACEMENT_SPAN = 29; /** @hide */ public static final int LAST_SPAN = LINE_HEIGHT_SPAN; public static final int LAST_SPAN = ACCESSIBILITY_REPLACEMENT_SPAN; /** * Flatten a CharSequence and whatever styles can be copied across processes Loading
core/java/android/text/style/AccessibilityReplacementSpan.java +13 −8 Original line number Diff line number Diff line Loading @@ -22,30 +22,35 @@ import android.os.Parcel; import android.os.Parcelable; import android.text.ParcelableSpan; import android.text.TextUtils; import android.view.accessibility.AccessibilityNodeInfo; /** * This class serves as a parcelable placeholder for the ReplacementSpans. * This class serves as a parcelable placeholder for the {@link ReplacementSpan}. * * This span contains content description of original span to let Accessibility service to do the * substitution for it. * It is used to replace ReplacementSpans in {@link AccessibilityNodeInfo#setText(CharSequence)}. * * @hide */ public class AccessibilityReplacementSpan extends ReplacementSpan implements ParcelableSpan { // The content description of the span this one replaces private CharSequence mContentDescription; /** * Sets the content description to the parent class. * * @param contentDescription The content description of the span this one replaces */ public AccessibilityReplacementSpan(CharSequence contentDescription) { this.setContentDescription(contentDescription); mContentDescription = contentDescription; } /** * Sets the content description to the parent class. * * @param p The parcel to de-serialize from */ public AccessibilityReplacementSpan(Parcel p) { mContentDescription = p.readCharSequence(); final CharSequence contentDescription = p.readCharSequence(); this.setContentDescription(contentDescription); } @Override Loading @@ -70,7 +75,7 @@ public class AccessibilityReplacementSpan extends ReplacementSpan @Override public void writeToParcelInternal(Parcel dest, int flags) { dest.writeCharSequence(mContentDescription); dest.writeCharSequence(this.getContentDescription()); } @Override Loading