diff options
| author | TYM Tsai <tymtsai@google.com> | 2020-04-01 02:26:58 +0800 |
|---|---|---|
| committer | TYM Tsai <tymtsai@google.com> | 2020-04-22 14:41:07 +0800 |
| commit | 850c8129e650d1bd27102ad5378665e8c7ce39be (patch) | |
| tree | 13d8ccf74bde40545c2843c5e880a3763b73edc0 /core/java/android/widget/inline | |
| parent | f21e3a96d32d502324b23a9d812c0bd3a2d4467b (diff) | |
Filter the content of the Bundles used as extras and styling APIs
Adds filter to prevent passing binder objects in the extras and styling
APIs for inline suggestions. Avoids these to be used to send over remote
objects for Autofill provider and IME to communicate through private APIs
bypassing the OS.
Bug: 152316540
Test: atest CtsAutoFillServiceTestCases
Test: atest InlineSuggestionsRequestTest
Change-Id: I00940a845ed0e2546cbe09fa36e2439869c2f783
Diffstat (limited to 'core/java/android/widget/inline')
| -rw-r--r-- | core/java/android/widget/inline/InlinePresentationSpec.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/java/android/widget/inline/InlinePresentationSpec.java b/core/java/android/widget/inline/InlinePresentationSpec.java index 5635857154de..9f966d84eb34 100644 --- a/core/java/android/widget/inline/InlinePresentationSpec.java +++ b/core/java/android/widget/inline/InlinePresentationSpec.java @@ -57,6 +57,14 @@ public final class InlinePresentationSpec implements Parcelable { return InlinePresentationStyleUtils.bundleEquals(mStyle, style); } + /** + * Removes the remote objects from the {@code mStyle}. + * @hide + */ + public void filterContentTypes() { + InlinePresentationStyleUtils.filterContentTypes(mStyle); + } + /** @hide */ @DataClass.Suppress({"setMaxSize", "setMinSize"}) abstract static class BaseBuilder { @@ -285,10 +293,10 @@ public final class InlinePresentationSpec implements Parcelable { } @DataClass.Generated( - time = 1585768046898L, + time = 1586935491105L, codegenVersion = "1.0.15", sourceFile = "frameworks/base/core/java/android/widget/inline/InlinePresentationSpec.java", - inputSignatures = "private final @android.annotation.NonNull android.util.Size mMinSize\nprivate final @android.annotation.NonNull android.util.Size mMaxSize\nprivate final @android.annotation.NonNull android.os.Bundle mStyle\nprivate static @android.annotation.NonNull android.os.Bundle defaultStyle()\nprivate boolean styleEquals(android.os.Bundle)\nclass InlinePresentationSpec extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genEqualsHashCode=true, genToString=true, genBuilder=true)\nclass BaseBuilder extends java.lang.Object implements []") + inputSignatures = "private final @android.annotation.NonNull android.util.Size mMinSize\nprivate final @android.annotation.NonNull android.util.Size mMaxSize\nprivate final @android.annotation.NonNull android.os.Bundle mStyle\nprivate static @android.annotation.NonNull android.os.Bundle defaultStyle()\nprivate boolean styleEquals(android.os.Bundle)\npublic void filterContentTypes()\nclass InlinePresentationSpec extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genEqualsHashCode=true, genToString=true, genBuilder=true)\nclass BaseBuilder extends java.lang.Object implements []") @Deprecated private void __metadata() {} |
