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

Commit 191db8cd authored by Yinglei Wang's avatar Yinglei Wang Committed by Android (Google) Code Review
Browse files

Merge "Deprecate ANI#labelFor apis" into main

parents b4a15542 a5a93a24
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -55634,7 +55634,7 @@ package android.view.accessibility {
    method public android.os.Bundle getExtras();
    method public CharSequence getHintText();
    method public int getInputType();
    method public android.view.accessibility.AccessibilityNodeInfo getLabelFor();
    method @Deprecated @FlaggedApi("android.view.accessibility.deprecate_ani_label_for_apis") public android.view.accessibility.AccessibilityNodeInfo getLabelFor();
    method @Deprecated @FlaggedApi("android.view.accessibility.support_multiple_labeledby") public android.view.accessibility.AccessibilityNodeInfo getLabeledBy();
    method @FlaggedApi("android.view.accessibility.support_multiple_labeledby") @NonNull public java.util.List<android.view.accessibility.AccessibilityNodeInfo> getLabeledByList();
    method public int getLiveRegion();
@@ -55733,8 +55733,8 @@ package android.view.accessibility {
    method public void setHintText(CharSequence);
    method public void setImportantForAccessibility(boolean);
    method public void setInputType(int);
    method public void setLabelFor(android.view.View);
    method public void setLabelFor(android.view.View, int);
    method @Deprecated @FlaggedApi("android.view.accessibility.deprecate_ani_label_for_apis") public void setLabelFor(android.view.View);
    method @Deprecated @FlaggedApi("android.view.accessibility.deprecate_ani_label_for_apis") public void setLabelFor(android.view.View, int);
    method @Deprecated @FlaggedApi("android.view.accessibility.support_multiple_labeledby") public void setLabeledBy(android.view.View);
    method @Deprecated @FlaggedApi("android.view.accessibility.support_multiple_labeledby") public void setLabeledBy(android.view.View, int);
    method public void setLiveRegion(int);
+18 −0
Original line number Diff line number Diff line
@@ -3866,8 +3866,14 @@ public class AccessibilityNodeInfo implements Parcelable {
     * Sets the view for which the view represented by this info serves as a
     * label for accessibility purposes.
     *
     * @deprecated Use {@link #addLabeledBy(View)} on the labeled node instead,
     * since {@link #getLabeledByList()} and {@link #getLabeledBy()} on the
     * labeled node are not automatically populated when this method is used.
     *
     * @param labeled The view for which this info serves as a label.
     */
    @FlaggedApi(Flags.FLAG_DEPRECATE_ANI_LABEL_FOR_APIS)
    @Deprecated
    public void setLabelFor(View labeled) {
        setLabelFor(labeled, AccessibilityNodeProvider.HOST_VIEW_ID);
    }
@@ -3888,9 +3894,15 @@ public class AccessibilityNodeInfo implements Parcelable {
     *   This class is made immutable before being delivered to an AccessibilityService.
     * </p>
     *
     * @deprecated Use {@link #addLabeledBy(View)} on the labeled node instead,
     * since {@link #getLabeledByList()} and {@link #getLabeledBy()} on the
     * labeled node are not automatically populated when this method is used.
     *
     * @param root The root whose virtual descendant serves as a label.
     * @param virtualDescendantId The id of the virtual descendant.
     */
    @FlaggedApi(Flags.FLAG_DEPRECATE_ANI_LABEL_FOR_APIS)
    @Deprecated
    public void setLabelFor(View root, int virtualDescendantId) {
        enforceNotSealed();
        final int rootAccessibilityViewId = (root != null)
@@ -3902,8 +3914,14 @@ public class AccessibilityNodeInfo implements Parcelable {
     * Gets the node info for which the view represented by this info serves as
     * a label for accessibility purposes.
     *
     * @deprecated Use {@link #getLabeledByList()} on the labeled node instead,
     * since calling {@link #addLabeledBy(View)} or {@link #addLabeledBy(View, int)}
     * on the labeled node do not automatically provide that node from this method.
     *
     * @return The labeled info.
     */
    @FlaggedApi(Flags.FLAG_DEPRECATE_ANI_LABEL_FOR_APIS)
    @Deprecated
    public AccessibilityNodeInfo getLabelFor() {
        enforceSealed();
        return getNodeForAccessibilityId(mConnectionId, mWindowId, mLabelForId);
+7 −0
Original line number Diff line number Diff line
@@ -90,6 +90,13 @@ flag {
    bug: "376727542"
}

flag {
    namespace: "accessibility"
    name: "deprecate_ani_label_for_apis"
    description: "Controls the deprecation of AccessibilityNodeInfo labelFor apis"
    bug: "333783827"
}

flag {
    namespace: "accessibility"
    name: "fix_merged_content_change_event_v2"