Loading core/api/test-current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -3733,7 +3733,7 @@ package android.window { public final class TaskFragmentCreationParams implements android.os.Parcelable { method @NonNull public android.os.IBinder getFragmentToken(); method @NonNull public android.graphics.Rect getInitialBounds(); method @NonNull public android.graphics.Rect getInitialRelativeBounds(); method @NonNull public android.window.TaskFragmentOrganizerToken getOrganizer(); method @NonNull public android.os.IBinder getOwnerToken(); method public int getWindowingMode(); Loading @@ -3743,7 +3743,7 @@ package android.window { public static final class TaskFragmentCreationParams.Builder { ctor public TaskFragmentCreationParams.Builder(@NonNull android.window.TaskFragmentOrganizerToken, @NonNull android.os.IBinder, @NonNull android.os.IBinder); method @NonNull public android.window.TaskFragmentCreationParams build(); method @NonNull public android.window.TaskFragmentCreationParams.Builder setInitialBounds(@NonNull android.graphics.Rect); method @NonNull public android.window.TaskFragmentCreationParams.Builder setInitialRelativeBounds(@NonNull android.graphics.Rect); method @NonNull public android.window.TaskFragmentCreationParams.Builder setWindowingMode(int); } Loading core/java/android/window/TaskFragmentCreationParams.java +3 −56 Original line number Diff line number Diff line Loading @@ -52,13 +52,6 @@ public final class TaskFragmentCreationParams implements Parcelable { @NonNull private final IBinder mOwnerToken; /** * The initial bounds of the TaskFragment. Fills parent if empty. * TODO(b/232476698): cleanup with update CTS. */ @NonNull private final Rect mInitialBounds = new Rect(); /** * The initial relative bounds of the TaskFragment in parent coordinate. * Fills parent if empty. Loading @@ -66,12 +59,6 @@ public final class TaskFragmentCreationParams implements Parcelable { @NonNull private final Rect mInitialRelativeBounds = new Rect(); /** * Whether the params are using {@link Builder#setInitialRelativeBounds(Rect)}. * TODO(b/232476698): remove after remove mInitialBounds */ private final boolean mAreInitialRelativeBoundsSet; /** The initial windowing mode of the TaskFragment. Inherits from parent if not set. */ @WindowingMode private final int mWindowingMode; Loading Loading @@ -109,8 +96,7 @@ public final class TaskFragmentCreationParams implements Parcelable { private TaskFragmentCreationParams( @NonNull TaskFragmentOrganizerToken organizer, @NonNull IBinder fragmentToken, @NonNull IBinder ownerToken, @NonNull Rect initialBounds, @NonNull Rect initialRelativeBounds, boolean areInitialRelativeBoundsSet, @NonNull IBinder ownerToken, @NonNull Rect initialRelativeBounds, @WindowingMode int windowingMode, @Nullable IBinder pairedPrimaryFragmentToken, @Nullable IBinder pairedActivityToken) { if (pairedPrimaryFragmentToken != null && pairedActivityToken != null) { Loading @@ -120,9 +106,7 @@ public final class TaskFragmentCreationParams implements Parcelable { mOrganizer = organizer; mFragmentToken = fragmentToken; mOwnerToken = ownerToken; mInitialBounds.set(initialBounds); mInitialRelativeBounds.set(initialRelativeBounds); mAreInitialRelativeBoundsSet = areInitialRelativeBoundsSet; mWindowingMode = windowingMode; mPairedPrimaryFragmentToken = pairedPrimaryFragmentToken; mPairedActivityToken = pairedActivityToken; Loading @@ -143,28 +127,11 @@ public final class TaskFragmentCreationParams implements Parcelable { return mOwnerToken; } @NonNull public Rect getInitialBounds() { return mInitialBounds; } /** * TODO(b/232476698): remove the hide with adding CTS for this in next release. * @hide */ @NonNull public Rect getInitialRelativeBounds() { return mInitialRelativeBounds; } /** * TODO(b/232476698): remove after remove mInitialBounds. * @hide */ public boolean areInitialRelativeBoundsSet() { return mAreInitialRelativeBoundsSet; } @WindowingMode public int getWindowingMode() { return mWindowingMode; Loading Loading @@ -192,9 +159,7 @@ public final class TaskFragmentCreationParams implements Parcelable { mOrganizer = TaskFragmentOrganizerToken.CREATOR.createFromParcel(in); mFragmentToken = in.readStrongBinder(); mOwnerToken = in.readStrongBinder(); mInitialBounds.readFromParcel(in); mInitialRelativeBounds.readFromParcel(in); mAreInitialRelativeBoundsSet = in.readBoolean(); mWindowingMode = in.readInt(); mPairedPrimaryFragmentToken = in.readStrongBinder(); mPairedActivityToken = in.readStrongBinder(); Loading @@ -206,9 +171,7 @@ public final class TaskFragmentCreationParams implements Parcelable { mOrganizer.writeToParcel(dest, flags); dest.writeStrongBinder(mFragmentToken); dest.writeStrongBinder(mOwnerToken); mInitialBounds.writeToParcel(dest, flags); mInitialRelativeBounds.writeToParcel(dest, flags); dest.writeBoolean(mAreInitialRelativeBoundsSet); dest.writeInt(mWindowingMode); dest.writeStrongBinder(mPairedPrimaryFragmentToken); dest.writeStrongBinder(mPairedActivityToken); Loading @@ -234,7 +197,6 @@ public final class TaskFragmentCreationParams implements Parcelable { + " organizer=" + mOrganizer + " fragmentToken=" + mFragmentToken + " ownerToken=" + mOwnerToken + " initialBounds=" + mInitialBounds + " initialRelativeBounds=" + mInitialRelativeBounds + " windowingMode=" + mWindowingMode + " pairedFragmentToken=" + mPairedPrimaryFragmentToken Loading @@ -260,14 +222,9 @@ public final class TaskFragmentCreationParams implements Parcelable { @NonNull private final IBinder mOwnerToken; @NonNull private final Rect mInitialBounds = new Rect(); @NonNull private final Rect mInitialRelativeBounds = new Rect(); private boolean mAreInitialRelativeBoundsSet; @WindowingMode private int mWindowingMode = WINDOWING_MODE_UNDEFINED; Loading @@ -284,23 +241,13 @@ public final class TaskFragmentCreationParams implements Parcelable { mOwnerToken = ownerToken; } /** Sets the initial bounds for the TaskFragment. */ @NonNull public Builder setInitialBounds(@NonNull Rect bounds) { mInitialBounds.set(bounds); return this; } /** * Sets the initial relative bounds for the TaskFragment in parent coordinate. * Set to empty to fill parent. * TODO(b/232476698): remove the hide with adding CTS for this in next release. * @hide */ @NonNull public Builder setInitialRelativeBounds(@NonNull Rect bounds) { mInitialRelativeBounds.set(bounds); mAreInitialRelativeBoundsSet = true; return this; } Loading Loading @@ -355,8 +302,8 @@ public final class TaskFragmentCreationParams implements Parcelable { @NonNull public TaskFragmentCreationParams build() { return new TaskFragmentCreationParams(mOrganizer, mFragmentToken, mOwnerToken, mInitialBounds, mInitialRelativeBounds, mAreInitialRelativeBoundsSet, mWindowingMode, mPairedPrimaryFragmentToken, mPairedActivityToken); mInitialRelativeBounds, mWindowingMode, mPairedPrimaryFragmentToken, mPairedActivityToken); } } } services/core/java/com/android/server/wm/WindowOrganizerController.java +1 −4 Original line number Diff line number Diff line Loading @@ -1900,16 +1900,13 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub } ownerTask.addChild(taskFragment, position); taskFragment.setWindowingMode(creationParams.getWindowingMode()); if (creationParams.areInitialRelativeBoundsSet()) { if (!creationParams.getInitialRelativeBounds().isEmpty()) { // Set relative bounds instead of using setBounds. This will avoid unnecessary update in // case the parent has resized since the last time parent info is sent to the organizer. taskFragment.setRelativeEmbeddedBounds(creationParams.getInitialRelativeBounds()); // Recompute configuration as the bounds will be calculated based on relative bounds in // TaskFragment#resolveOverrideConfiguration. taskFragment.recomputeConfiguration(); } else { // TODO(b/232476698): remove after remove creationParams.getInitialBounds(). taskFragment.setBounds(creationParams.getInitialBounds()); } mLaunchTaskFragments.put(creationParams.getFragmentToken(), taskFragment); Loading Loading
core/api/test-current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -3733,7 +3733,7 @@ package android.window { public final class TaskFragmentCreationParams implements android.os.Parcelable { method @NonNull public android.os.IBinder getFragmentToken(); method @NonNull public android.graphics.Rect getInitialBounds(); method @NonNull public android.graphics.Rect getInitialRelativeBounds(); method @NonNull public android.window.TaskFragmentOrganizerToken getOrganizer(); method @NonNull public android.os.IBinder getOwnerToken(); method public int getWindowingMode(); Loading @@ -3743,7 +3743,7 @@ package android.window { public static final class TaskFragmentCreationParams.Builder { ctor public TaskFragmentCreationParams.Builder(@NonNull android.window.TaskFragmentOrganizerToken, @NonNull android.os.IBinder, @NonNull android.os.IBinder); method @NonNull public android.window.TaskFragmentCreationParams build(); method @NonNull public android.window.TaskFragmentCreationParams.Builder setInitialBounds(@NonNull android.graphics.Rect); method @NonNull public android.window.TaskFragmentCreationParams.Builder setInitialRelativeBounds(@NonNull android.graphics.Rect); method @NonNull public android.window.TaskFragmentCreationParams.Builder setWindowingMode(int); } Loading
core/java/android/window/TaskFragmentCreationParams.java +3 −56 Original line number Diff line number Diff line Loading @@ -52,13 +52,6 @@ public final class TaskFragmentCreationParams implements Parcelable { @NonNull private final IBinder mOwnerToken; /** * The initial bounds of the TaskFragment. Fills parent if empty. * TODO(b/232476698): cleanup with update CTS. */ @NonNull private final Rect mInitialBounds = new Rect(); /** * The initial relative bounds of the TaskFragment in parent coordinate. * Fills parent if empty. Loading @@ -66,12 +59,6 @@ public final class TaskFragmentCreationParams implements Parcelable { @NonNull private final Rect mInitialRelativeBounds = new Rect(); /** * Whether the params are using {@link Builder#setInitialRelativeBounds(Rect)}. * TODO(b/232476698): remove after remove mInitialBounds */ private final boolean mAreInitialRelativeBoundsSet; /** The initial windowing mode of the TaskFragment. Inherits from parent if not set. */ @WindowingMode private final int mWindowingMode; Loading Loading @@ -109,8 +96,7 @@ public final class TaskFragmentCreationParams implements Parcelable { private TaskFragmentCreationParams( @NonNull TaskFragmentOrganizerToken organizer, @NonNull IBinder fragmentToken, @NonNull IBinder ownerToken, @NonNull Rect initialBounds, @NonNull Rect initialRelativeBounds, boolean areInitialRelativeBoundsSet, @NonNull IBinder ownerToken, @NonNull Rect initialRelativeBounds, @WindowingMode int windowingMode, @Nullable IBinder pairedPrimaryFragmentToken, @Nullable IBinder pairedActivityToken) { if (pairedPrimaryFragmentToken != null && pairedActivityToken != null) { Loading @@ -120,9 +106,7 @@ public final class TaskFragmentCreationParams implements Parcelable { mOrganizer = organizer; mFragmentToken = fragmentToken; mOwnerToken = ownerToken; mInitialBounds.set(initialBounds); mInitialRelativeBounds.set(initialRelativeBounds); mAreInitialRelativeBoundsSet = areInitialRelativeBoundsSet; mWindowingMode = windowingMode; mPairedPrimaryFragmentToken = pairedPrimaryFragmentToken; mPairedActivityToken = pairedActivityToken; Loading @@ -143,28 +127,11 @@ public final class TaskFragmentCreationParams implements Parcelable { return mOwnerToken; } @NonNull public Rect getInitialBounds() { return mInitialBounds; } /** * TODO(b/232476698): remove the hide with adding CTS for this in next release. * @hide */ @NonNull public Rect getInitialRelativeBounds() { return mInitialRelativeBounds; } /** * TODO(b/232476698): remove after remove mInitialBounds. * @hide */ public boolean areInitialRelativeBoundsSet() { return mAreInitialRelativeBoundsSet; } @WindowingMode public int getWindowingMode() { return mWindowingMode; Loading Loading @@ -192,9 +159,7 @@ public final class TaskFragmentCreationParams implements Parcelable { mOrganizer = TaskFragmentOrganizerToken.CREATOR.createFromParcel(in); mFragmentToken = in.readStrongBinder(); mOwnerToken = in.readStrongBinder(); mInitialBounds.readFromParcel(in); mInitialRelativeBounds.readFromParcel(in); mAreInitialRelativeBoundsSet = in.readBoolean(); mWindowingMode = in.readInt(); mPairedPrimaryFragmentToken = in.readStrongBinder(); mPairedActivityToken = in.readStrongBinder(); Loading @@ -206,9 +171,7 @@ public final class TaskFragmentCreationParams implements Parcelable { mOrganizer.writeToParcel(dest, flags); dest.writeStrongBinder(mFragmentToken); dest.writeStrongBinder(mOwnerToken); mInitialBounds.writeToParcel(dest, flags); mInitialRelativeBounds.writeToParcel(dest, flags); dest.writeBoolean(mAreInitialRelativeBoundsSet); dest.writeInt(mWindowingMode); dest.writeStrongBinder(mPairedPrimaryFragmentToken); dest.writeStrongBinder(mPairedActivityToken); Loading @@ -234,7 +197,6 @@ public final class TaskFragmentCreationParams implements Parcelable { + " organizer=" + mOrganizer + " fragmentToken=" + mFragmentToken + " ownerToken=" + mOwnerToken + " initialBounds=" + mInitialBounds + " initialRelativeBounds=" + mInitialRelativeBounds + " windowingMode=" + mWindowingMode + " pairedFragmentToken=" + mPairedPrimaryFragmentToken Loading @@ -260,14 +222,9 @@ public final class TaskFragmentCreationParams implements Parcelable { @NonNull private final IBinder mOwnerToken; @NonNull private final Rect mInitialBounds = new Rect(); @NonNull private final Rect mInitialRelativeBounds = new Rect(); private boolean mAreInitialRelativeBoundsSet; @WindowingMode private int mWindowingMode = WINDOWING_MODE_UNDEFINED; Loading @@ -284,23 +241,13 @@ public final class TaskFragmentCreationParams implements Parcelable { mOwnerToken = ownerToken; } /** Sets the initial bounds for the TaskFragment. */ @NonNull public Builder setInitialBounds(@NonNull Rect bounds) { mInitialBounds.set(bounds); return this; } /** * Sets the initial relative bounds for the TaskFragment in parent coordinate. * Set to empty to fill parent. * TODO(b/232476698): remove the hide with adding CTS for this in next release. * @hide */ @NonNull public Builder setInitialRelativeBounds(@NonNull Rect bounds) { mInitialRelativeBounds.set(bounds); mAreInitialRelativeBoundsSet = true; return this; } Loading Loading @@ -355,8 +302,8 @@ public final class TaskFragmentCreationParams implements Parcelable { @NonNull public TaskFragmentCreationParams build() { return new TaskFragmentCreationParams(mOrganizer, mFragmentToken, mOwnerToken, mInitialBounds, mInitialRelativeBounds, mAreInitialRelativeBoundsSet, mWindowingMode, mPairedPrimaryFragmentToken, mPairedActivityToken); mInitialRelativeBounds, mWindowingMode, mPairedPrimaryFragmentToken, mPairedActivityToken); } } }
services/core/java/com/android/server/wm/WindowOrganizerController.java +1 −4 Original line number Diff line number Diff line Loading @@ -1900,16 +1900,13 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub } ownerTask.addChild(taskFragment, position); taskFragment.setWindowingMode(creationParams.getWindowingMode()); if (creationParams.areInitialRelativeBoundsSet()) { if (!creationParams.getInitialRelativeBounds().isEmpty()) { // Set relative bounds instead of using setBounds. This will avoid unnecessary update in // case the parent has resized since the last time parent info is sent to the organizer. taskFragment.setRelativeEmbeddedBounds(creationParams.getInitialRelativeBounds()); // Recompute configuration as the bounds will be calculated based on relative bounds in // TaskFragment#resolveOverrideConfiguration. taskFragment.recomputeConfiguration(); } else { // TODO(b/232476698): remove after remove creationParams.getInitialBounds(). taskFragment.setBounds(creationParams.getInitialBounds()); } mLaunchTaskFragments.put(creationParams.getFragmentToken(), taskFragment); Loading