diff --git a/api/current.txt b/api/current.txt index a3af2ba0f4278..d0b57d404dac1 100644 --- a/api/current.txt +++ b/api/current.txt @@ -745,6 +745,7 @@ package android { field public static final int immersive = 16843456; // 0x10102c0 field public static final int importantForAccessibility = 16843690; // 0x10103aa field public static final int importantForAutofill = 16844120; // 0x1010558 + field public static final int importantForContentCapture = 16844295; // 0x1010607 field public static final int inAnimation = 16843127; // 0x1010177 field public static final int includeFontPadding = 16843103; // 0x101015f field public static final int includeInGlobalSearch = 16843374; // 0x101026e @@ -50221,6 +50222,7 @@ package android.view { method @android.view.ViewDebug.CapturedViewProperty @IdRes public int getId(); method @android.view.ViewDebug.ExportedProperty(category="accessibility", mapping={@android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_ACCESSIBILITY_AUTO, to="auto"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_ACCESSIBILITY_YES, to="yes"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_ACCESSIBILITY_NO, to="no"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, to="noHideDescendants")}) public int getImportantForAccessibility(); method @android.view.ViewDebug.ExportedProperty(mapping={@android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_AUTOFILL_AUTO, to="auto"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_AUTOFILL_YES, to="yes"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_AUTOFILL_NO, to="no"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS, to="yesExcludeDescendants"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, to="noExcludeDescendants")}) public int getImportantForAutofill(); + method @android.view.ViewDebug.ExportedProperty(mapping={@android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_CONTENT_CAPTURE_AUTO, to="auto"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_CONTENT_CAPTURE_YES, to="yes"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_CONTENT_CAPTURE_NO, to="no"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS, to="yesExcludeDescendants"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS, to="noExcludeDescendants")}) public int getImportantForContentCapture(); method public boolean getKeepScreenOn(); method public android.view.KeyEvent.DispatcherState getKeyDispatcherState(); method @android.view.ViewDebug.ExportedProperty(category="accessibility") @IdRes public int getLabelFor(); @@ -50361,6 +50363,7 @@ package android.view { method @android.view.ViewDebug.ExportedProperty public boolean isHovered(); method public boolean isImportantForAccessibility(); method public final boolean isImportantForAutofill(); + method public final boolean isImportantForContentCapture(); method public boolean isInEditMode(); method public boolean isInLayout(); method @android.view.ViewDebug.ExportedProperty public boolean isInTouchMode(); @@ -50435,6 +50438,7 @@ package android.view { method @CallSuper public void onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent); method public void onProvideAutofillStructure(android.view.ViewStructure, int); method public void onProvideAutofillVirtualStructure(android.view.ViewStructure, int); + method public void onProvideContentCaptureStructure(@NonNull android.view.ViewStructure, int); method public void onProvideStructure(android.view.ViewStructure); method public void onProvideVirtualStructure(android.view.ViewStructure); method public android.view.PointerIcon onResolvePointerIcon(android.view.MotionEvent, int); @@ -50560,6 +50564,7 @@ package android.view { method public void setId(@IdRes int); method public void setImportantForAccessibility(int); method public void setImportantForAutofill(int); + method public void setImportantForContentCapture(int); method public void setKeepScreenOn(boolean); method public void setKeyboardNavigationCluster(boolean); method public void setLabelFor(@IdRes int); @@ -50738,6 +50743,11 @@ package android.view { field public static final int IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS = 8; // 0x8 field public static final int IMPORTANT_FOR_AUTOFILL_YES = 1; // 0x1 field public static final int IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS = 4; // 0x4 + field public static final int IMPORTANT_FOR_CONTENT_CAPTURE_AUTO = 0; // 0x0 + field public static final int IMPORTANT_FOR_CONTENT_CAPTURE_NO = 2; // 0x2 + field public static final int IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS = 8; // 0x8 + field public static final int IMPORTANT_FOR_CONTENT_CAPTURE_YES = 1; // 0x1 + field public static final int IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS = 4; // 0x4 field public static final int INVISIBLE = 4; // 0x4 field public static final int KEEP_SCREEN_ON = 67108864; // 0x4000000 field public static final int LAYER_TYPE_HARDWARE = 2; // 0x2 diff --git a/api/test-current.txt b/api/test-current.txt index 842024ca5ac1f..6bf0629b36624 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -3171,12 +3171,9 @@ package android.view { } @UiThread public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback android.view.KeyEvent.Callback { - method @android.view.ViewDebug.ExportedProperty(mapping={@android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_CONTENT_CAPTURE_AUTO, to="auto"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_CONTENT_CAPTURE_YES, to="yes"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_CONTENT_CAPTURE_NO, to="no"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS, to="yesExcludeDescendants"), @android.view.ViewDebug.IntToString(from=android.view.View.IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS, to="noExcludeDescendants")}) public int getImportantForContentCapture(); method public android.view.View getTooltipView(); method public static boolean isDefaultFocusHighlightEnabled(); method public boolean isDefaultFocusHighlightNeeded(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable); - method public final boolean isImportantForContentCapture(); - method public void onProvideContentCaptureStructure(@NonNull android.view.ViewStructure, int); method protected void resetResolvedDrawables(); method public void resetResolvedLayoutDirection(); method public void resetResolvedPadding(); @@ -3187,13 +3184,7 @@ package android.view { method public boolean restoreFocusNotInCluster(); method public void setAutofilled(boolean); method public final void setFocusedInCluster(); - method public void setImportantForContentCapture(int); method public void setIsRootNamespace(boolean); - field public static final int IMPORTANT_FOR_CONTENT_CAPTURE_AUTO = 0; // 0x0 - field public static final int IMPORTANT_FOR_CONTENT_CAPTURE_NO = 2; // 0x2 - field public static final int IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS = 8; // 0x8 - field public static final int IMPORTANT_FOR_CONTENT_CAPTURE_YES = 1; // 0x1 - field public static final int IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS = 4; // 0x4 } public class ViewConfiguration { diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 47601aaeaa622..c252e692090a6 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -1393,10 +1393,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * * @see #isImportantForContentCapture() * @see #setImportantForContentCapture(int) - * - * @hide */ - @TestApi public static final int IMPORTANT_FOR_CONTENT_CAPTURE_AUTO = 0x0; /** @@ -1404,10 +1401,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * * @see #isImportantForContentCapture() * @see #setImportantForContentCapture(int) - * - * @hide */ - @TestApi public static final int IMPORTANT_FOR_CONTENT_CAPTURE_YES = 0x1; /** @@ -1415,10 +1409,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * * @see #isImportantForContentCapture() * @see #setImportantForContentCapture(int) - * - * @hide */ - @TestApi public static final int IMPORTANT_FOR_CONTENT_CAPTURE_NO = 0x2; /** @@ -1426,10 +1417,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * * @see #isImportantForContentCapture() * @see #setImportantForContentCapture(int) - * - * @hide */ - @TestApi public static final int IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS = 0x4; /** @@ -1438,10 +1426,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * * @see #isImportantForContentCapture() * @see #setImportantForContentCapture(int) - * - * @hide */ - @TestApi public static final int IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS = 0x8; @@ -8602,10 +8587,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, *
If your view provides its own virtual hierarchy (for example, if it's a browser that draws * the HTML using {@link Canvas} or native libraries in a different render process), then the view * is also responsible to notify the session when the virtual elements appear and disappear - see - * {@code View#onProvideContentCaptureStructure(ViewStructure, int)} for more info. + * {@link View#onProvideContentCaptureStructure(ViewStructure, int)} for more info. */ @SystemService(Context.CONTENT_CAPTURE_MANAGER_SERVICE) public final class ContentCaptureManager { diff --git a/core/java/android/view/contentcapture/ContentCaptureSession.java b/core/java/android/view/contentcapture/ContentCaptureSession.java index 975d481ef8c2b..625fcda76563f 100644 --- a/core/java/android/view/contentcapture/ContentCaptureSession.java +++ b/core/java/android/view/contentcapture/ContentCaptureSession.java @@ -358,7 +358,7 @@ public abstract class ContentCaptureSession implements AutoCloseable { * *
Typically called "manually" by views that handle their own virtual view hierarchy, or
* automatically by the Android System for views that return {@code true} on
- * {@code View#onProvideContentCaptureStructure(ViewStructure, int)}.
+ * {@link View#onProvideContentCaptureStructure(ViewStructure, int)}.
*
* @param node node that has been added.
*/
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 9dc66d77ea44c..26dba45666fc0 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -2798,7 +2798,6 @@ public class WebView extends AbsoluteLayout
mProvider.getViewDelegate().onProvideAutofillVirtualStructure(structure, flags);
}
- /** @hide */
@Override
public void onProvideContentCaptureStructure(ViewStructure structure, int flags) {
mProvider.getViewDelegate().onProvideContentCaptureStructure(structure, flags);
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 812eea51e056e..041ba02999b4f 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -2496,11 +2496,8 @@