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

Commit 2aec5f26 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix a couple issues with tracking launch cookies" into sc-dev

parents ae95cd1c 3c192b3f
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -443,6 +443,19 @@ public abstract class BaseQuickstepLauncher extends Launcher
        if (info == null) {
            return;
        }
        switch (info.container) {
            case LauncherSettings.Favorites.CONTAINER_DESKTOP:
            case LauncherSettings.Favorites.CONTAINER_HOTSEAT:
                // Fall through and continue it's on the workspace (we don't support swiping back
                // to other containers like all apps or the hotseat predictions (which can change)
                break;
            default:
                if (info.container >= 0) {
                    // Also allow swiping to folders
                    break;
                }
                return;
        }
        switch (info.itemType) {
            case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
            case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
+4 −2
Original line number Diff line number Diff line
@@ -1095,8 +1095,10 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
            final RemoteAnimationTargetCompat runningTaskTarget = mRecentsAnimationTargets != null
                    ? mRecentsAnimationTargets.findTask(mGestureState.getRunningTaskId())
                    : null;
            HomeAnimationFactory homeAnimFactory = createHomeAnimationFactory(
                    runningTaskTarget.taskInfo.launchCookies, duration);
            final ArrayList<IBinder> cookies = runningTaskTarget != null
                    ? runningTaskTarget.taskInfo.launchCookies
                    : new ArrayList<>();
            HomeAnimationFactory homeAnimFactory = createHomeAnimationFactory(cookies, duration);
            mIsSwipingPipToHome = homeAnimFactory.supportSwipePipToHome()
                    && runningTaskTarget != null
                    && runningTaskTarget.taskInfo.pictureInPictureParams != null
+3 −2
Original line number Diff line number Diff line
@@ -244,8 +244,9 @@ public class LauncherSwipeHandlerV2 extends
            return null;
        }

        // Find the associated item info for the launch cookie (if available)
        int launchCookieItemId = -1;
        // Find the associated item info for the launch cookie (if available), note that predicted
        // apps actually have an id of -1, so use another default id here
        int launchCookieItemId = -2;
        for (IBinder cookie : launchCookies) {
            Integer itemId = ObjectWrapper.unwrap(cookie);
            if (itemId != null) {