Add @UnsupportedAppUsage annotations
For packages:
android.text.util
android.text.style
android.text.method
android.text.format
android.text
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: I9afbd4ca8826c37cb70db43252e39b9a674e5ae0
diff --git a/core/java/android/text/Layout.java b/core/java/android/text/Layout.java
index c6c1e8a..98d6e95 100644
--- a/core/java/android/text/Layout.java
+++ b/core/java/android/text/Layout.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.IntRange;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
@@ -411,6 +412,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void drawText(Canvas canvas, int firstLine, int lastLine) {
int previousLineBottom = getLineTop(firstLine);
int previousLineEnd = getLineStart(firstLine);
@@ -578,6 +580,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void drawBackground(Canvas canvas, Path highlight, Paint highlightPaint,
int cursorOffsetVertical, int firstLine, int lastLine) {
// First, draw LineBackgroundSpans.
@@ -658,6 +661,7 @@
* @return The range of lines that need to be drawn, possibly empty.
* @hide
*/
+ @UnsupportedAppUsage
public long getLineRangeForDraw(Canvas canvas) {
int dtop, dbottom;
@@ -928,6 +932,7 @@
* @return true if at a level boundary
* @hide
*/
+ @UnsupportedAppUsage
public boolean isLevelBoundary(int offset) {
int line = getLineForOffset(offset);
Directions dirs = getLineDirections(line);
@@ -1134,6 +1139,7 @@
* optionally clamp it so that it doesn't exceed the width of the layout.
* @hide
*/
+ @UnsupportedAppUsage
public float getPrimaryHorizontal(int offset, boolean clamped) {
boolean trailing = primaryIsTrailingPrevious(offset);
return getHorizontal(offset, trailing, clamped);
@@ -1153,6 +1159,7 @@
* optionally clamp it so that it doesn't exceed the width of the layout.
* @hide
*/
+ @UnsupportedAppUsage
public float getSecondaryHorizontal(int offset, boolean clamped) {
boolean trailing = primaryIsTrailingPrevious(offset);
return getHorizontal(offset, !trailing, clamped);
@@ -1783,6 +1790,7 @@
* only robust for left-aligned displays.
* @hide
*/
+ @UnsupportedAppUsage
public boolean shouldClampCursor(int line) {
// Only clamp cursor position in left-aligned displays.
switch (getParagraphAlignment(line)) {
@@ -2435,6 +2443,7 @@
}
private CharSequence mText;
+ @UnsupportedAppUsage
private TextPaint mPaint;
private TextPaint mWorkPaint = new TextPaint();
private int mWidth;
@@ -2460,6 +2469,7 @@
/* package */ static final int DIR_REQUEST_LTR = 1;
/* package */ static final int DIR_REQUEST_RTL = -1;
+ @UnsupportedAppUsage
/* package */ static final int DIR_REQUEST_DEFAULT_LTR = 2;
/* package */ static final int DIR_REQUEST_DEFAULT_RTL = -2;
@@ -2473,8 +2483,10 @@
ALIGN_OPPOSITE,
ALIGN_CENTER,
/** @hide */
+ @UnsupportedAppUsage
ALIGN_LEFT,
/** @hide */
+ @UnsupportedAppUsage
ALIGN_RIGHT,
}
@@ -2482,11 +2494,13 @@
/** @hide */
@VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE)
+ @UnsupportedAppUsage
public static final Directions DIRS_ALL_LEFT_TO_RIGHT =
new Directions(new int[] { 0, RUN_LENGTH_MASK });
/** @hide */
@VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE)
+ @UnsupportedAppUsage
public static final Directions DIRS_ALL_RIGHT_TO_LEFT =
new Directions(new int[] { 0, RUN_LENGTH_MASK | RUN_RTL_FLAG });