Merge "Revert "ViewRootImpl: Fix child lifetime."" into oc-dev
am: 068b429c34
Change-Id: Id90a7439cebd13f04012f32dd3cbc5e4c9242a86
This commit is contained in:
@@ -683,8 +683,7 @@ public class SurfaceView extends View {
|
|||||||
mTranslator.translateRectInAppWindowToScreen(mScreenRect);
|
mTranslator.translateRectInAppWindowToScreen(mScreenRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mSurfaceControl != null
|
if (!isHardwareAccelerated() || !mRtHandlingPositionUpdates) {
|
||||||
&& (!isHardwareAccelerated() || !mRtHandlingPositionUpdates)) {
|
|
||||||
try {
|
try {
|
||||||
if (DEBUG) Log.d(TAG, String.format("%d updateSurfacePosition UI, " +
|
if (DEBUG) Log.d(TAG, String.format("%d updateSurfacePosition UI, " +
|
||||||
"postion = [%d, %d, %d, %d]", System.identityHashCode(this),
|
"postion = [%d, %d, %d, %d]", System.identityHashCode(this),
|
||||||
|
|||||||
@@ -1249,13 +1249,6 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
mIsAmbientMode = ambient;
|
mIsAmbientMode = ambient;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setWindowVisibility(int visibility) {
|
|
||||||
if (visibility != mAttachInfo.mWindowVisibility) {
|
|
||||||
mAttachInfo.mWindowVisibility = visibility;
|
|
||||||
mView.dispatchWindowVisibilityChanged(visibility);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void setWindowStopped(boolean stopped) {
|
void setWindowStopped(boolean stopped) {
|
||||||
if (mStopped != stopped) {
|
if (mStopped != stopped) {
|
||||||
mStopped = stopped;
|
mStopped = stopped;
|
||||||
@@ -1270,7 +1263,6 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
if (renderer != null) {
|
if (renderer != null) {
|
||||||
renderer.destroyHardwareResources(mView);
|
renderer.destroyHardwareResources(mView);
|
||||||
}
|
}
|
||||||
mView.dispatchWindowVisibilityChanged(View.GONE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1305,8 +1297,7 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int getHostVisibility() {
|
int getHostVisibility() {
|
||||||
return (mAppVisible || mForceDecorViewVisibility) && !mStopped
|
return (mAppVisible || mForceDecorViewVisibility) ? mView.getVisibility() : View.GONE;
|
||||||
? mView.getVisibility() : View.GONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1663,8 +1654,8 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (viewVisibilityChanged) {
|
if (viewVisibilityChanged) {
|
||||||
setWindowVisibility(viewVisibility);
|
mAttachInfo.mWindowVisibility = viewVisibility;
|
||||||
|
host.dispatchWindowVisibilityChanged(viewVisibility);
|
||||||
if (viewUserVisibilityChanged) {
|
if (viewUserVisibilityChanged) {
|
||||||
host.dispatchVisibilityAggregated(viewVisibility == View.VISIBLE);
|
host.dispatchVisibilityAggregated(viewVisibility == View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user