summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/view/translation/TranslationRequestValue.java23
1 files changed, 9 insertions, 14 deletions
diff --git a/core/java/android/view/translation/TranslationRequestValue.java b/core/java/android/view/translation/TranslationRequestValue.java
index 0619618d8844..5178cb1e4f1f 100644
--- a/core/java/android/view/translation/TranslationRequestValue.java
+++ b/core/java/android/view/translation/TranslationRequestValue.java
@@ -46,22 +46,17 @@ public final class TranslationRequestValue implements Parcelable {
}
/**
- * @return the text value as a {@link CharSequence}.
- *
- * @throws IllegalStateException if the format of this {@link TranslationRequestValue} is not a
- * text value.
+ * @return the text value as a {@link CharSequence} or {@code null} if the value is not of type
+ * text.
*/
- @NonNull
+ @Nullable
public CharSequence getText() {
- if (mText == null) {
- throw new IllegalStateException("Value is not of type text");
- }
return mText;
}
- // Code below generated by codegen v1.0.22.
+ // Code below generated by codegen v1.0.23.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -111,7 +106,7 @@ public final class TranslationRequestValue implements Parcelable {
TranslationRequestValue that = (TranslationRequestValue) o;
//noinspection PointlessBooleanExpression
return true
- && java.util.Objects.equals(mText, that.mText);
+ && Objects.equals(mText, that.mText);
}
@Override
@@ -121,7 +116,7 @@ public final class TranslationRequestValue implements Parcelable {
// int fieldNameHashCode() { ... }
int _hash = 1;
- _hash = 31 * _hash + java.util.Objects.hashCode(mText);
+ _hash = 31 * _hash + Objects.hashCode(mText);
return _hash;
}
@@ -171,10 +166,10 @@ public final class TranslationRequestValue implements Parcelable {
};
@DataClass.Generated(
- time = 1613687761635L,
- codegenVersion = "1.0.22",
+ time = 1620259864154L,
+ codegenVersion = "1.0.23",
sourceFile = "frameworks/base/core/java/android/view/translation/TranslationRequestValue.java",
- inputSignatures = "private final @android.annotation.Nullable java.lang.CharSequence mText\npublic static @android.annotation.NonNull android.view.translation.TranslationRequestValue forText(java.lang.CharSequence)\npublic @android.annotation.NonNull java.lang.CharSequence getText()\nclass TranslationRequestValue extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genHiddenConstructor=true, genToString=true, genEqualsHashCode=true)")
+ inputSignatures = "private final @android.annotation.Nullable java.lang.CharSequence mText\npublic static @android.annotation.NonNull android.view.translation.TranslationRequestValue forText(java.lang.CharSequence)\npublic @android.annotation.Nullable java.lang.CharSequence getText()\nclass TranslationRequestValue extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genHiddenConstructor=true, genToString=true, genEqualsHashCode=true)")
@Deprecated
private void __metadata() {}