Loading core/java/android/provider/Settings.java +10 −0 Original line number Diff line number Diff line Loading @@ -5481,6 +5481,15 @@ public final class Settings { @Readable public static final String MULTI_AUDIO_FOCUS_ENABLED = "multi_audio_focus_enabled"; /** * Whether desktop mode is enabled or not. * 0 = off * 1 = on * @hide */ @Readable public static final String DESKTOP_MODE = "desktop_mode"; /** * IMPORTANT: If you add a new public settings you also have to add it to * PUBLIC_SETTINGS below. If the new setting is hidden you have to add Loading Loading @@ -5610,6 +5619,7 @@ public final class Settings { PRIVATE_SETTINGS.add(SHOW_BATTERY_PERCENT); PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE); PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE_VENDOR_HINT); PRIVATE_SETTINGS.add(DESKTOP_MODE); } /** Loading core/java/android/window/WindowContainerTransaction.java +53 −0 Original line number Diff line number Diff line Loading @@ -693,7 +693,39 @@ public final class WindowContainerTransaction implements Parcelable { .build(); mHierarchyOps.add(hierarchyOp); return this; } /** * Sets/removes the always on top flag for this {@code windowContainer}. See * {@link com.android.server.wm.ConfigurationContainer#setAlwaysOnTop(boolean)}. * Please note that this method is only intended to be used for a * {@link com.android.server.wm.DisplayArea}. * * <p> * Setting always on top to {@code True} will also make the {@code windowContainer} to move * to the top. * </p> * <p> * Setting always on top to {@code False} will make this {@code windowContainer} to move * below the other always on top sibling containers. * </p> * * @param windowContainer the container which the flag need to be updated for. * @param alwaysOnTop denotes whether or not always on top flag should be set. * @hide */ @NonNull public WindowContainerTransaction setAlwaysOnTop( @NonNull WindowContainerToken windowContainer, boolean alwaysOnTop) { final HierarchyOp hierarchyOp = new HierarchyOp.Builder( HierarchyOp.HIERARCHY_OP_TYPE_SET_ALWAYS_ON_TOP) .setContainer(windowContainer.asBinder()) .setAlwaysOnTop(alwaysOnTop) .build(); mHierarchyOps.add(hierarchyOp); return this; } /** Loading Loading @@ -1121,6 +1153,7 @@ public final class WindowContainerTransaction implements Parcelable { public static final int HIERARCHY_OP_TYPE_ADD_RECT_INSETS_PROVIDER = 16; public static final int HIERARCHY_OP_TYPE_REMOVE_INSETS_PROVIDER = 17; public static final int HIERARCHY_OP_TYPE_REQUEST_FOCUS_ON_TASK_FRAGMENT = 18; public static final int HIERARCHY_OP_TYPE_SET_ALWAYS_ON_TOP = 19; // The following key(s) are for use with mLaunchOptions: // When launching a task (eg. from recents), this is the taskId to be launched. Loading Loading @@ -1171,6 +1204,8 @@ public final class WindowContainerTransaction implements Parcelable { @Nullable private ShortcutInfo mShortcutInfo; private boolean mAlwaysOnTop; public static HierarchyOp createForReparent( @NonNull IBinder container, @Nullable IBinder reparent, boolean toTop) { return new HierarchyOp.Builder(HIERARCHY_OP_TYPE_REPARENT) Loading Loading @@ -1268,6 +1303,7 @@ public final class WindowContainerTransaction implements Parcelable { mTaskFragmentCreationOptions = copy.mTaskFragmentCreationOptions; mPendingIntent = copy.mPendingIntent; mShortcutInfo = copy.mShortcutInfo; mAlwaysOnTop = copy.mAlwaysOnTop; } protected HierarchyOp(Parcel in) { Loading @@ -1289,6 +1325,7 @@ public final class WindowContainerTransaction implements Parcelable { mTaskFragmentCreationOptions = in.readTypedObject(TaskFragmentCreationParams.CREATOR); mPendingIntent = in.readTypedObject(PendingIntent.CREATOR); mShortcutInfo = in.readTypedObject(ShortcutInfo.CREATOR); mAlwaysOnTop = in.readBoolean(); } public int getType() { Loading Loading @@ -1354,6 +1391,10 @@ public final class WindowContainerTransaction implements Parcelable { return mActivityIntent; } public boolean isAlwaysOnTop() { return mAlwaysOnTop; } @Nullable public TaskFragmentCreationParams getTaskFragmentCreationOptions() { return mTaskFragmentCreationOptions; Loading Loading @@ -1422,6 +1463,9 @@ public final class WindowContainerTransaction implements Parcelable { + " insetsType=" + Arrays.toString(mInsetsTypes) + "}"; case HIERARCHY_OP_TYPE_REQUEST_FOCUS_ON_TASK_FRAGMENT: return "{requestFocusOnTaskFragment: container=" + mContainer + "}"; case HIERARCHY_OP_TYPE_SET_ALWAYS_ON_TOP: return "{setAlwaysOnTop: container=" + mContainer + " alwaysOnTop=" + mAlwaysOnTop + "}"; default: return "{mType=" + mType + " container=" + mContainer + " reparent=" + mReparent + " mToTop=" + mToTop Loading Loading @@ -1451,6 +1495,7 @@ public final class WindowContainerTransaction implements Parcelable { dest.writeTypedObject(mTaskFragmentCreationOptions, flags); dest.writeTypedObject(mPendingIntent, flags); dest.writeTypedObject(mShortcutInfo, flags); dest.writeBoolean(mAlwaysOnTop); } @Override Loading Loading @@ -1509,6 +1554,8 @@ public final class WindowContainerTransaction implements Parcelable { @Nullable private ShortcutInfo mShortcutInfo; private boolean mAlwaysOnTop; Builder(int type) { mType = type; } Loading Loading @@ -1568,6 +1615,11 @@ public final class WindowContainerTransaction implements Parcelable { return this; } Builder setAlwaysOnTop(boolean alwaysOnTop) { mAlwaysOnTop = alwaysOnTop; return this; } Builder setTaskFragmentCreationOptions( @Nullable TaskFragmentCreationParams taskFragmentCreationOptions) { mTaskFragmentCreationOptions = taskFragmentCreationOptions; Loading Loading @@ -1596,6 +1648,7 @@ public final class WindowContainerTransaction implements Parcelable { hierarchyOp.mLaunchOptions = mLaunchOptions; hierarchyOp.mActivityIntent = mActivityIntent; hierarchyOp.mPendingIntent = mPendingIntent; hierarchyOp.mAlwaysOnTop = mAlwaysOnTop; hierarchyOp.mTaskFragmentCreationOptions = mTaskFragmentCreationOptions; hierarchyOp.mShortcutInfo = mShortcutInfo; Loading data/etc/services.core.protolog.json +12 −0 Original line number Diff line number Diff line Loading @@ -1105,6 +1105,12 @@ "group": "WM_DEBUG_TASKS", "at": "com\/android\/server\/wm\/RootWindowContainer.java" }, "-1018968224": { "message": "Recorded task is removed, so stop recording on display %d", "level": "VERBOSE", "group": "WM_DEBUG_CONTENT_RECORDING", "at": "com\/android\/server\/wm\/ContentRecorder.java" }, "-1016578046": { "message": "Moving to %s Relaunching %s callers=%s", "level": "INFO", Loading Loading @@ -2251,6 +2257,12 @@ "group": "WM_DEBUG_FOCUS", "at": "com\/android\/server\/wm\/WindowManagerService.java" }, "96494268": { "message": "Stop MediaProjection on virtual display %d", "level": "VERBOSE", "group": "WM_DEBUG_CONTENT_RECORDING", "at": "com\/android\/server\/wm\/ContentRecorder.java" }, "100936473": { "message": "Wallpaper animation!", "level": "VERBOSE", Loading libs/WindowManager/Shell/res/drawable/decor_minimize_button_dark.xml 0 → 100644 +24 −0 Original line number Diff line number Diff line <!-- ~ Copyright (C) 2022 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24" android:tint="?attr/colorControlNormal"> <path android:fillColor="@android:color/white" android:pathData="M6,21V19H18V21Z"/> </vector> libs/WindowManager/Shell/res/layout/caption_window_decoration.xml +11 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,17 @@ android:layout_height="wrap_content" android:gravity="end" android:background="@drawable/decor_caption_title"> <Button android:id="@+id/minimize_window" android:visibility="gone" android:layout_width="32dp" android:layout_height="32dp" android:layout_margin="5dp" android:padding="4dp" android:layout_gravity="top|end" android:contentDescription="@string/maximize_button_text" android:background="@drawable/decor_minimize_button_dark" android:duplicateParentState="true"/> <Button android:id="@+id/maximize_window" android:layout_width="32dp" Loading @@ -42,4 +53,3 @@ android:background="@drawable/decor_close_button_dark" android:duplicateParentState="true"/> </com.android.wm.shell.windowdecor.WindowDecorLinearLayout> Loading
core/java/android/provider/Settings.java +10 −0 Original line number Diff line number Diff line Loading @@ -5481,6 +5481,15 @@ public final class Settings { @Readable public static final String MULTI_AUDIO_FOCUS_ENABLED = "multi_audio_focus_enabled"; /** * Whether desktop mode is enabled or not. * 0 = off * 1 = on * @hide */ @Readable public static final String DESKTOP_MODE = "desktop_mode"; /** * IMPORTANT: If you add a new public settings you also have to add it to * PUBLIC_SETTINGS below. If the new setting is hidden you have to add Loading Loading @@ -5610,6 +5619,7 @@ public final class Settings { PRIVATE_SETTINGS.add(SHOW_BATTERY_PERCENT); PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE); PRIVATE_SETTINGS.add(DISPLAY_COLOR_MODE_VENDOR_HINT); PRIVATE_SETTINGS.add(DESKTOP_MODE); } /** Loading
core/java/android/window/WindowContainerTransaction.java +53 −0 Original line number Diff line number Diff line Loading @@ -693,7 +693,39 @@ public final class WindowContainerTransaction implements Parcelable { .build(); mHierarchyOps.add(hierarchyOp); return this; } /** * Sets/removes the always on top flag for this {@code windowContainer}. See * {@link com.android.server.wm.ConfigurationContainer#setAlwaysOnTop(boolean)}. * Please note that this method is only intended to be used for a * {@link com.android.server.wm.DisplayArea}. * * <p> * Setting always on top to {@code True} will also make the {@code windowContainer} to move * to the top. * </p> * <p> * Setting always on top to {@code False} will make this {@code windowContainer} to move * below the other always on top sibling containers. * </p> * * @param windowContainer the container which the flag need to be updated for. * @param alwaysOnTop denotes whether or not always on top flag should be set. * @hide */ @NonNull public WindowContainerTransaction setAlwaysOnTop( @NonNull WindowContainerToken windowContainer, boolean alwaysOnTop) { final HierarchyOp hierarchyOp = new HierarchyOp.Builder( HierarchyOp.HIERARCHY_OP_TYPE_SET_ALWAYS_ON_TOP) .setContainer(windowContainer.asBinder()) .setAlwaysOnTop(alwaysOnTop) .build(); mHierarchyOps.add(hierarchyOp); return this; } /** Loading Loading @@ -1121,6 +1153,7 @@ public final class WindowContainerTransaction implements Parcelable { public static final int HIERARCHY_OP_TYPE_ADD_RECT_INSETS_PROVIDER = 16; public static final int HIERARCHY_OP_TYPE_REMOVE_INSETS_PROVIDER = 17; public static final int HIERARCHY_OP_TYPE_REQUEST_FOCUS_ON_TASK_FRAGMENT = 18; public static final int HIERARCHY_OP_TYPE_SET_ALWAYS_ON_TOP = 19; // The following key(s) are for use with mLaunchOptions: // When launching a task (eg. from recents), this is the taskId to be launched. Loading Loading @@ -1171,6 +1204,8 @@ public final class WindowContainerTransaction implements Parcelable { @Nullable private ShortcutInfo mShortcutInfo; private boolean mAlwaysOnTop; public static HierarchyOp createForReparent( @NonNull IBinder container, @Nullable IBinder reparent, boolean toTop) { return new HierarchyOp.Builder(HIERARCHY_OP_TYPE_REPARENT) Loading Loading @@ -1268,6 +1303,7 @@ public final class WindowContainerTransaction implements Parcelable { mTaskFragmentCreationOptions = copy.mTaskFragmentCreationOptions; mPendingIntent = copy.mPendingIntent; mShortcutInfo = copy.mShortcutInfo; mAlwaysOnTop = copy.mAlwaysOnTop; } protected HierarchyOp(Parcel in) { Loading @@ -1289,6 +1325,7 @@ public final class WindowContainerTransaction implements Parcelable { mTaskFragmentCreationOptions = in.readTypedObject(TaskFragmentCreationParams.CREATOR); mPendingIntent = in.readTypedObject(PendingIntent.CREATOR); mShortcutInfo = in.readTypedObject(ShortcutInfo.CREATOR); mAlwaysOnTop = in.readBoolean(); } public int getType() { Loading Loading @@ -1354,6 +1391,10 @@ public final class WindowContainerTransaction implements Parcelable { return mActivityIntent; } public boolean isAlwaysOnTop() { return mAlwaysOnTop; } @Nullable public TaskFragmentCreationParams getTaskFragmentCreationOptions() { return mTaskFragmentCreationOptions; Loading Loading @@ -1422,6 +1463,9 @@ public final class WindowContainerTransaction implements Parcelable { + " insetsType=" + Arrays.toString(mInsetsTypes) + "}"; case HIERARCHY_OP_TYPE_REQUEST_FOCUS_ON_TASK_FRAGMENT: return "{requestFocusOnTaskFragment: container=" + mContainer + "}"; case HIERARCHY_OP_TYPE_SET_ALWAYS_ON_TOP: return "{setAlwaysOnTop: container=" + mContainer + " alwaysOnTop=" + mAlwaysOnTop + "}"; default: return "{mType=" + mType + " container=" + mContainer + " reparent=" + mReparent + " mToTop=" + mToTop Loading Loading @@ -1451,6 +1495,7 @@ public final class WindowContainerTransaction implements Parcelable { dest.writeTypedObject(mTaskFragmentCreationOptions, flags); dest.writeTypedObject(mPendingIntent, flags); dest.writeTypedObject(mShortcutInfo, flags); dest.writeBoolean(mAlwaysOnTop); } @Override Loading Loading @@ -1509,6 +1554,8 @@ public final class WindowContainerTransaction implements Parcelable { @Nullable private ShortcutInfo mShortcutInfo; private boolean mAlwaysOnTop; Builder(int type) { mType = type; } Loading Loading @@ -1568,6 +1615,11 @@ public final class WindowContainerTransaction implements Parcelable { return this; } Builder setAlwaysOnTop(boolean alwaysOnTop) { mAlwaysOnTop = alwaysOnTop; return this; } Builder setTaskFragmentCreationOptions( @Nullable TaskFragmentCreationParams taskFragmentCreationOptions) { mTaskFragmentCreationOptions = taskFragmentCreationOptions; Loading Loading @@ -1596,6 +1648,7 @@ public final class WindowContainerTransaction implements Parcelable { hierarchyOp.mLaunchOptions = mLaunchOptions; hierarchyOp.mActivityIntent = mActivityIntent; hierarchyOp.mPendingIntent = mPendingIntent; hierarchyOp.mAlwaysOnTop = mAlwaysOnTop; hierarchyOp.mTaskFragmentCreationOptions = mTaskFragmentCreationOptions; hierarchyOp.mShortcutInfo = mShortcutInfo; Loading
data/etc/services.core.protolog.json +12 −0 Original line number Diff line number Diff line Loading @@ -1105,6 +1105,12 @@ "group": "WM_DEBUG_TASKS", "at": "com\/android\/server\/wm\/RootWindowContainer.java" }, "-1018968224": { "message": "Recorded task is removed, so stop recording on display %d", "level": "VERBOSE", "group": "WM_DEBUG_CONTENT_RECORDING", "at": "com\/android\/server\/wm\/ContentRecorder.java" }, "-1016578046": { "message": "Moving to %s Relaunching %s callers=%s", "level": "INFO", Loading Loading @@ -2251,6 +2257,12 @@ "group": "WM_DEBUG_FOCUS", "at": "com\/android\/server\/wm\/WindowManagerService.java" }, "96494268": { "message": "Stop MediaProjection on virtual display %d", "level": "VERBOSE", "group": "WM_DEBUG_CONTENT_RECORDING", "at": "com\/android\/server\/wm\/ContentRecorder.java" }, "100936473": { "message": "Wallpaper animation!", "level": "VERBOSE", Loading
libs/WindowManager/Shell/res/drawable/decor_minimize_button_dark.xml 0 → 100644 +24 −0 Original line number Diff line number Diff line <!-- ~ Copyright (C) 2022 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24" android:tint="?attr/colorControlNormal"> <path android:fillColor="@android:color/white" android:pathData="M6,21V19H18V21Z"/> </vector>
libs/WindowManager/Shell/res/layout/caption_window_decoration.xml +11 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,17 @@ android:layout_height="wrap_content" android:gravity="end" android:background="@drawable/decor_caption_title"> <Button android:id="@+id/minimize_window" android:visibility="gone" android:layout_width="32dp" android:layout_height="32dp" android:layout_margin="5dp" android:padding="4dp" android:layout_gravity="top|end" android:contentDescription="@string/maximize_button_text" android:background="@drawable/decor_minimize_button_dark" android:duplicateParentState="true"/> <Button android:id="@+id/maximize_window" android:layout_width="32dp" Loading @@ -42,4 +53,3 @@ android:background="@drawable/decor_close_button_dark" android:duplicateParentState="true"/> </com.android.wm.shell.windowdecor.WindowDecorLinearLayout>