Merge "Fix a bug in maximize buttons in legacy captions" into tm-qpr-dev
This commit is contained in:
@@ -106,8 +106,6 @@ public class FreeformTaskListener<T extends AutoCloseable>
|
|||||||
taskInfo.taskId);
|
taskInfo.taskId);
|
||||||
state.mTaskInfo = taskInfo;
|
state.mTaskInfo = taskInfo;
|
||||||
mWindowDecorationViewModel.onTaskInfoChanged(state.mTaskInfo, state.mWindowDecoration);
|
mWindowDecorationViewModel.onTaskInfoChanged(state.mTaskInfo, state.mWindowDecoration);
|
||||||
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TASK_ORG, "Freeform Task Info Changed: #%d",
|
|
||||||
taskInfo.taskId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.SurfaceControl;
|
import android.view.SurfaceControl;
|
||||||
import android.view.SurfaceControlViewHost;
|
import android.view.SurfaceControlViewHost;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.ViewRootImpl;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.WindowlessWindowManager;
|
import android.view.WindowlessWindowManager;
|
||||||
import android.window.WindowContainerTransaction;
|
import android.window.WindowContainerTransaction;
|
||||||
@@ -201,12 +202,16 @@ public class WindowDecoration<T extends View & TaskFocusStateConsumer> implement
|
|||||||
mViewHost.relayout(lp);
|
mViewHost.relayout(lp);
|
||||||
}
|
}
|
||||||
|
|
||||||
outResult.mRootView.setTaskFocusState(mTaskInfo.isFocused);
|
if (ViewRootImpl.CAPTION_ON_SHELL) {
|
||||||
|
outResult.mRootView.setTaskFocusState(mTaskInfo.isFocused);
|
||||||
|
|
||||||
// Caption insets
|
// Caption insets
|
||||||
mCaptionInsetsRect.set(taskBounds);
|
mCaptionInsetsRect.set(taskBounds);
|
||||||
mCaptionInsetsRect.bottom = mCaptionInsetsRect.top + captionHeight;
|
mCaptionInsetsRect.bottom = mCaptionInsetsRect.top + captionHeight;
|
||||||
wct.addRectInsetsProvider(mTaskInfo.token, mCaptionInsetsRect, CAPTION_INSETS_TYPES);
|
wct.addRectInsetsProvider(mTaskInfo.token, mCaptionInsetsRect, CAPTION_INSETS_TYPES);
|
||||||
|
} else {
|
||||||
|
outResult.mRootView.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
// Task surface itself
|
// Task surface itself
|
||||||
Point taskPosition = mTaskInfo.positionInParent;
|
Point taskPosition = mTaskInfo.positionInParent;
|
||||||
|
|||||||
@@ -949,6 +949,7 @@ class ActivityClientController extends IActivityClientController.Stub {
|
|||||||
|
|
||||||
if (rootTask.inFreeformWindowingMode()) {
|
if (rootTask.inFreeformWindowingMode()) {
|
||||||
rootTask.setWindowingMode(WINDOWING_MODE_FULLSCREEN);
|
rootTask.setWindowingMode(WINDOWING_MODE_FULLSCREEN);
|
||||||
|
rootTask.setBounds(null);
|
||||||
} else if (!r.supportsFreeform()) {
|
} else if (!r.supportsFreeform()) {
|
||||||
throw new IllegalStateException(
|
throw new IllegalStateException(
|
||||||
"This activity is currently not freeform-enabled");
|
"This activity is currently not freeform-enabled");
|
||||||
|
|||||||
Reference in New Issue
Block a user