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

Commit 8aaccc88 authored by Garfield Tan's avatar Garfield Tan Committed by Android (Google) Code Review
Browse files

Merge "Fix a bug in maximize buttons in legacy captions" into tm-qpr-dev

parents d6004823 6be9f83c
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -106,8 +106,6 @@ public class FreeformTaskListener<T extends AutoCloseable>
                taskInfo.taskId);
        state.mTaskInfo = taskInfo;
        mWindowDecorationViewModel.onTaskInfoChanged(state.mTaskInfo, state.mWindowDecoration);
        ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TASK_ORG, "Freeform Task Info Changed: #%d",
                taskInfo.taskId);
    }

    @Override
+10 −5
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import android.view.LayoutInflater;
import android.view.SurfaceControl;
import android.view.SurfaceControlViewHost;
import android.view.View;
import android.view.ViewRootImpl;
import android.view.WindowManager;
import android.view.WindowlessWindowManager;
import android.window.WindowContainerTransaction;
@@ -201,12 +202,16 @@ public class WindowDecoration<T extends View & TaskFocusStateConsumer> implement
            mViewHost.relayout(lp);
        }

        if (ViewRootImpl.CAPTION_ON_SHELL) {
            outResult.mRootView.setTaskFocusState(mTaskInfo.isFocused);

            // Caption insets
            mCaptionInsetsRect.set(taskBounds);
            mCaptionInsetsRect.bottom = mCaptionInsetsRect.top + captionHeight;
            wct.addRectInsetsProvider(mTaskInfo.token, mCaptionInsetsRect, CAPTION_INSETS_TYPES);
        } else {
            outResult.mRootView.setVisibility(View.GONE);
        }

        // Task surface itself
        Point taskPosition = mTaskInfo.positionInParent;
+1 −0
Original line number Diff line number Diff line
@@ -949,6 +949,7 @@ class ActivityClientController extends IActivityClientController.Stub {

                if (rootTask.inFreeformWindowingMode()) {
                    rootTask.setWindowingMode(WINDOWING_MODE_FULLSCREEN);
                    rootTask.setBounds(null);
                } else if (!r.supportsFreeform()) {
                    throw new IllegalStateException(
                            "This activity is currently not freeform-enabled");