diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 6f81f59..4439266 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -73,6 +73,7 @@
 import com.android.launcher3.folder.Folder;
 import com.android.launcher3.folder.FolderIcon;
 import com.android.launcher3.logging.UserEventDispatcher;
+import com.android.launcher3.pageindicators.PageIndicatorLine;
 import com.android.launcher3.userevent.nano.LauncherLogProto;
 import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
 import com.android.launcher3.util.LongArrayMap;
@@ -803,6 +804,8 @@
                     if (stripEmptyScreens) {
                         stripEmptyScreens();
                     }
+                    // Update the page indicator to reflect the removed page.
+                    showPageIndicatorAtCurrentScroll();
                 }
             }
         };
@@ -1642,8 +1645,6 @@
             if (listener != null) {
                 getPageIndicator().setOnClickListener(listener);
             }
-
-            showPageIndicatorAtCurrentScroll();
         }
 
         // Update wallpaper dimensions if they were changed since last onResume
@@ -2048,6 +2049,9 @@
 
     @Override
     public void onLauncherTransitionStart(Launcher l, boolean animated, boolean toWorkspace) {
+        if (mPageIndicator instanceof PageIndicatorLine) {
+            ((PageIndicatorLine) mPageIndicator).setShouldAutoHide(mState != State.SPRING_LOADED);
+        }
     }
 
     @Override
@@ -2061,7 +2065,7 @@
         updateChildrenLayersEnabled(false);
         showCustomContentIfNecessary();
         mForceDrawAdjacentPages = false;
-        if (mState == State.NORMAL || mState == State.SPRING_LOADED) {
+        if (mState == State.SPRING_LOADED) {
             showPageIndicatorAtCurrentScroll();
         }
     }
diff --git a/src/com/android/launcher3/pageindicators/PageIndicatorLine.java b/src/com/android/launcher3/pageindicators/PageIndicatorLine.java
index a358e7b..bfb4f33 100644
--- a/src/com/android/launcher3/pageindicators/PageIndicatorLine.java
+++ b/src/com/android/launcher3/pageindicators/PageIndicatorLine.java
@@ -14,7 +14,6 @@
 import android.util.AttributeSet;
 import android.util.Log;
 import android.util.Property;
-import android.view.View;
 import android.view.ViewConfiguration;
 
 import com.android.launcher3.Utilities;
@@ -33,7 +32,9 @@
     public static final int WHITE_ALPHA = (int) (0.70f * 255);
     public static final int BLACK_ALPHA = (int) (0.65f * 255);
 
-    private final Handler mHandler = new Handler(Looper.getMainLooper());
+    private final Handler mDelayedLineFadeHandler = new Handler(Looper.getMainLooper());
+
+    private boolean mShouldAutoHide = true;
 
     private ValueAnimator mLineAlphaAnimator;
     private int mAlpha = 0;
@@ -97,9 +98,14 @@
         mProgress = Utilities.boundToRange(((float) currentScroll) / totalScroll, 0f, 1f);;
         invalidate();
 
-        // Hide after a brief period.
-        mHandler.removeCallbacksAndMessages(null);
-        mHandler.postDelayed(mHideLineRunnable, LINE_FADE_DELAY);
+        if (mShouldAutoHide) {
+            hideAfterDelay();
+        }
+    }
+
+    private void hideAfterDelay() {
+        mDelayedLineFadeHandler.removeCallbacksAndMessages(null);
+        mDelayedLineFadeHandler.postDelayed(mHideLineRunnable, LINE_FADE_DELAY);
     }
 
     @Override
@@ -111,6 +117,15 @@
         invalidate();
     }
 
+    public void setShouldAutoHide(boolean shouldAutoHide) {
+        mShouldAutoHide = shouldAutoHide;
+        if (shouldAutoHide && mLinePaint.getAlpha() > 0) {
+            hideAfterDelay();
+        } else if (!shouldAutoHide) {
+            mDelayedLineFadeHandler.removeCallbacksAndMessages(null);
+        }
+    }
+
     /**
      * The line's color will be:
      * - mostly opaque white if the hotseat is white (ignoring alpha)
