Loading core/java/com/android/internal/policy/PhoneWindow.java +11 −6 Original line number Diff line number Diff line Loading @@ -1821,15 +1821,20 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } private ViewRootImpl getViewRootImpl() { if (mDecor != null) { ViewRootImpl viewRootImpl = mDecor.getViewRootImpl(); ViewRootImpl viewRootImpl = getViewRootImplOrNull(); if (viewRootImpl != null) { return viewRootImpl; } } throw new IllegalStateException("view not added"); } private ViewRootImpl getViewRootImplOrNull() { if (mDecor == null) { return null; } return mDecor.getViewRootImpl(); } /** * Request that key events come to this activity. Use this if your activity * has no views with focus, but the activity still wants a chance to process Loading Loading @@ -3900,7 +3905,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { @Override public void setDecorFitsSystemWindows(boolean decorFitsSystemWindows) { ViewRootImpl impl = getViewRootImpl(); ViewRootImpl impl = getViewRootImplOrNull(); OnContentApplyWindowInsetsListener listener = decorFitsSystemWindows ? createDefaultContentWindowInsetsListener() : null; Loading Loading
core/java/com/android/internal/policy/PhoneWindow.java +11 −6 Original line number Diff line number Diff line Loading @@ -1821,15 +1821,20 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } private ViewRootImpl getViewRootImpl() { if (mDecor != null) { ViewRootImpl viewRootImpl = mDecor.getViewRootImpl(); ViewRootImpl viewRootImpl = getViewRootImplOrNull(); if (viewRootImpl != null) { return viewRootImpl; } } throw new IllegalStateException("view not added"); } private ViewRootImpl getViewRootImplOrNull() { if (mDecor == null) { return null; } return mDecor.getViewRootImpl(); } /** * Request that key events come to this activity. Use this if your activity * has no views with focus, but the activity still wants a chance to process Loading Loading @@ -3900,7 +3905,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { @Override public void setDecorFitsSystemWindows(boolean decorFitsSystemWindows) { ViewRootImpl impl = getViewRootImpl(); ViewRootImpl impl = getViewRootImplOrNull(); OnContentApplyWindowInsetsListener listener = decorFitsSystemWindows ? createDefaultContentWindowInsetsListener() : null; Loading