Loading core/java/android/view/ViewRootImpl.java +16 −5 Original line number Diff line number Diff line Loading @@ -1554,9 +1554,14 @@ public final class ViewRootImpl implements ViewParent, void handleAppVisibility(boolean visible) { if (mAppVisible != visible) { final boolean previousVisible = getHostVisibility() == View.VISIBLE; mAppVisible = visible; final boolean currentVisible = getHostVisibility() == View.VISIBLE; // Root view only cares about whether it is visible or not. if (previousVisible != currentVisible) { mAppVisibilityChanged = true; scheduleTraversals(); } if (!mAppVisible) { WindowManagerGlobal.trimForeground(); } Loading Loading @@ -1846,8 +1851,13 @@ public final class ViewRootImpl implements ViewParent, renderer.setStopped(mStopped); } if (!mStopped) { mNewSurfaceNeeded = true; // Unnecessary to traverse if the window is not yet visible. if (getHostVisibility() == View.VISIBLE) { // Make sure that relayoutWindow will be called to get valid surface because // the previous surface may have been released. mAppVisibilityChanged = true; scheduleTraversals(); } } else { if (renderer != null) { renderer.destroyHardwareResources(mView); Loading Loading @@ -2028,7 +2038,8 @@ public final class ViewRootImpl implements ViewParent, } int getHostVisibility() { return (mAppVisible || mForceDecorViewVisibility) ? mView.getVisibility() : View.GONE; return mView != null && (mAppVisible || mForceDecorViewVisibility) ? mView.getVisibility() : View.GONE; } /** Loading Loading
core/java/android/view/ViewRootImpl.java +16 −5 Original line number Diff line number Diff line Loading @@ -1554,9 +1554,14 @@ public final class ViewRootImpl implements ViewParent, void handleAppVisibility(boolean visible) { if (mAppVisible != visible) { final boolean previousVisible = getHostVisibility() == View.VISIBLE; mAppVisible = visible; final boolean currentVisible = getHostVisibility() == View.VISIBLE; // Root view only cares about whether it is visible or not. if (previousVisible != currentVisible) { mAppVisibilityChanged = true; scheduleTraversals(); } if (!mAppVisible) { WindowManagerGlobal.trimForeground(); } Loading Loading @@ -1846,8 +1851,13 @@ public final class ViewRootImpl implements ViewParent, renderer.setStopped(mStopped); } if (!mStopped) { mNewSurfaceNeeded = true; // Unnecessary to traverse if the window is not yet visible. if (getHostVisibility() == View.VISIBLE) { // Make sure that relayoutWindow will be called to get valid surface because // the previous surface may have been released. mAppVisibilityChanged = true; scheduleTraversals(); } } else { if (renderer != null) { renderer.destroyHardwareResources(mView); Loading Loading @@ -2028,7 +2038,8 @@ public final class ViewRootImpl implements ViewParent, } int getHostVisibility() { return (mAppVisible || mForceDecorViewVisibility) ? mView.getVisibility() : View.GONE; return mView != null && (mAppVisible || mForceDecorViewVisibility) ? mView.getVisibility() : View.GONE; } /** Loading