diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
index 3139e4d..2f13c5d 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
@@ -472,10 +472,6 @@
     public void onDestroy() {
         mAppTransitionManager.onActivityDestroyed();
         if (mUnfoldTransitionProgressProvider != null) {
-            if (FeatureFlags.RECEIVE_UNFOLD_EVENTS_FROM_SYSUI.get()) {
-                SystemUiProxy.INSTANCE.get(this).setUnfoldAnimationListener(null);
-            }
-
             mUnfoldTransitionProgressProvider.destroy();
         }
 
diff --git a/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java b/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java
index e0b5272..6d15e8b 100644
--- a/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java
+++ b/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java
@@ -60,8 +60,6 @@
     private final NaturalRotationUnfoldProgressProvider mNaturalOrientationProgressProvider;
     private final UnfoldMoveFromCenterHotseatAnimator mUnfoldMoveFromCenterHotseatAnimator;
     private final UnfoldMoveFromCenterWorkspaceAnimator mUnfoldMoveFromCenterWorkspaceAnimator;
-    private final TransitionStatusProvider mExternalTransitionStatusProvider =
-            new TransitionStatusProvider();
     private PreemptiveUnfoldTransitionProgressProvider mPreemptiveProgressProvider = null;
     private Boolean mIsTablet = null;
 
@@ -90,8 +88,6 @@
                     unfoldTransitionProgressProvider);
         }
 
-        unfoldTransitionProgressProvider.addCallback(mExternalTransitionStatusProvider);
-
         mUnfoldMoveFromCenterHotseatAnimator = new UnfoldMoveFromCenterHotseatAnimator(launcher,
                 windowManager, rotationChangeProvider);
         mUnfoldMoveFromCenterWorkspaceAnimator = new UnfoldMoveFromCenterWorkspaceAnimator(launcher,
@@ -170,26 +166,11 @@
         }
 
         if (mIsTablet != null && dp.isTablet != mIsTablet) {
-            // We should preemptively start the animation only if:
-            // - We changed to the unfolded screen
-            // - SystemUI IPC connection is alive, so we won't end up in a situation that we won't
-            //   receive transition progress events from SystemUI later because there was no
-            //   IPC connection established (e.g. because of SystemUI crash)
-            // - SystemUI has not already sent unfold animation progress events. This might happen
-            //   if Launcher was not open during unfold, in this case we receive the configuration
-            //   change only after we went back to home screen and we don't want to start the
-            //   animation in this case.
-            if (dp.isTablet
-                    && SystemUiProxy.INSTANCE.get(mLauncher).isActive()
-                    && !mExternalTransitionStatusProvider.hasRun()) {
+            if (dp.isTablet && SystemUiProxy.INSTANCE.get(mLauncher).isActive()) {
                 // Preemptively start the unfold animation to make sure that we have drawn
                 // the first frame of the animation before the screen gets unblocked
                 preemptivelyStartAnimationOnNextFrame();
             }
-
-            if (!dp.isTablet) {
-                mExternalTransitionStatusProvider.onFolded();
-            }
         }
 
         mIsTablet = dp.isTablet;
@@ -241,48 +222,4 @@
             HOTSEAT_SCALE_PROPERTY.setValue(mLauncher.getHotseat(), value);
         }
     }
-
-    /**
-     * Class to track the current status of the external transition provider (the events are coming
-     * from the SystemUI side through IPC), it allows to check if the transition has already
-     * finished or currently running on the SystemUI side since last unfold.
-     */
-    private static class TransitionStatusProvider implements TransitionProgressListener {
-
-        private boolean mHasRun = false;
-
-        @Override
-        public void onTransitionStarted() {
-            markAsRun();
-        }
-
-        @Override
-        public void onTransitionProgress(float progress) {
-            markAsRun();
-        }
-
-        @Override
-        public void onTransitionFinished() {
-            markAsRun();
-        }
-
-        /**
-         * Called when the device is folded, so we can reset the status of the animation
-         */
-        public void onFolded() {
-            mHasRun = false;
-        }
-
-        /**
-         * Returns true if there was an animation already (or it is currently running) after
-         * unfolding the device
-         */
-        public boolean hasRun() {
-            return mHasRun;
-        }
-
-        private void markAsRun() {
-            mHasRun = true;
-        }
-    }
 }
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index 76574b6..b255ea8 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -302,7 +302,7 @@
             "Enable widget transition animation when resizing the widgets");
 
     public static final BooleanFlag PREEMPTIVE_UNFOLD_ANIMATION_START = getDebugFlag(270397209,
-            "PREEMPTIVE_UNFOLD_ANIMATION_START", ENABLED,
+            "PREEMPTIVE_UNFOLD_ANIMATION_START", DISABLED,
             "Enables starting the unfold animation preemptively when unfolding, without"
                     + "waiting for SystemUI and then merging the SystemUI progress whenever we "
                     + "start receiving the events");
