Add NPE check to getSystemWindowInsets
Bug: 15452706 Change-Id: Ica83593eadd0155e1370dba268a9f15ad0affa7d
This commit is contained in:
@ -87,7 +87,12 @@ public final class WindowInsets {
|
||||
if (mTempRect == null) {
|
||||
mTempRect = new Rect();
|
||||
}
|
||||
mTempRect.set(mSystemWindowInsets);
|
||||
if (mSystemWindowInsets != null) {
|
||||
mTempRect.set(mSystemWindowInsets);
|
||||
} else {
|
||||
// If there were no system window insets, this is just empty.
|
||||
mTempRect.setEmpty();
|
||||
}
|
||||
return mTempRect;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user