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

Commit 3beed7b3 authored by Riddle Hsu's avatar Riddle Hsu
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
Merged-In: Ib2844dedebfa3ec9fc8333af3f66bb07cd4d3d7f
Change-Id: Ib2844dedebfa3ec9fc8333af3f66bb07cd4d3d7f
parent 0fc61ce2
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