Fix CTS regression in fitSystemWindows

Don't attempt to apply null insets from a call to fitSystemWindows.
Immediately return false since null insets cannot be applied.

Bug 15452706

Change-Id: I1ad4cc0288db36b3e9485481173e64b2140a0204
This commit is contained in:
Adam Powell
2014-06-13 10:50:32 -07:00
parent c5db4bfb10
commit 8a30b31a77

View File

@@ -6116,6 +6116,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
*/
protected boolean fitSystemWindows(Rect insets) {
if ((mPrivateFlags3 & PFLAG3_APPLYING_INSETS) == 0) {
if (insets == null) {
// Null insets by definition have already been consumed.
// This call cannot apply insets since there are none to apply,
// so return false.
return false;
}
// If we're not in the process of dispatching the newer apply insets call,
// that means we're not in the compatibility path. Dispatch into the newer
// apply insets path and take things from there.