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) {
|
if (mTempRect == null) {
|
||||||
mTempRect = new Rect();
|
mTempRect = new Rect();
|
||||||
}
|
}
|
||||||
|
if (mSystemWindowInsets != null) {
|
||||||
mTempRect.set(mSystemWindowInsets);
|
mTempRect.set(mSystemWindowInsets);
|
||||||
|
} else {
|
||||||
|
// If there were no system window insets, this is just empty.
|
||||||
|
mTempRect.setEmpty();
|
||||||
|
}
|
||||||
return mTempRect;
|
return mTempRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user