diff options
| author | 2023-04-17 16:35:35 -0400 | |
|---|---|---|
| committer | 2023-04-24 11:19:19 -0400 | |
| commit | 7f235677796d44d1d795404379a314cc48b3eb28 (patch) | |
| tree | b71a807aa4b1e7aa314de57c127414bc5402f17a /libs/androidfw/FileStream.cpp | |
| parent | 923deb585cfbbc73207f309e0f3fa1b7e0412da5 (diff) | |
Delay clipboard entrance animation until image loaded
When an image is copied, we load the image in the background but
start the entrance animation immediately. If it takes non-negligible
time for the image to load, this effectively means we animate in a
"blank" preview, then instantly replace it with the real image once
it's loaded, which looks jarring.
Instead, hold the animation until the image is loaded, with a timeout
(currently 300ms). If we don't load the image within the timeout
period, fall back to showing the "copied" preview (same as we do
if we get an exception while loading the image).
It's now possible for us to be "up" while not actually showing any UI
(during that timeout period), so we also turn off tap-outside-to-dismiss
until the animation starts.
Bug: 277586289
Fix: 277586289
Test: atest
Change-Id: Ie6015f712c8993d234bc2bc657c9a81bf549e6e6
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions