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

Commit eb143041 authored by Ats Jenk's avatar Ats Jenk
Browse files

Enable live tile for desktop

Remove logic to always screenshot desktop tasks.

Bug: 297590571
Test: swipe up to recents when on desktop
Change-Id: Ie6e95f711e1721f66a2ed6081fe99d941c18b393
parent 5bec1164
Loading
Loading
Loading
Loading
+3 −12
Original line number Diff line number Diff line
@@ -2084,20 +2084,11 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
    }

    private void finishCurrentTransitionToRecents() {
        if (mRecentsView != null
                && mActivityInterface.getDesktopVisibilityController() != null
                && mActivityInterface.getDesktopVisibilityController().areFreeformTasksVisible()) {
            mRecentsView.switchToScreenshot(() -> {
                mRecentsView.finishRecentsAnimation(true /* toRecents */, false /* shouldPip */,
                        () -> mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED));
            });
        } else {
        mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED);
        if (mRecentsAnimationController != null) {
            mRecentsAnimationController.detachNavigationBarFromApp(true);
        }
    }
    }

    private void finishCurrentTransitionToHome() {
        if (!hasTargets() || mRecentsAnimationController == null) {
+0 −7
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@ import com.android.launcher3.testing.shared.TestProtocol;
import com.android.launcher3.util.DisplayController;
import com.android.quickstep.TopTaskTracker.CachedTaskInfo;
import com.android.quickstep.util.ActiveGestureLog;
import com.android.quickstep.views.DesktopTaskView;
import com.android.quickstep.views.RecentsView;
import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.ActivityManagerWrapper;
@@ -261,12 +260,6 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn
            // to let the transition controller collect Home activity.
            CachedTaskInfo cti = gestureState.getRunningTask();
            boolean homeIsOnTop = cti != null && cti.isHomeTask();
            if (DesktopTaskView.DESKTOP_MODE_SUPPORTED) {
                if (cti != null && cti.isFreeformTask()) {
                    // No transient launch when desktop task is on top
                    homeIsOnTop = true;
                }
            }
            if (activityInterface.allowAllAppsFromOverview()) {
                homeIsOnTop = true;
            }
+4 −4
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.quickstep.views;

import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;

import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_UNDEFINED;

import android.content.Context;
@@ -41,7 +40,6 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.desktop.DesktopRecentsTransitionController;
@@ -338,16 +336,18 @@ public class DesktopTaskView extends TaskView {
    @Override
    public RunnableList launchTaskAnimated() {
        RunnableList endCallback = new RunnableList();
        endCallback.add(() -> Launcher.getLauncher(mActivity).getStateManager().goToState(NORMAL));

        RecentsView recentsView = getRecentsView();
        DesktopRecentsTransitionController recentsController =
                getRecentsView().getDesktopRecentsController();
                recentsView.getDesktopRecentsController();
        if (recentsController != null) {
            recentsController.launchDesktopFromRecents(this, success -> {
                endCallback.executeAllAndDestroy();
            });
        }

        // Callbacks get run from recentsView for case when recents animation already running
        recentsView.addSideTaskLaunchCallback(endCallback);
        return endCallback;
    }