Loading core/java/android/window/TaskConstants.java +9 −1 Original line number Diff line number Diff line Loading @@ -73,6 +73,13 @@ public class TaskConstants { */ public static final int TASK_CHILD_LAYER_TASK_OVERLAY = 4 * TASK_CHILD_LAYER_REGION_SIZE; /** * Veil to cover task surface and other window decorations during resizes. * @hide */ public static final int TASK_CHILD_LAYER_RESIZE_VEIL = 6 * TASK_CHILD_LAYER_REGION_SIZE; /** * Z-orders of task child layers other than activities, task fragments and layers interleaved * with them, e.g. IME windows. [-10000, 10000) is reserved for these layers. Loading @@ -84,7 +91,8 @@ public class TaskConstants { TASK_CHILD_LAYER_COMPAT_UI, TASK_CHILD_LAYER_WINDOW_DECORATIONS, TASK_CHILD_LAYER_RECENTS_ANIMATION_PIP_OVERLAY, TASK_CHILD_LAYER_TASK_OVERLAY TASK_CHILD_LAYER_TASK_OVERLAY, TASK_CHILD_LAYER_RESIZE_VEIL }) public @interface TaskChildLayer {} } libs/WindowManager/Shell/res/drawable/desktop_mode_resize_veil_background.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2023 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="@android:color/white" /> </shape> libs/WindowManager/Shell/res/layout/desktop_mode_resize_veil.xml 0 → 100644 +28 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2023 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/desktop_mode_resize_veil_background"> <ImageView android:id="@+id/veil_application_icon" android:layout_width="96dp" android:layout_height="96dp" android:layout_gravity="center" android:contentDescription="@string/app_icon_text" /> </FrameLayout> No newline at end of file libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeStatus.java +13 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,12 @@ public class DesktopModeStatus { private static final boolean IS_PROTO2_ENABLED = SystemProperties.getBoolean( "persist.wm.debug.desktop_mode_2", false); /** * Flag to indicate whether task resizing is veiled. */ private static final boolean IS_VEILED_RESIZE_ENABLED = SystemProperties.getBoolean( "persist.wm.debug.desktop_veiled_resizing", true); /** * Return {@code true} if desktop mode support is enabled */ Loading @@ -64,6 +70,13 @@ public class DesktopModeStatus { return isProto1Enabled() || isProto2Enabled(); } /** * Return {@code true} if veiled resizing is active. If false, fluid resizing is used. */ public static boolean isVeiledResizeEnabled() { return IS_VEILED_RESIZE_ENABLED; } /** * Check if desktop mode is active * Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java +2 −2 Original line number Diff line number Diff line Loading @@ -185,8 +185,8 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel { mSyncQueue); mWindowDecorByTaskId.put(taskInfo.taskId, windowDecoration); final TaskPositioner taskPositioner = new TaskPositioner(mTaskOrganizer, windowDecoration, mDisplayController); final FluidResizeTaskPositioner taskPositioner = new FluidResizeTaskPositioner(mTaskOrganizer, windowDecoration, mDisplayController); final CaptionTouchEventListener touchEventListener = new CaptionTouchEventListener(taskInfo, taskPositioner); windowDecoration.setCaptionListeners(touchEventListener, touchEventListener); Loading Loading
core/java/android/window/TaskConstants.java +9 −1 Original line number Diff line number Diff line Loading @@ -73,6 +73,13 @@ public class TaskConstants { */ public static final int TASK_CHILD_LAYER_TASK_OVERLAY = 4 * TASK_CHILD_LAYER_REGION_SIZE; /** * Veil to cover task surface and other window decorations during resizes. * @hide */ public static final int TASK_CHILD_LAYER_RESIZE_VEIL = 6 * TASK_CHILD_LAYER_REGION_SIZE; /** * Z-orders of task child layers other than activities, task fragments and layers interleaved * with them, e.g. IME windows. [-10000, 10000) is reserved for these layers. Loading @@ -84,7 +91,8 @@ public class TaskConstants { TASK_CHILD_LAYER_COMPAT_UI, TASK_CHILD_LAYER_WINDOW_DECORATIONS, TASK_CHILD_LAYER_RECENTS_ANIMATION_PIP_OVERLAY, TASK_CHILD_LAYER_TASK_OVERLAY TASK_CHILD_LAYER_TASK_OVERLAY, TASK_CHILD_LAYER_RESIZE_VEIL }) public @interface TaskChildLayer {} }
libs/WindowManager/Shell/res/drawable/desktop_mode_resize_veil_background.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2023 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="@android:color/white" /> </shape>
libs/WindowManager/Shell/res/layout/desktop_mode_resize_veil.xml 0 → 100644 +28 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2023 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/desktop_mode_resize_veil_background"> <ImageView android:id="@+id/veil_application_icon" android:layout_width="96dp" android:layout_height="96dp" android:layout_gravity="center" android:contentDescription="@string/app_icon_text" /> </FrameLayout> No newline at end of file
libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeStatus.java +13 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,12 @@ public class DesktopModeStatus { private static final boolean IS_PROTO2_ENABLED = SystemProperties.getBoolean( "persist.wm.debug.desktop_mode_2", false); /** * Flag to indicate whether task resizing is veiled. */ private static final boolean IS_VEILED_RESIZE_ENABLED = SystemProperties.getBoolean( "persist.wm.debug.desktop_veiled_resizing", true); /** * Return {@code true} if desktop mode support is enabled */ Loading @@ -64,6 +70,13 @@ public class DesktopModeStatus { return isProto1Enabled() || isProto2Enabled(); } /** * Return {@code true} if veiled resizing is active. If false, fluid resizing is used. */ public static boolean isVeiledResizeEnabled() { return IS_VEILED_RESIZE_ENABLED; } /** * Check if desktop mode is active * Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java +2 −2 Original line number Diff line number Diff line Loading @@ -185,8 +185,8 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel { mSyncQueue); mWindowDecorByTaskId.put(taskInfo.taskId, windowDecoration); final TaskPositioner taskPositioner = new TaskPositioner(mTaskOrganizer, windowDecoration, mDisplayController); final FluidResizeTaskPositioner taskPositioner = new FluidResizeTaskPositioner(mTaskOrganizer, windowDecoration, mDisplayController); final CaptionTouchEventListener touchEventListener = new CaptionTouchEventListener(taskInfo, taskPositioner); windowDecoration.setCaptionListeners(touchEventListener, touchEventListener); Loading