diff options
| author | 2023-12-13 18:15:38 +0000 | |
|---|---|---|
| committer | 2024-02-01 20:38:57 +0800 | |
| commit | bad132df69d931cdc8fb9eda45367f8fedbc0ec9 (patch) | |
| tree | 0a0305651bae98c8296df6435b92cb82c159accc /libs/hwui/FrameInfoVisualizer.cpp | |
| parent | a9d2c1f17c2c128231df3d0aa771b55f697d3f61 (diff) | |
Adjust process state for visible overlay window
This avoids process with system permission from being frozen by
CachedAppOptimizer if it only shows an overlay window without an
active application component (e.g. a running service).
Otherwise the window could meet ANR because its process is unable
to response for input events.
Assume:
A=add mAppOverlaySurfaces
B=add mAlertWindowSurfaces
C=log metrics
D=show notification
E=setHasOverlayUi (adjust process state)
app-overlay=TYPE_APPLICATION_OVERLAY
other-overlay=TYPE_[*PHONE|SYSTEM_ALERT|SYSTEM_ERROR|SYSTEM_OVERLAY]
Before:
- Window owner has system permission
add other-overlay: do nothing
add app-overlay: A+C+E
- Window owner doesn't have system permission
add other-overlay: B+C+D
add app-overlay: A+B+C+D+E
After:
- Window owner has system permission
add other-overlay: B+E
add app-overlay: B+C+E
- Window owner doesn't have system permission
add other-overlay: B+C+D+E
add app-overlay: B+C+D+E
The mAppOverlaySurfaces is removed because there is no need to
distinguish the overlay type for checking whether a process contains
an overlay window.
Bug: 290870920
Test: WindowManagerServiceTests#testTrackOverlayWindow
Change-Id: I7618d853ea6e7a7261a72b9f4883d9642d426450
Diffstat (limited to 'libs/hwui/FrameInfoVisualizer.cpp')
0 files changed, 0 insertions, 0 deletions