Merge "Adding nullability annotations on ViewNode/AssistStructure."
This commit is contained in:
committed by
Android (Google) Code Review
commit
648056c210
@@ -7216,18 +7216,18 @@ package android.app.assist {
|
||||
method @Nullable public android.view.autofill.AutofillValue getAutofillValue();
|
||||
method public android.app.assist.AssistStructure.ViewNode getChildAt(int);
|
||||
method public int getChildCount();
|
||||
method public String getClassName();
|
||||
method public CharSequence getContentDescription();
|
||||
method @Nullable public String getClassName();
|
||||
method @Nullable public CharSequence getContentDescription();
|
||||
method public float getElevation();
|
||||
method public android.os.Bundle getExtras();
|
||||
method @Nullable public android.os.Bundle getExtras();
|
||||
method public int getHeight();
|
||||
method public String getHint();
|
||||
method @Nullable public String getHint();
|
||||
method @Nullable public String getHintIdEntry();
|
||||
method @Nullable public android.view.ViewStructure.HtmlInfo getHtmlInfo();
|
||||
method public int getId();
|
||||
method public String getIdEntry();
|
||||
method public String getIdPackage();
|
||||
method public String getIdType();
|
||||
method @Nullable public String getIdEntry();
|
||||
method @Nullable public String getIdPackage();
|
||||
method @Nullable public String getIdType();
|
||||
method public int getImportantForAutofill();
|
||||
method public int getInputType();
|
||||
method public int getLeft();
|
||||
@@ -7237,12 +7237,12 @@ package android.app.assist {
|
||||
method public int getMinTextEms();
|
||||
method public int getScrollX();
|
||||
method public int getScrollY();
|
||||
method public CharSequence getText();
|
||||
method @Nullable public CharSequence getText();
|
||||
method public int getTextBackgroundColor();
|
||||
method public int getTextColor();
|
||||
method @Nullable public String getTextIdEntry();
|
||||
method public int[] getTextLineBaselines();
|
||||
method public int[] getTextLineCharOffsets();
|
||||
method @Nullable public int[] getTextLineBaselines();
|
||||
method @Nullable public int[] getTextLineCharOffsets();
|
||||
method public int getTextSelectionEnd();
|
||||
method public int getTextSelectionStart();
|
||||
method public float getTextSize();
|
||||
|
||||
@@ -1080,6 +1080,7 @@ public class AssistStructure implements Parcelable {
|
||||
* identifier. See {@link android.view.ViewStructure#setId ViewStructure.setId}
|
||||
* for more information.
|
||||
*/
|
||||
@Nullable
|
||||
public String getIdPackage() {
|
||||
return mIdPackage;
|
||||
}
|
||||
@@ -1089,6 +1090,7 @@ public class AssistStructure implements Parcelable {
|
||||
* identifier. See {@link android.view.ViewStructure#setId ViewStructure.setId}
|
||||
* for more information.
|
||||
*/
|
||||
@Nullable
|
||||
public String getIdType() {
|
||||
return mIdType;
|
||||
}
|
||||
@@ -1098,6 +1100,7 @@ public class AssistStructure implements Parcelable {
|
||||
* identifier. See {@link android.view.ViewStructure#setId ViewStructure.setId}
|
||||
* for more information.
|
||||
*/
|
||||
@Nullable
|
||||
public String getIdEntry() {
|
||||
return mIdEntry;
|
||||
}
|
||||
@@ -1391,6 +1394,7 @@ public class AssistStructure implements Parcelable {
|
||||
* For example, a button will report "android.widget.Button" meaning it behaves
|
||||
* like a {@link android.widget.Button}.
|
||||
*/
|
||||
@Nullable
|
||||
public String getClassName() {
|
||||
return mClassName;
|
||||
}
|
||||
@@ -1399,6 +1403,7 @@ public class AssistStructure implements Parcelable {
|
||||
* Returns any content description associated with the node, which semantically describes
|
||||
* its purpose for accessibility and other uses.
|
||||
*/
|
||||
@Nullable
|
||||
public CharSequence getContentDescription() {
|
||||
return mContentDescription;
|
||||
}
|
||||
@@ -1473,6 +1478,7 @@ public class AssistStructure implements Parcelable {
|
||||
* Returns any text associated with the node that is displayed to the user, or null
|
||||
* if there is none.
|
||||
*/
|
||||
@Nullable
|
||||
public CharSequence getText() {
|
||||
return mText != null ? mText.mText : null;
|
||||
}
|
||||
@@ -1560,6 +1566,7 @@ public class AssistStructure implements Parcelable {
|
||||
* <p>It's only relevant when the {@link AssistStructure} is used for assist purposes,
|
||||
* not for autofill purposes.
|
||||
*/
|
||||
@Nullable
|
||||
public int[] getTextLineCharOffsets() {
|
||||
return mText != null ? mText.mLineCharOffsets : null;
|
||||
}
|
||||
@@ -1573,6 +1580,7 @@ public class AssistStructure implements Parcelable {
|
||||
* <p>It's only relevant when the {@link AssistStructure} is used for assist purposes,
|
||||
* not for autofill purposes.
|
||||
*/
|
||||
@Nullable
|
||||
public int[] getTextLineBaselines() {
|
||||
return mText != null ? mText.mLineBaselines : null;
|
||||
}
|
||||
@@ -1592,6 +1600,7 @@ public class AssistStructure implements Parcelable {
|
||||
* Return additional hint text associated with the node; this is typically used with
|
||||
* a node that takes user input, describing to the user what the input means.
|
||||
*/
|
||||
@Nullable
|
||||
public String getHint() {
|
||||
return mText != null ? mText.mHint : null;
|
||||
}
|
||||
@@ -1610,6 +1619,7 @@ public class AssistStructure implements Parcelable {
|
||||
/**
|
||||
* Return a Bundle containing optional vendor-specific extension information.
|
||||
*/
|
||||
@Nullable
|
||||
public Bundle getExtras() {
|
||||
return mExtras;
|
||||
}
|
||||
|
||||
@@ -211,16 +211,19 @@ public final class ViewNode extends AssistStructure.ViewNode {
|
||||
return mParentAutofillId;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public AutofillId getAutofillId() {
|
||||
return mAutofillId;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public CharSequence getText() {
|
||||
return mText != null ? mText.mText : null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getClassName() {
|
||||
return mClassName;
|
||||
@@ -231,16 +234,19 @@ public final class ViewNode extends AssistStructure.ViewNode {
|
||||
return mId;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getIdPackage() {
|
||||
return mIdPackage;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getIdType() {
|
||||
return mIdType;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getIdEntry() {
|
||||
return mIdEntry;
|
||||
@@ -341,21 +347,25 @@ public final class ViewNode extends AssistStructure.ViewNode {
|
||||
return (mFlags & FLAGS_OPAQUE) != 0;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public CharSequence getContentDescription() {
|
||||
return mContentDescription;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Bundle getExtras() {
|
||||
return mExtras;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getHint() {
|
||||
return mText != null ? mText.mHint : null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getHintIdEntry() {
|
||||
return mHintIdEntry;
|
||||
@@ -391,11 +401,13 @@ public final class ViewNode extends AssistStructure.ViewNode {
|
||||
return mText != null ? mText.mTextStyle : 0;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public int[] getTextLineCharOffsets() {
|
||||
return mText != null ? mText.mLineCharOffsets : null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public int[] getTextLineBaselines() {
|
||||
return mText != null ? mText.mLineBaselines : null;
|
||||
@@ -426,6 +438,7 @@ public final class ViewNode extends AssistStructure.ViewNode {
|
||||
return mMaxLength;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getTextIdEntry() {
|
||||
return mTextIdEntry;
|
||||
@@ -451,6 +464,7 @@ public final class ViewNode extends AssistStructure.ViewNode {
|
||||
return mAutofillOptions;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public LocaleList getLocaleList() {
|
||||
return mLocaleList;
|
||||
|
||||
Reference in New Issue
Block a user