Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1674270 authored by Winson Chung's avatar Winson Chung
Browse files

1/ Fixing docked task animation when entering split screen from home

- Update the minimized state when docking an app from home to ensure that
  the animation of the docked task goes to the right bounds
- Temporarily block the invocation of the old recents activity when showing
  recents as a part of setting the windowing mode of another task (this is
  fine right now because quickstep only allows docking via the UI and not
  from the nav bar while another task is open).
- Add proto field so we can determine whether to check the recents activity
  from the split screen CTS tests
- Also fix issue with invisible docked task due to wrong bounds calculated
  due to launcher not notifying the divider of the first docked frame

Bug: 73118672
Test: go/wm-smoke
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerSplitScreenTests
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerTransitionSelectionTests

Change-Id: Ib1208501c311de009a9e706103134865c521cb63
parent fc7c7498
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -364,6 +364,11 @@ public abstract class ActivityManagerInternal {
     */
    public abstract boolean isCallerRecents(int callingUid);

    /**
     * Returns whether the recents component is the home activity for the given user.
     */
    public abstract boolean isRecentsComponentHomeActivity(int userId);

    /**
     * Whether an UID is active or idle.
     */
+5 −0
Original line number Diff line number Diff line
@@ -235,6 +235,11 @@ public abstract class PackageManagerInternal {
    public abstract ComponentName getHomeActivitiesAsUser(List<ResolveInfo> allHomeCandidates,
            int userId);

    /**
     * @return The default home activity component name.
     */
    public abstract ComponentName getDefaultHomeActivity(int userId);

    /**
     * Called by DeviceOwnerManagerService to set the package names of device owner and profile
     * owners.
+3 −0
Original line number Diff line number Diff line
@@ -58,6 +58,9 @@ message ActivityStackSupervisorProto {
  optional KeyguardControllerProto keyguard_controller = 3;
  optional int32 focused_stack_id = 4;
  optional .com.android.server.wm.proto.IdentifierProto resumed_activity = 5;
  // Whether or not the home activity is the recents activity. This is needed for the CTS tests to
  // know what activity types to check for when invoking splitscreen multi-window.
  optional bool is_home_recents_component = 6;
}

/* represents ActivityStackSupervisor.ActivityDisplay */
+10 −5
Original line number Diff line number Diff line
@@ -28,25 +28,30 @@ interface ISystemUiProxy {
     * Proxies SurfaceControl.screenshotToBuffer().
     */
    GraphicBufferCompat screenshot(in Rect sourceCrop, int width, int height, int minLayer,
            int maxLayer, boolean useIdentityTransform, int rotation);
            int maxLayer, boolean useIdentityTransform, int rotation) = 0;

    /**
     * Begins screen pinning on the provided {@param taskId}.
     */
    void startScreenPinning(int taskId);
    void startScreenPinning(int taskId) = 1;

    /**
     * Called when the overview service has started the recents animation.
     */
    void onRecentsAnimationStarted();
    void onRecentsAnimationStarted() = 2;

    /**
     * Specifies the text to be shown for onboarding the new swipe-up gesture to access recents.
     */
    void setRecentsOnboardingText(CharSequence text);
    void setRecentsOnboardingText(CharSequence text) = 3;

    /**
     * Enables/disables launcher/overview interaction features {@link InteractionType}.
     */
    void setInteractionState(int flags);
    void setInteractionState(int flags) = 4;

    /**
    * Notifies SystemUI that split screen has been invoked.
    */
    void onSplitScreenInvoked() = 5;
}
+8 −0
Original line number Diff line number Diff line
@@ -101,4 +101,12 @@ public class WindowManagerWrapper {
            Log.w(TAG, "Failed to override pending app transition (remote): ", e);
        }
    }

    public void endProlongedAnimations() {
        try {
            WindowManagerGlobal.getWindowManagerService().endProlongedAnimations();
        } catch (RemoteException e) {
            Log.w(TAG, "Failed to end prolonged animations: ", e);
        }
    }
}
Loading