Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 92ff7c75 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Reset draw state after notifying invisible to activity window

This moves the concept of I69f893a19d6426710bb0b8b0e18f3d2664cb6412
to a more suitable place. Instead of resetting draw state when the
app becomes visible, it is more general when setting app window to
be invisible.

There are 2 cases that could benefit from this:
1. The computation ActivityRecord#updateReportedVisibilityLocked
depends on w.isDrawn(). So ActivityRecord#isReportedDrawn() won't
get stale draw state.

2. ActivityRecord#addStartingWindow checks w.isDrawn() to skip
adding starting window. So it can avoid missing starting window
when launching app again in a short time, e.g. return to home
and click the same app immediately.

Bug: 373023636
Test: atest ActivityRecordTests#testSetVisibility_visibleToInvisible
Flag: com.android.window.flags.reset_draw_state_on_client_invisible

Change-Id: I91ffbd5ce4d014feb667383fda404df23759be89
parent 8ac5a154
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment