summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2023-11-21 18:15:46 +0000
committer Riddle Hsu <riddlehsu@google.com> 2023-12-01 12:47:54 +0000
commit450cb0f9e4f1efa98578028910d1494cf2317935 (patch)
tree2b06401b54b20b6ac65b248892571052fd9abe12 /libs/androidfw/StringPool.cpp
parentf56282d31d48e1c1bb797cddc636b38fdecf8195 (diff)
Update surface visibility state when forcing visible
Since surface visibility recovery always applies for visible request even for sleeping case, when finishing an activity while sleeping, the next activity will enter onVisibleWithoutCollectingTransition because there won't be a transition for invisible finishing activity. And then because the device is sleeping, the next activity will be stopped and invisible directly right after resuming. But its surface visibility is only forced to be visible. Then after the device is awake and the "invisible-visible" activity doesn't have visibility change, home will be untouchable because the surface layer of home task is always at bottom, which is under the ActivityRecordInputSink of the problematic activity. The surface hierarchy and visibility will be: [Top]Task T (visible) > Activity X (visible) > Window (invisible) > ActivityRecordInputSink (follow parent, so visible) [Bottom]Task Home (visible) > Activity (visible) > Window (visible) Even if X is stopped and mVisible/mVisibleRequested are false. So this change updates mLastSurfaceShowing when forcing visible. Then when executing ActivityRecord/Task#prepareSurface, it can follow the current state of hierarchy to refresh the visibility. Also narrow down the scope of surface visibility recovery while display is sleeping, which is for show-when-locked case. Fix: 311221846 Fix: 311379188 Fix: 309908645 Test: atest ActivityRecordTests# \ testFinishActivityIfPossible_nonVisibleNoAppTransition Test: Launch app A. Launch app B. Turn off screen. B calls finish. Launch app C (so A doesn't have visibility change later). Unlock device. Press home key. Home can still scroll. (App A,B,C have different uids so InputSink will block touch) Merged-In: I1d6c2e5a0dad831a9a7043d390037ca15a8b14bd Change-Id: I1d6c2e5a0dad831a9a7043d390037ca15a8b14bd (cherry picked from commit 1c18c583b6b057ed72cd41b30a7a644f3047fa06)
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions