Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54eec4b7 authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Android (Google) Code Review
Browse files

Merge "Allow Tasks to set some properties for migrated SC" into rvc-dev

parents 825ad111 21ea187c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -3209,8 +3209,9 @@ class Task extends WindowContainer<WindowContainer> {
    }

    @Override
    SurfaceControl.Builder makeSurface() {
        return super.makeSurface().setColorLayer().setMetadata(METADATA_TASK_ID, mTaskId);
    void setInitialSurfaceControlProperties(SurfaceControl.Builder b) {
        b.setColorLayer().setMetadata(METADATA_TASK_ID, mTaskId);
        super.setInitialSurfaceControlProperties(b);
    }

    boolean isTaskAnimating() {
+4 −4
Original line number Diff line number Diff line
@@ -399,11 +399,11 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
    }

    void createSurfaceControl(boolean force) {
        setInitialSurfaceControlProperties(makeSurface().build());
        setInitialSurfaceControlProperties(makeSurface());
    }

    private void setInitialSurfaceControlProperties(SurfaceControl surfaceControl) {
        setSurfaceControl(surfaceControl);
    void setInitialSurfaceControlProperties(SurfaceControl.Builder b) {
        setSurfaceControl(b.build());
        getSyncTransaction().show(mSurfaceControl);
        onSurfaceShown(getSyncTransaction());
        updateSurfacePosition();
@@ -431,7 +431,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
                .setContainerLayer()
                .setName(getName());

        setInitialSurfaceControlProperties(b.build());
        setInitialSurfaceControlProperties(b);

        // If parent is null, the layer should be placed offscreen so reparent to null. Otherwise,
        // set to the available parent.