Merge "Remove unnecessary null checking on ViewRootImpl#mWindowAttribute"
This commit is contained in:
committed by
Android (Google) Code Review
commit
29c1e03816
@@ -3092,8 +3092,7 @@ public final class ViewRootImpl implements ViewParent,
|
||||
|
||||
if (changedVisibility || regainedFocus) {
|
||||
// Toasts are presented as notifications - don't present them as windows as well
|
||||
boolean isToast = (mWindowAttributes == null) ? false
|
||||
: (mWindowAttributes.type == TYPE_TOAST);
|
||||
boolean isToast = mWindowAttributes.type == TYPE_TOAST;
|
||||
if (!isToast) {
|
||||
host.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
|
||||
}
|
||||
@@ -3258,8 +3257,7 @@ public final class ViewRootImpl implements ViewParent,
|
||||
if (mAttachInfo.mThreadedRenderer != null && mSurface.isValid()) {
|
||||
mFullRedrawNeeded = true;
|
||||
try {
|
||||
final WindowManager.LayoutParams lp = mWindowAttributes;
|
||||
final Rect surfaceInsets = lp != null ? lp.surfaceInsets : null;
|
||||
final Rect surfaceInsets = mWindowAttributes.surfaceInsets;
|
||||
mAttachInfo.mThreadedRenderer.initializeIfNeeded(
|
||||
mWidth, mHeight, mAttachInfo, mSurface, surfaceInsets);
|
||||
} catch (OutOfResourcesException e) {
|
||||
|
||||
Reference in New Issue
Block a user