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

Skip to content
Commit ad7120e1 authored by Riddle Hsu's avatar Riddle Hsu Committed by Cherrypicker Worker
Browse files

Do not allow custom animation of untrusted Toast

Since target API level 30 (Android 11), regular text toast is shown
by SystemUI (See#CHANGE_TEXT_TOASTS_IN_THE_SYSTEM). While legacy
apps and deprecated custom view show the toast in its own processes,
so force the default animation style for these usages to avoid
unexpected animation duration.

Such when setForceHideNonSystemOverlayWindowIfNeeded is triggered,
the regular Toast displayed by SystemUI won't be affected (because
SystemUI has internal permission), and the untrusted Toast can be
hidden in a short time (config_longAnimTime=500ms) instead of a
customized duration.

Bug: 408215749
Flag: EXEMPT bugfix
Test: Show a Toast with modified
      WindowManager.LayoutParams#windowAnimations
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3beed7b34e54f2147aef9e9e5bbb413527b399fa)
Merged-In: Ib2844dedebfa3ec9fc8333af3f66bb07cd4d3d7f
Change-Id: Ib2844dedebfa3ec9fc8333af3f66bb07cd4d3d7f
parent 9bcef814
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment