diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_10.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_10.xml
index a8d3de0b9a971..4a4b3b42522af 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_10.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_10.xml
@@ -35,7 +35,7 @@
android:layout_width="400dp"
android:layout_height="600dp"
android:text="@string/long_text"
- android:autoSizeText="uniform"
+ android:autoSizeTextType="uniform"
android:autoSizeMinTextSize="10px"
android:textSize="20px"
android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_100.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_100.xml
index d991862f7a09a..0b326e8cf233f 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_100.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_100.xml
@@ -19,7 +19,7 @@
android:layout_width="400dp"
android:layout_height="600dp"
android:text="@string/long_text"
- android:autoSizeText="uniform"
+ android:autoSizeTextType="uniform"
android:autoSizeMinTextSize="10px"
android:textSize="110px"
android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_1000.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_1000.xml
index 3b55b6c8b56d2..2f4239d816717 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_1000.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_1000.xml
@@ -19,7 +19,7 @@
android:layout_width="400dp"
android:layout_height="600dp"
android:text="@string/long_text"
- android:autoSizeText="uniform"
+ android:autoSizeTextType="uniform"
android:autoSizeMinTextSize="10px"
android:textSize="1010px"
android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_10000.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_10000.xml
index 64a25c27f4a5e..b6be10a1a42ca 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_10000.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_10000.xml
@@ -19,7 +19,7 @@
android:layout_width="400dp"
android:layout_height="600dp"
android:text="@string/long_text"
- android:autoSizeText="uniform"
+ android:autoSizeTextType="uniform"
android:autoSizeMinTextSize="10px"
android:textSize="10010px"
android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_100000.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_100000.xml
index 1f60783969064..aed339cc571c4 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_100000.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_100000.xml
@@ -19,7 +19,7 @@
android:layout_width="400dp"
android:layout_height="600dp"
android:text="@string/long_text"
- android:autoSizeText="uniform"
+ android:autoSizeTextType="uniform"
android:autoSizeMinTextSize="10px"
android:textSize="100010px"
android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_300.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_300.xml
index 54c7e71c9a9a6..62522bae6f397 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_300.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_300.xml
@@ -19,7 +19,7 @@
android:layout_width="400dp"
android:layout_height="600dp"
android:text="@string/long_text"
- android:autoSizeText="uniform"
+ android:autoSizeTextType="uniform"
android:autoSizeMinTextSize="10px"
android:textSize="310px"
android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_5.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_5.xml
index 525b2c854c7a1..f383fa4a94225 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_5.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_5.xml
@@ -35,7 +35,7 @@
android:layout_width="400dp"
android:layout_height="600dp"
android:text="@string/long_text"
- android:autoSizeText="uniform"
+ android:autoSizeTextType="uniform"
android:autoSizeMinTextSize="10px"
android:textSize="15px"
android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_50.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_50.xml
index 470c4da1376e4..04dd6c2115c9b 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_50.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_50.xml
@@ -19,7 +19,7 @@
android:layout_width="400dp"
android:layout_height="600dp"
android:text="@string/long_text"
- android:autoSizeText="uniform"
+ android:autoSizeTextType="uniform"
android:autoSizeMinTextSize="10px"
android:textSize="60px"
android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/res/layout/test_autosize_textview_500.xml b/apct-tests/perftests/core/res/layout/test_autosize_textview_500.xml
index b8a6e0af49f0d..a8e2b385aac4b 100644
--- a/apct-tests/perftests/core/res/layout/test_autosize_textview_500.xml
+++ b/apct-tests/perftests/core/res/layout/test_autosize_textview_500.xml
@@ -19,7 +19,7 @@
android:layout_width="400dp"
android:layout_height="600dp"
android:text="@string/long_text"
- android:autoSizeText="uniform"
+ android:autoSizeTextType="uniform"
android:autoSizeMinTextSize="10px"
android:textSize="510px"
android:autoSizeStepGranularity="1px"/>
diff --git a/apct-tests/perftests/core/src/android/widget/TextViewAutoSizeLayoutPerfTest.java b/apct-tests/perftests/core/src/android/widget/TextViewAutoSizeLayoutPerfTest.java
index 6ee6f70db3ca9..c3101664d1ffd 100644
--- a/apct-tests/perftests/core/src/android/widget/TextViewAutoSizeLayoutPerfTest.java
+++ b/apct-tests/perftests/core/src/android/widget/TextViewAutoSizeLayoutPerfTest.java
@@ -89,7 +89,7 @@ public class TextViewAutoSizeLayoutPerfTest {
while (state.keepRunning()) {
TextView textView = new TextView(activity);
- // TextView#onMeasure() gets called, which triggers TextView#autoSizeText()
+ // TextView#onLayout() gets called, which triggers TextView#autoSizeText()
// which is the method we want to benchmark.
textView.requestLayout();
}
diff --git a/api/current.txt b/api/current.txt
index d53a4b8577ea1..af10b5b9bf8e4 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -305,7 +305,7 @@ package android {
field public static final int autoSizeMinTextSize = 16844088; // 0x1010538
field public static final int autoSizePresetSizes = 16844087; // 0x1010537
field public static final int autoSizeStepGranularity = 16844086; // 0x1010536
- field public static final int autoSizeText = 16844085; // 0x1010535
+ field public static final int autoSizeTextType = 16844085; // 0x1010535
field public static final int autoStart = 16843445; // 0x10102b5
field public static final deprecated int autoText = 16843114; // 0x101016a
field public static final int autoUrlDetect = 16843404; // 0x101028c
diff --git a/api/system-current.txt b/api/system-current.txt
index e5de7dcd2b6e4..527469420a12d 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -418,7 +418,7 @@ package android {
field public static final int autoSizeMinTextSize = 16844088; // 0x1010538
field public static final int autoSizePresetSizes = 16844087; // 0x1010537
field public static final int autoSizeStepGranularity = 16844086; // 0x1010536
- field public static final int autoSizeText = 16844085; // 0x1010535
+ field public static final int autoSizeTextType = 16844085; // 0x1010535
field public static final int autoStart = 16843445; // 0x10102b5
field public static final deprecated int autoText = 16843114; // 0x101016a
field public static final int autoUrlDetect = 16843404; // 0x101028c
@@ -25932,9 +25932,9 @@ package android.media.tv {
method public static final boolean isProgramUri(android.net.Uri);
field public static final java.lang.String AUTHORITY = "android.media.tv";
field public static final java.lang.String EXTRA_COLUMN_NAME = "android.media.tv.extra.COLUMN_NAME";
- field public static final java.lang.String EXTRA_EXISTING_COLUMN_NAMES = "android.media.tv.extra.EXISTING_COLUMN_NAMES";
field public static final java.lang.String EXTRA_DATA_TYPE = "android.media.tv.extra.DATA_TYPE";
field public static final java.lang.String EXTRA_DEFAULT_VALUE = "android.media.tv.extra.DEFAULT_VALUE";
+ field public static final java.lang.String EXTRA_EXISTING_COLUMN_NAMES = "android.media.tv.extra.EXISTING_COLUMN_NAMES";
field public static final java.lang.String METHOD_ADD_COLUMN = "add_column";
field public static final java.lang.String METHOD_GET_COLUMNS = "get_columns";
}
diff --git a/api/test-current.txt b/api/test-current.txt
index cff6ffec6ae61..4312849574dfd 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -305,7 +305,7 @@ package android {
field public static final int autoSizeMinTextSize = 16844088; // 0x1010538
field public static final int autoSizePresetSizes = 16844087; // 0x1010537
field public static final int autoSizeStepGranularity = 16844086; // 0x1010536
- field public static final int autoSizeText = 16844085; // 0x1010535
+ field public static final int autoSizeTextType = 16844085; // 0x1010535
field public static final int autoStart = 16843445; // 0x10102b5
field public static final deprecated int autoText = 16843114; // 0x101016a
field public static final int autoUrlDetect = 16843404; // 0x101028c
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 9078e613cf6ba..adc6f725f42e1 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -266,7 +266,7 @@ import java.util.Locale;
* @attr ref android.R.styleable#TextView_fontFeatureSettings
* @attr ref android.R.styleable#TextView_breakStrategy
* @attr ref android.R.styleable#TextView_hyphenationFrequency
- * @attr ref android.R.styleable#TextView_autoSizeText
+ * @attr ref android.R.styleable#TextView_autoSizeTextType
* @attr ref android.R.styleable#TextView_autoSizeMinTextSize
* @attr ref android.R.styleable#TextView_autoSizeMaxTextSize
* @attr ref android.R.styleable#TextView_autoSizeStepGranularity
@@ -691,18 +691,24 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
*/
private int mDeviceProvisionedState = DEVICE_PROVISIONED_UNKNOWN;
- // The TextView does not auto-size text (default).
+ /**
+ * The TextView does not auto-size text (default).
+ */
public static final int AUTO_SIZE_TEXT_TYPE_NONE = 0;
- // The TextView performs uniform horizontal and vertical text size scaling to fit within the
- // container.
+
+ /**
+ * The TextView scales text size both horizontally and vertically to fit within the
+ * container.
+ */
public static final int AUTO_SIZE_TEXT_TYPE_UNIFORM = 1;
+
/** @hide */
@IntDef({AUTO_SIZE_TEXT_TYPE_NONE, AUTO_SIZE_TEXT_TYPE_UNIFORM})
@Retention(RetentionPolicy.SOURCE)
public @interface AutoSizeTextType {}
- // Default minimum size for auto-sizing text in scaled pixels. {@see #setAutoSizeMinTextSize}.
+ // Default minimum size for auto-sizing text in scaled pixels.
private static final int DEFAULT_AUTO_SIZE_MIN_TEXT_SIZE_IN_SP = 12;
- // Default maximum size for auto-sizing text in scaled pixels. {@see #setAutoSizeMaxTextSize}.
+ // Default maximum size for auto-sizing text in scaled pixels.
private static final int DEFAULT_AUTO_SIZE_MAX_TEXT_SIZE_IN_SP = 112;
// Default value for the step size in pixels.
private static final int DEFAULT_AUTO_SIZE_GRANULARITY_IN_PX = 1;
@@ -1308,7 +1314,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
mHyphenationFrequency = a.getInt(attr, Layout.HYPHENATION_FREQUENCY_NONE);
break;
- case com.android.internal.R.styleable.TextView_autoSizeText:
+ case com.android.internal.R.styleable.TextView_autoSizeTextType:
mAutoSizeTextType = a.getInt(attr, AUTO_SIZE_TEXT_TYPE_NONE);
break;
@@ -1660,7 +1666,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* {@link TextView#AUTO_SIZE_TEXT_TYPE_NONE} or
* {@link TextView#AUTO_SIZE_TEXT_TYPE_UNIFORM}
*
- * @attr ref android.R.styleable#TextView_autoSizeText
+ * @attr ref android.R.styleable#TextView_autoSizeTextType
*
* @see #getAutoSizeTextType()
*/
@@ -1709,7 +1715,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
*
* @throws IllegalArgumentException if any of the configuration params are invalid.
*
- * @attr ref android.R.styleable#TextView_autoSizeText
+ * @attr ref android.R.styleable#TextView_autoSizeTextType
* @attr ref android.R.styleable#TextView_autoSizeMinTextSize
* @attr ref android.R.styleable#TextView_autoSizeMaxTextSize
* @attr ref android.R.styleable#TextView_autoSizeStepGranularity
@@ -1753,7 +1759,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
*
* @throws IllegalArgumentException if all of the presetSizes are invalid.
*
- * @attr ref android.R.styleable#TextView_autoSizeText
+ * @attr ref android.R.styleable#TextView_autoSizeTextType
* @attr ref android.R.styleable#TextView_autoSizePresetSizes
*
* @see #setAutoSizeTextTypeWithDefaults(int)
@@ -1806,7 +1812,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* {@link TextView#AUTO_SIZE_TEXT_TYPE_NONE} or
* {@link TextView#AUTO_SIZE_TEXT_TYPE_UNIFORM}
*
- * @attr ref android.R.styleable#TextView_autoSizeText
+ * @attr ref android.R.styleable#TextView_autoSizeTextType
*
* @see #setAutoSizeTextTypeWithDefaults(int)
* @see #setAutoSizeTextTypeUniformWithConfiguration(int, int, int, int)
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index f55538f67dbc3..be77603980624 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -4721,18 +4721,19 @@
-
+
-
+
-
-
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index e5660b520c9ab..01737e73df93b 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2765,7 +2765,7 @@
-
+