Fix flicker when swiching resolution change
After the "Local Layout"[1] is enabled, the client can compute its layout on its own. If we update cutout in the Display callback(server side), it would have a timing issue that we draw the cutout(latest from server) in the old layout(not being updated yet in client) which would cause flicker. We should only update cutout in client side callback like configuration change to make sure it syncs with the current layout attributes in client side. For rounded corner part, we don't need to reload drawable everytime the config is changed. Only size update is needed. [1]:If9488ffc84dc5e2af106acfae425a854fb7407a2 Bug: 228284551 Bug: 244693677 Test: 1. Go Settings-> Display-> Screen resolution 2. Switch between FHD <-> QHD and no flickering Test: atest ScreenDecorationsTest RoundedCornerResDelegateTest Change-Id: Idd45af5aa2b9419eb91994eb2071e5be616204b7
Loading
Please register or sign in to comment