Merge "Allow Tasks to set some properties for migrated SC" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
54eec4b7f6
@@ -3209,8 +3209,9 @@ class Task extends WindowContainer<WindowContainer> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
SurfaceControl.Builder makeSurface() {
|
void setInitialSurfaceControlProperties(SurfaceControl.Builder b) {
|
||||||
return super.makeSurface().setColorLayer().setMetadata(METADATA_TASK_ID, mTaskId);
|
b.setColorLayer().setMetadata(METADATA_TASK_ID, mTaskId);
|
||||||
|
super.setInitialSurfaceControlProperties(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isTaskAnimating() {
|
boolean isTaskAnimating() {
|
||||||
|
|||||||
@@ -399,11 +399,11 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
|
|||||||
}
|
}
|
||||||
|
|
||||||
void createSurfaceControl(boolean force) {
|
void createSurfaceControl(boolean force) {
|
||||||
setInitialSurfaceControlProperties(makeSurface().build());
|
setInitialSurfaceControlProperties(makeSurface());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setInitialSurfaceControlProperties(SurfaceControl surfaceControl) {
|
void setInitialSurfaceControlProperties(SurfaceControl.Builder b) {
|
||||||
setSurfaceControl(surfaceControl);
|
setSurfaceControl(b.build());
|
||||||
getSyncTransaction().show(mSurfaceControl);
|
getSyncTransaction().show(mSurfaceControl);
|
||||||
onSurfaceShown(getSyncTransaction());
|
onSurfaceShown(getSyncTransaction());
|
||||||
updateSurfacePosition();
|
updateSurfacePosition();
|
||||||
@@ -431,7 +431,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
|
|||||||
.setContainerLayer()
|
.setContainerLayer()
|
||||||
.setName(getName());
|
.setName(getName());
|
||||||
|
|
||||||
setInitialSurfaceControlProperties(b.build());
|
setInitialSurfaceControlProperties(b);
|
||||||
|
|
||||||
// If parent is null, the layer should be placed offscreen so reparent to null. Otherwise,
|
// If parent is null, the layer should be placed offscreen so reparent to null. Otherwise,
|
||||||
// set to the available parent.
|
// set to the available parent.
|
||||||
|
|||||||
Reference in New Issue
Block a user