summaryrefslogtreecommitdiff
path: root/libs/input/PointerController.cpp
diff options
context:
space:
mode:
author Nicolo' Mazzucato <nicomazz@google.com> 2024-12-04 14:29:26 +0000
committer Nicolo' Mazzucato <nicomazz@google.com> 2024-12-06 17:17:19 +0000
commit3e3b4221d2d42076b0f6160c6d25029aa1ffd26b (patch)
tree0e99934e8dbf4f9df5b81ba9049954f7787b639c /libs/input/PointerController.cpp
parenta424fedc11467d49225b218f9d095507f6359cd7 (diff)
Enable non-activity windows to be re-parented between displays
This allow a window added using a WindowContext's WindowManager to be reparented to a different display without being removed and re-added, using "WindowContext#reparentToDisplayId" (hidden API). A call to "reparentToDisplayId" updates the context and its resources to match the destination display ID and characteristics. For this reason, it is necessary to inflate all the views that are moved with this API with a separate context from other views (e.g. creating one with applicationContext.createWindowContext(...)). This also prevents "onAttached" and "onDetached" callbacks from being invoked after the view is reparented. Only a configurationChange + onMovedToDisplay is expected to be received from the window's root view. The motivation of this change is that SysUI (especially flexiglass) is written assuming onAttached happens only once, and it would have taken a huge refactor to change this. Also, using this API results in a much faster shade movement (as all the sysui code that was triggering "onAttached", is not triggered anymore). Note that this API is used in SysUI in the child cl. Bug: 362719719 Bug: 381258683 Bug: 381075014 Test: WindowContextListenerControllerTests, WindowManagerServiceTests, WindowTokenTests Flag: com.android.window.flags.reparent_window_token_api Change-Id: Icd17761951c26786d3e8120fce677265acf9390a
Diffstat (limited to 'libs/input/PointerController.cpp')
0 files changed, 0 insertions, 0 deletions