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

Commit 5ee3d986 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Cleaning up some enabled features

Flag: EXEMPT LEGACY
		CONTINUOUS_VIEW_TREE_CAPTURE
		ALL_APPS_GONE_VISIBILITY
		ENABLE_BACK_SWIPE_HOME_ANIMATION
		ENABLE_DYNAMIC_TASKBAR_THRESHOLDS
		PREEMPTIVE_UNFOLD_ANIMATION_START
		ENABLE_NEW_GESTURE_NAV_TUTORIAL
		ENABLE_ENFORCED_ROUNDED_CORNERS
		ENABLE_TRACKPAD_GESTURE
		ENABLE_KEYBOARD_QUICK_SWITCH
		ENABLE_KEYBOARD_TASKBAR_TOGGLE
		ENABLE_ALL_APPS_RV_PREINFLATION
Test: Presubmit
Bug: 270395171, 291651514, 270393426, 294252473,
     270397209, 270396257, 270393258, 271010401,
     270396844, 281726846, 288161355

Change-Id: I6ef1e12dfc2203a4cca8e91aa291485f1ff24c42
parent 98af6a90
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ import static com.android.launcher3.LauncherState.BACKGROUND_APP;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.Utilities.mapBoundToRange;
import static com.android.launcher3.config.FeatureFlags.ENABLE_BACK_SWIPE_HOME_ANIMATION;
import static com.android.launcher3.config.FeatureFlags.SEPARATE_RECENTS_ACTIVITY;
import static com.android.launcher3.testing.shared.TestProtocol.WALLPAPER_OPEN_ANIMATION_FINISHED_MESSAGE;
import static com.android.launcher3.util.DisplayController.isTransientTaskbar;
@@ -1599,7 +1598,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener

        boolean playWorkspaceReveal = !fromPredictiveBack;
        boolean skipAllAppsScale = false;
        if (ENABLE_BACK_SWIPE_HOME_ANIMATION.get() && !playFallBackAnimation) {
        if (!playFallBackAnimation) {
            PointF velocity;
            if (enableScalingRevealHomeAnimation()) {
                velocity = new PointF();
+0 −5
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import androidx.core.content.res.ResourcesCompat;

import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
import com.android.launcher3.config.FeatureFlags;

/**
 * Utility class that contains the different taskbar thresholds logic.
@@ -39,10 +38,6 @@ public class TaskbarThresholdUtils {

    private static int getThreshold(Resources r, DeviceProfile dp, int thresholdDimen,
            int multiplierDimen) {
        if (!FeatureFlags.ENABLE_DYNAMIC_TASKBAR_THRESHOLDS.get()) {
            return r.getDimensionPixelSize(thresholdDimen);
        }

        float landscapeScreenHeight = dp.isLandscape ? dp.heightPx : dp.widthPx;
        float screenPart = (landscapeScreenHeight * SCREEN_UNITS);
        float defaultDp = dpiFromPx(screenPart, DisplayMetrics.DENSITY_DEVICE_STABLE);
+3 −5
Original line number Diff line number Diff line
@@ -200,6 +200,8 @@ import com.android.systemui.unfold.progress.RemoteUnfoldTransitionReceiver;
import com.android.systemui.unfold.updates.RotationChangeProvider;
import com.android.wm.shell.shared.desktopmode.DesktopModeStatus;

import kotlin.Unit;

import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -212,8 +214,6 @@ import java.util.function.BiConsumer;
import java.util.function.Predicate;
import java.util.stream.Stream;

import kotlin.Unit;

public class QuickstepLauncher extends Launcher implements RecentsViewContainer,
        SystemShortcut.BubbleActivityStarter {
    private static final boolean TRACE_LAYOUTS =
@@ -692,9 +692,7 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer,
        }
        addMultiWindowModeChangedListener(mDepthController);
        initUnfoldTransitionProgressProvider();
        if (FeatureFlags.CONTINUOUS_VIEW_TREE_CAPTURE.get()) {
        mViewCapture = ViewCaptureFactory.getInstance(this).startCapture(getWindow());
        }
        getWindow().addPrivateFlags(PRIVATE_FLAG_OPTIMIZE_MEASURE);
        QuickstepOnboardingPrefs.setup(this);
        View.setTraceLayoutSteps(TRACE_LAYOUTS);
+10 −12
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ import androidx.annotation.VisibleForTesting
import com.android.internal.jank.Cuj
import com.android.launcher3.Flags.enableOverviewCommandHelperTimeout
import com.android.launcher3.PagedView
import com.android.launcher3.config.FeatureFlags
import com.android.launcher3.logger.LauncherAtom
import com.android.launcher3.logging.StatsLogManager
import com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_OVERVIEW_SHOW_OVERVIEW_FROM_3_BUTTON
@@ -248,7 +247,7 @@ constructor(
        recents: RecentsView<*, *>,
        taskView: TaskView?,
        command: CommandInfo,
        onCallbackResult: () -> Unit
        onCallbackResult: () -> Unit,
    ): Boolean {
        var callbackList: RunnableList? = null
        if (taskView != null) {
@@ -274,14 +273,13 @@ constructor(

    private fun executeWhenRecentsIsNotVisible(
        command: CommandInfo,
        onCallbackResult: () -> Unit
        onCallbackResult: () -> Unit,
    ): Boolean {
        val recentsViewContainer = activityInterface.getCreatedContainer() as? RecentsViewContainer
        val recentsView: RecentsView<*, *>? = recentsViewContainer?.getOverviewPanel()
        val deviceProfile = recentsViewContainer?.getDeviceProfile()
        val uiController = activityInterface.getTaskbarController()
        val allowQuickSwitch =
            FeatureFlags.ENABLE_KEYBOARD_QUICK_SWITCH.get() &&
            uiController != null &&
                deviceProfile != null &&
                (deviceProfile.isTablet || deviceProfile.isTwoPanels)
@@ -349,13 +347,13 @@ constructor(
        val gestureState =
            touchInteractionService.createGestureState(
                GestureState.DEFAULT_STATE,
                GestureState.TrackpadGestureType.NONE
                GestureState.TrackpadGestureType.NONE,
            )
        gestureState.isHandlingAtomicEvent = true
        val interactionHandler =
            touchInteractionService.swipeUpHandlerFactory.newHandler(
                gestureState,
                command.createTime
                command.createTime,
            )
        interactionHandler.setGestureEndCallback {
            onTransitionComplete(command, interactionHandler, onCallbackResult)
@@ -366,7 +364,7 @@ constructor(
            object : RecentsAnimationCallbacks.RecentsAnimationListener {
                override fun onRecentsAnimationStart(
                    controller: RecentsAnimationController,
                    targets: RecentsAnimationTargets
                    targets: RecentsAnimationTargets,
                ) {
                    Log.d(TAG, "recents animation started: $command")
                    updateRecentsViewFocus(command)
@@ -418,7 +416,7 @@ constructor(
    private fun onTransitionComplete(
        command: CommandInfo,
        handler: AbsSwipeUpHandler<*, *, *>,
        onCommandResult: () -> Unit
        onCommandResult: () -> Unit,
    ) {
        Log.d(TAG, "switching via recents animation - onTransitionComplete: $command")
        command.removeListener(handler)
@@ -434,7 +432,7 @@ constructor(
            Log.d(
                TAG,
                "next task not scheduled. First pending command type " +
                    "is ${commandQueue.firstOrNull()} - command type is: $command"
                    "is ${commandQueue.firstOrNull()} - command type is: $command",
            )
            return
        }
@@ -527,7 +525,7 @@ constructor(
        val type: CommandType,
        var status: CommandStatus = CommandStatus.IDLE,
        val createTime: Long = SystemClock.elapsedRealtime(),
        private var animationCallbacks: RecentsAnimationCallbacks? = null
        private var animationCallbacks: RecentsAnimationCallbacks? = null,
    ) {
        fun setAnimationCallbacks(recentsAnimationCallbacks: RecentsAnimationCallbacks) {
            this.animationCallbacks = recentsAnimationCallbacks
@@ -545,7 +543,7 @@ constructor(
            IDLE,
            PROCESSING,
            COMPLETED,
            CANCELED
            CANCELED,
        }
    }

+7 −11
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ import static com.android.launcher3.Launcher.INTENT_ACTION_ALL_APPS_TOGGLE;
import static com.android.launcher3.LauncherPrefs.backedUpItem;
import static com.android.launcher3.MotionEventsUtils.isTrackpadMotionEvent;
import static com.android.launcher3.MotionEventsUtils.isTrackpadMultiFingerSwipe;
import static com.android.launcher3.config.FeatureFlags.ENABLE_TRACKPAD_GESTURE;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
import static com.android.launcher3.util.OnboardingPrefs.HOME_BOUNCE_SEEN;
@@ -228,7 +227,6 @@ public class TouchInteractionService extends Service {
        @BinderThread
        @Override
        public void onTaskbarToggled() {
            if (!FeatureFlags.ENABLE_KEYBOARD_TASKBAR_TOGGLE.get()) return;
            MAIN_EXECUTOR.execute(() -> executeForTouchInteractionService(tis -> {
                TaskbarActivityContext activityContext =
                        tis.mTaskbarManager.getCurrentActivityContext();
@@ -664,14 +662,12 @@ public class TouchInteractionService extends Service {
        mAllAppsActionManager = new AllAppsActionManager(
                this, UI_HELPER_EXECUTOR, this::createAllAppsPendingIntent);
        mInputManager = getSystemService(InputManager.class);
        if (ENABLE_TRACKPAD_GESTURE.get()) {
        mInputManager.registerInputDeviceListener(mInputDeviceListener,
                UI_HELPER_EXECUTOR.getHandler());
        int [] inputDevices = mInputManager.getInputDeviceIds();
        for (int inputDeviceId : inputDevices) {
            mInputDeviceListener.onInputDeviceAdded(inputDeviceId);
        }
        }
        mDesktopVisibilityController = new DesktopVisibilityController(this);
        mTaskbarManager = new TaskbarManager(
                this, mAllAppsActionManager, mNavCallbacks, mDesktopVisibilityController);
@@ -703,7 +699,7 @@ public class TouchInteractionService extends Service {

        if (mDeviceState.isButtonNavMode()
                && !mDeviceState.supportsAssistantGestureInButtonNav()
                && (!ENABLE_TRACKPAD_GESTURE.get() || mTrackpadsConnected.isEmpty())) {
                && (mTrackpadsConnected.isEmpty())) {
            return;
        }

@@ -1271,7 +1267,7 @@ public class TouchInteractionService extends Service {
                        getBaseContext(), mDeviceState, mInputMonitorCompat);
            }

            if (ENABLE_TRACKPAD_GESTURE.get() && mGestureState.isTrackpadGesture()
            if (mGestureState.isTrackpadGesture()
                    && canStartSystemGesture && !previousGestureState.isRecentsAnimationRunning()) {
                reasonString = newCompoundString(reasonPrefix)
                        .append(SUBSTRING_PREFIX)
Loading