Loading core/java/android/view/WindowManager.java +24 −0 Original line number Diff line number Diff line Loading @@ -921,6 +921,30 @@ public interface WindowManager extends ViewManager { default void setForceCrossWindowBlurDisabled(boolean disable) { } /** * @hide */ static String transitTypeToString(@TransitionType int type) { switch (type) { case TRANSIT_NONE: return "NONE"; case TRANSIT_OPEN: return "OPEN"; case TRANSIT_CLOSE: return "CLOSE"; case TRANSIT_TO_FRONT: return "TO_FRONT"; case TRANSIT_TO_BACK: return "TO_BACK"; case TRANSIT_RELAUNCH: return "RELAUNCH"; case TRANSIT_CHANGE: return "CHANGE"; case TRANSIT_KEYGUARD_GOING_AWAY: return "KEYGUARD_GOING_AWAY"; case TRANSIT_KEYGUARD_OCCLUDE: return "KEYGUARD_OCCLUDE"; case TRANSIT_KEYGUARD_UNOCCLUDE: return "KEYGUARD_UNOCCLUDE"; case TRANSIT_FIRST_CUSTOM: return "FIRST_CUSTOM"; default: if (type > TRANSIT_FIRST_CUSTOM) { return "FIRST_CUSTOM+" + (type - TRANSIT_FIRST_CUSTOM); } return "UNKNOWN(" + type + ")"; } } public static class LayoutParams extends ViewGroup.LayoutParams implements Parcelable { /** * X position for this window. With the default gravity it is ignored. Loading core/java/android/window/TransitionInfo.java +2 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static android.view.WindowManager.TRANSIT_NONE; import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; import static android.view.WindowManager.transitTypeToString; import android.annotation.IntDef; import android.annotation.NonNull; Loading Loading @@ -205,7 +206,7 @@ public final class TransitionInfo implements Parcelable { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{t=" + mType + " f=" + Integer.toHexString(mFlags) sb.append("{t=" + transitTypeToString(mType) + " f=" + Integer.toHexString(mFlags) + " ro=" + mRootOffset + " c=["); for (int i = 0; i < mChanges.size(); ++i) { if (i > 0) { Loading libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/ISplitScreen.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.app.PendingIntent; import android.content.Intent; import android.os.Bundle; import android.os.UserHandle; import android.window.IRemoteTransition; import com.android.wm.shell.splitscreen.ISplitScreenListener; Loading Loading @@ -74,4 +75,11 @@ interface ISplitScreen { */ oneway void startIntent(in PendingIntent intent, in Intent fillInIntent, int stage, int position, in Bundle options) = 9; /** * Starts tasks simultaneously in one transition. The first task in the list will be in the * main-stage and on the left/top. */ oneway void startTasks(int mainTaskId, in Bundle mainOptions, int sideTaskId, in Bundle sideOptions, int sidePosition, in IRemoteTransition remoteTransition) = 10; } libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/MainStage.java +1 −3 Original line number Diff line number Diff line Loading @@ -16,10 +16,7 @@ package com.android.wm.shell.splitscreen; import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW; import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; import android.graphics.Rect; import android.window.WindowContainerToken; Loading Loading @@ -52,6 +49,7 @@ class MainStage extends StageTaskListener { final WindowContainerToken rootToken = mRootTaskInfo.token; wct.setBounds(rootToken, rootBounds) .setWindowingMode(rootToken, WINDOWING_MODE_MULTI_WINDOW) .setLaunchRoot( rootToken, CONTROLLED_WINDOWING_MODES, Loading libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreen.java +10 −10 Original line number Diff line number Diff line Loading @@ -17,18 +17,8 @@ package com.android.wm.shell.splitscreen; import android.annotation.IntDef; import android.app.ActivityManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.graphics.Rect; import android.os.Bundle; import android.os.UserHandle; import androidx.annotation.Nullable; import com.android.wm.shell.common.annotations.ExternalThread; import com.android.wm.shell.draganddrop.DragAndDropPolicy; /** * Interface to engage split-screen feature. Loading Loading @@ -95,4 +85,14 @@ public interface SplitScreen { default ISplitScreen createExternalInterface() { return null; } /** Get a string representation of a stage type */ static String stageTypeToString(@StageType int stage) { switch (stage) { case STAGE_TYPE_UNDEFINED: return "UNDEFINED"; case STAGE_TYPE_MAIN: return "MAIN"; case STAGE_TYPE_SIDE: return "SIDE"; default: return "UNKNOWN(" + stage + ")"; } } } Loading
core/java/android/view/WindowManager.java +24 −0 Original line number Diff line number Diff line Loading @@ -921,6 +921,30 @@ public interface WindowManager extends ViewManager { default void setForceCrossWindowBlurDisabled(boolean disable) { } /** * @hide */ static String transitTypeToString(@TransitionType int type) { switch (type) { case TRANSIT_NONE: return "NONE"; case TRANSIT_OPEN: return "OPEN"; case TRANSIT_CLOSE: return "CLOSE"; case TRANSIT_TO_FRONT: return "TO_FRONT"; case TRANSIT_TO_BACK: return "TO_BACK"; case TRANSIT_RELAUNCH: return "RELAUNCH"; case TRANSIT_CHANGE: return "CHANGE"; case TRANSIT_KEYGUARD_GOING_AWAY: return "KEYGUARD_GOING_AWAY"; case TRANSIT_KEYGUARD_OCCLUDE: return "KEYGUARD_OCCLUDE"; case TRANSIT_KEYGUARD_UNOCCLUDE: return "KEYGUARD_UNOCCLUDE"; case TRANSIT_FIRST_CUSTOM: return "FIRST_CUSTOM"; default: if (type > TRANSIT_FIRST_CUSTOM) { return "FIRST_CUSTOM+" + (type - TRANSIT_FIRST_CUSTOM); } return "UNKNOWN(" + type + ")"; } } public static class LayoutParams extends ViewGroup.LayoutParams implements Parcelable { /** * X position for this window. With the default gravity it is ignored. Loading
core/java/android/window/TransitionInfo.java +2 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static android.view.WindowManager.TRANSIT_NONE; import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; import static android.view.WindowManager.transitTypeToString; import android.annotation.IntDef; import android.annotation.NonNull; Loading Loading @@ -205,7 +206,7 @@ public final class TransitionInfo implements Parcelable { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{t=" + mType + " f=" + Integer.toHexString(mFlags) sb.append("{t=" + transitTypeToString(mType) + " f=" + Integer.toHexString(mFlags) + " ro=" + mRootOffset + " c=["); for (int i = 0; i < mChanges.size(); ++i) { if (i > 0) { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/ISplitScreen.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.app.PendingIntent; import android.content.Intent; import android.os.Bundle; import android.os.UserHandle; import android.window.IRemoteTransition; import com.android.wm.shell.splitscreen.ISplitScreenListener; Loading Loading @@ -74,4 +75,11 @@ interface ISplitScreen { */ oneway void startIntent(in PendingIntent intent, in Intent fillInIntent, int stage, int position, in Bundle options) = 9; /** * Starts tasks simultaneously in one transition. The first task in the list will be in the * main-stage and on the left/top. */ oneway void startTasks(int mainTaskId, in Bundle mainOptions, int sideTaskId, in Bundle sideOptions, int sidePosition, in IRemoteTransition remoteTransition) = 10; }
libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/MainStage.java +1 −3 Original line number Diff line number Diff line Loading @@ -16,10 +16,7 @@ package com.android.wm.shell.splitscreen; import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW; import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; import android.graphics.Rect; import android.window.WindowContainerToken; Loading Loading @@ -52,6 +49,7 @@ class MainStage extends StageTaskListener { final WindowContainerToken rootToken = mRootTaskInfo.token; wct.setBounds(rootToken, rootBounds) .setWindowingMode(rootToken, WINDOWING_MODE_MULTI_WINDOW) .setLaunchRoot( rootToken, CONTROLLED_WINDOWING_MODES, Loading
libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreen.java +10 −10 Original line number Diff line number Diff line Loading @@ -17,18 +17,8 @@ package com.android.wm.shell.splitscreen; import android.annotation.IntDef; import android.app.ActivityManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.graphics.Rect; import android.os.Bundle; import android.os.UserHandle; import androidx.annotation.Nullable; import com.android.wm.shell.common.annotations.ExternalThread; import com.android.wm.shell.draganddrop.DragAndDropPolicy; /** * Interface to engage split-screen feature. Loading Loading @@ -95,4 +85,14 @@ public interface SplitScreen { default ISplitScreen createExternalInterface() { return null; } /** Get a string representation of a stage type */ static String stageTypeToString(@StageType int stage) { switch (stage) { case STAGE_TYPE_UNDEFINED: return "UNDEFINED"; case STAGE_TYPE_MAIN: return "MAIN"; case STAGE_TYPE_SIDE: return "SIDE"; default: return "UNKNOWN(" + stage + ")"; } } }