summaryrefslogtreecommitdiff
path: root/libs/androidfw/FileStream.cpp
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2023-10-26 15:46:05 +0800
committer Riddle Hsu <riddlehsu@google.com> 2023-10-30 10:43:57 +0000
commit9fb47fbafce7ce638581e294bde483e80190ce9e (patch)
treebef9637d44cd3f91a70b7d6955b621446e9c514e /libs/androidfw/FileStream.cpp
parentc9d20f37276dbdedbe6579f2e0be02eece55996f (diff)
Avoid additional focus change when entering PiP from fullscreen
When entering PiP, the task will also be moved to top (from onRootTaskWindowingModeChanged), and because the activity is still fullscreen mode during animation, it will be detected as focusable, that may cause additional focus change. Also set defer-visibility-update if it is not called from a WCT, which can reduce additional ensureActivitiesVisible and resumeFocusedTasksTopActivities when setting the windowing mode of task (Task#setWindowingModeInSurfaceTransaction). That also avoid visibility and other states from being updated too early before a series of PiP operations are done. E.g. moveActivityToPinnedRootTask task.setWindowingMode(WINDOWING_MODE_PINNED) > ensureActivitiesVisible (can be omitted) > resumeFocusedTasksTopActivities (can be omitted) task.setBounds(bounds) task... ensureActivitiesVisible resumeFocusedTasksTopActivities Note that if isPip2ExperimentEnabled() is true, it means that moveActivityToPinnedRootTask is called from a WCT, and the WCT should already use setDeferRootVisibilityUpdate. So the logic of localVisibilityDeferred is the same as !isPip2ExperimentEnabled(). Bug: 307214895 Test: Swipe an immersive auto pip activity to home. The bar won't be flickering by changing focus from home->pip->home. Change-Id: I3cb601c4f4c63e2b22e0413764d2eef53387232d
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions