Loading
Refine getSystemWindowInsets when compatIgnoreVisibility is true
Before this CL, WindowInsets#getSystemWindowInsets would only return the vales in mTypeMaxInsetsMap (except IME) if mCompatIgnoreVisibility is true. However, the caller might add insets to mTypeInsetsMap via WindowInsets#replaceSystemWindowInsets. So when mCompatIgnoreVisibility is true, anyone (including the framework) cannot get the insets added previously from getSystemWindowInsets. Before commit 68d2b2f4, mCompatIgnoreVisibility would be cleared unexpectedly by Builder. So this issue was not discovered. This CL returns the larger values between typeInsetsMap and typeMaxInsetsMap from getSystemWindowInsets when mCompatIgnoreVisibility is true. Fix: 428536047 Bug: 429707181 Flag: EXEMPT bug fix Test: atest WindowInsetsTest Change-Id: Ie965457279b3e5dd78c73c6995e678654894094a