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

Commit ed9e3a87 authored by Alex Chau's avatar Alex Chau Committed by Android (Google) Code Review
Browse files

Merge "Convert TaksView to Kotlin" into main

parents a8058669 95656678
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -197,6 +197,8 @@ import com.android.systemui.unfold.config.UnfoldTransitionConfig;
import com.android.systemui.unfold.progress.RemoteUnfoldTransitionReceiver;
import com.android.systemui.unfold.updates.RotationChangeProvider;

import kotlin.Unit;

import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -586,6 +588,7 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer
                        } else {
                            getStateManager().moveToRestState();
                        }
                        return Unit.INSTANCE;
                    });
                } else {
                    getStateManager().goToState(NORMAL);
+3 −0
Original line number Diff line number Diff line
@@ -152,6 +152,8 @@ import com.android.window.flags.Flags;
import com.android.wm.shell.common.TransactionPool;
import com.android.wm.shell.startingsurface.SplashScreenExitAnimationUtils;

import kotlin.Unit;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@@ -2332,6 +2334,7 @@ public abstract class AbsSwipeUpHandler<T extends RecentsViewContainer,
                            mRecentsAnimationController.finish(true /* toRecents */, null);
                        }
                    }
                    return Unit.INSTANCE;
                }, true /* freezeTaskList */);
            } else {
                mContainerInterface.onLaunchTaskFailed();
+1 −3
Original line number Diff line number Diff line
@@ -304,9 +304,7 @@ public class LauncherSwipeHandlerV2 extends
            // Disable if swiping to PIP
            return null;
        }
        if (sourceTaskView == null
                || sourceTaskView.getFirstTask() == null
                || sourceTaskView.getFirstTask().key.getComponent() == null) {
        if (sourceTaskView == null || sourceTaskView.getFirstTask().key.getComponent() == null) {
            // Disable if it's an invalid task
            return null;
        }
+1 −1
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ public class OverviewCommandHelper {
        RunnableList callbackList = null;
        if (taskView != null) {
            mWaitForToggleCommandComplete = true;
            taskView.setEndQuickswitchCuj(true);
            taskView.setEndQuickSwitchCuj(true);
            callbackList = taskView.launchTasks();
        }

+2 −6
Original line number Diff line number Diff line
@@ -42,10 +42,8 @@ import androidx.annotation.Nullable;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Flags;
import com.android.launcher3.R;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.logging.StatsLogManager.LauncherEvent;
import com.android.launcher3.model.WellbeingModel;
import com.android.launcher3.model.data.ItemInfoWithIcon;
import com.android.launcher3.popup.SystemShortcut;
import com.android.launcher3.popup.SystemShortcut.AppInfo;
import com.android.launcher3.util.InstantAppResolver;
@@ -463,8 +461,7 @@ public interface TaskShortcutFactory {
            boolean isGridOnlyOverview = isTablet && Flags.enableGridOnlyOverview();
            // Extra conditions if it's not grid-only overview
            if (!isGridOnlyOverview) {
                RecentsOrientedState orientedState =
                        taskContainer.getTaskView().getRecentsView().getPagedViewOrientedState();
                RecentsOrientedState orientedState = taskContainer.getTaskView().getOrientedState();
                boolean isFakeLandscape = !orientedState.isRecentsActivityRotationAllowed()
                        && orientedState.getTouchRotation() != ROTATION_0;
                if (!isFakeLandscape) {
@@ -493,8 +490,7 @@ public interface TaskShortcutFactory {
            boolean isGridOnlyOverview = isTablet && Flags.enableGridOnlyOverview();
            // Extra conditions if it's not grid-only overview
            if (!isGridOnlyOverview) {
                RecentsOrientedState orientedState =
                        taskContainer.getTaskView().getRecentsView().getPagedViewOrientedState();
                RecentsOrientedState orientedState = taskContainer.getTaskView().getOrientedState();
                boolean isFakeLandscape = !orientedState.isRecentsActivityRotationAllowed()
                        && orientedState.getTouchRotation() != ROTATION_0;
                if (!isFakeLandscape) {
Loading