am eba8782a: Add NPE check to getSystemWindowInsets

* commit 'eba8782a1f8412a3510fc78a71b843ef6e89bdbb':
  Add NPE check to getSystemWindowInsets
This commit is contained in:
Justin Koh
2014-06-09 21:12:39 +00:00
committed by Android Git Automerger

View File

@@ -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;
}