Merge change 24473 into eclair
* changes: fix [2074427] SurfaceView doesn't disappear on GONE
This commit is contained in:
@@ -124,6 +124,8 @@ public class SurfaceView extends View {
|
||||
};
|
||||
|
||||
boolean mRequestedVisible = false;
|
||||
boolean mWindowVisibility = false;
|
||||
boolean mViewVisibility = false;
|
||||
int mRequestedWidth = -1;
|
||||
int mRequestedHeight = -1;
|
||||
int mRequestedFormat = PixelFormat.OPAQUE;
|
||||
@@ -176,12 +178,22 @@ public class SurfaceView extends View {
|
||||
mSession = getWindowSession();
|
||||
mLayout.token = getWindowToken();
|
||||
mLayout.setTitle("SurfaceView");
|
||||
mViewVisibility = getVisibility() == VISIBLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onWindowVisibilityChanged(int visibility) {
|
||||
super.onWindowVisibilityChanged(visibility);
|
||||
mRequestedVisible = visibility == VISIBLE;
|
||||
mWindowVisibility = visibility == VISIBLE;
|
||||
mRequestedVisible = mWindowVisibility && mViewVisibility;
|
||||
updateWindow(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVisibility(int visibility) {
|
||||
super.setVisibility(visibility);
|
||||
mViewVisibility = visibility == VISIBLE;
|
||||
mRequestedVisible = mWindowVisibility && mViewVisibility;
|
||||
updateWindow(false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user