diff --git a/packages/CarSystemUI/src/com/android/systemui/navigationbar/car/CarNavigationBar.java b/packages/CarSystemUI/src/com/android/systemui/navigationbar/car/CarNavigationBar.java
index b2c16b3..2045527 100644
--- a/packages/CarSystemUI/src/com/android/systemui/navigationbar/car/CarNavigationBar.java
+++ b/packages/CarSystemUI/src/com/android/systemui/navigationbar/car/CarNavigationBar.java
@@ -245,6 +245,10 @@
         if (mKeyguardStateControllerLazy.get().isShowing()) {
             mCarNavigationBarController.showAllKeyguardButtons(isDeviceSetupForUser());
         }
+
+        // Upon restarting the Navigation Bar, CarFacetButtonController should immediately apply the
+        // selection state that reflects the current task stack.
+        mButtonSelectionStateListener.onTaskStackChanged();
     }
 
     private boolean isDeviceSetupForUser() {
diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/navigationbar/car/CarNavigationBarTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/navigationbar/car/CarNavigationBarTest.java
new file mode 100644
index 0000000..c04e47f
--- /dev/null
+++ b/packages/CarSystemUI/tests/src/com/android/systemui/navigationbar/car/CarNavigationBarTest.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.navigationbar.car;
+
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.os.Handler;
+import android.test.suitebuilder.annotation.SmallTest;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
+import android.testing.TestableResources;
+import android.view.LayoutInflater;
+import android.view.WindowManager;
+
+import com.android.systemui.R;
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.car.CarDeviceProvisionedController;
+import com.android.systemui.plugins.DarkIconDispatcher;
+import com.android.systemui.statusbar.CommandQueue;
+import com.android.systemui.statusbar.NavigationBarController;
+import com.android.systemui.statusbar.SuperStatusBarViewFactory;
+import com.android.systemui.statusbar.phone.AutoHideController;
+import com.android.systemui.statusbar.phone.StatusBarIconController;
+import com.android.systemui.statusbar.phone.StatusBarWindowView;
+import com.android.systemui.statusbar.policy.KeyguardStateController;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import dagger.Lazy;
+
+@RunWith(AndroidTestingRunner.class)
+@TestableLooper.RunWithLooper
+@SmallTest
+public class CarNavigationBarTest extends SysuiTestCase {
+
+    private CarNavigationBar mCarNavigationBar;
+    private TestableResources mTestableResources;
+    private Handler mHandler;
+
+    @Mock
+    private CarNavigationBarController mCarNavigationBarController;
+    @Mock
+    private WindowManager mWindowManager;
+    @Mock
+    private CarDeviceProvisionedController mDeviceProvisionedController;
+    @Mock
+    private AutoHideController mAutoHideController;
+    @Mock
+    private ButtonSelectionStateListener mButtonSelectionStateListener;
+    @Mock
+    private Lazy<KeyguardStateController> mKeyguardStateControllerLazy;
+    @Mock
+    private KeyguardStateController mKeyguardStateController;
+    @Mock
+    private Lazy<NavigationBarController> mNavigationBarControllerLazy;
+    @Mock
+    private NavigationBarController mNavigationBarController;
+    @Mock
+    private SuperStatusBarViewFactory mSuperStatusBarViewFactory;
+    @Mock
+    private ButtonSelectionStateController mButtonSelectionStateController;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mTestableResources = mContext.getOrCreateTestableResources();
+        mTestableResources.addOverride(R.bool.config_enableBottomNavigationBar, true);
+        mHandler = Handler.getMain();
+        mCarNavigationBar = new CarNavigationBar(mContext, mCarNavigationBarController,
+                mWindowManager, mDeviceProvisionedController, new CommandQueue(mContext),
+                mAutoHideController, mButtonSelectionStateListener, mHandler,
+                mKeyguardStateControllerLazy, mNavigationBarControllerLazy,
+                mSuperStatusBarViewFactory, mButtonSelectionStateController);
+        StatusBarWindowView statusBarWindowView = (StatusBarWindowView) LayoutInflater.from(
+                mContext).inflate(R.layout.super_status_bar, /* root= */ null);
+        when(mSuperStatusBarViewFactory.getStatusBarWindowView()).thenReturn(statusBarWindowView);
+        when(mNavigationBarControllerLazy.get()).thenReturn(mNavigationBarController);
+        when(mKeyguardStateControllerLazy.get()).thenReturn(mKeyguardStateController);
+        when(mKeyguardStateController.isShowing()).thenReturn(false);
+        mDependency.injectMockDependency(WindowManager.class);
+        // Needed to inflate top navigation bar.
+        mDependency.injectMockDependency(DarkIconDispatcher.class);
+        mDependency.injectMockDependency(StatusBarIconController.class);
+    }
+
+    @Test
+    public void restartNavbars_refreshesTaskChanged() {
+        ArgumentCaptor<CarDeviceProvisionedController.DeviceProvisionedListener>
+                deviceProvisionedCallbackCaptor = ArgumentCaptor.forClass(
+                CarDeviceProvisionedController.DeviceProvisionedListener.class);
+        when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(true);
+        mCarNavigationBar.start();
+        // switching the currentUserSetup value to force restart the navbars.
+        when(mDeviceProvisionedController.isCurrentUserSetup()).thenReturn(false);
+        verify(mDeviceProvisionedController).addCallback(deviceProvisionedCallbackCaptor.capture());
+
+        deviceProvisionedCallbackCaptor.getValue().onUserSwitched();
+        waitForIdleSync(mHandler);
+
+        verify(mButtonSelectionStateListener).onTaskStackChanged();
+    }
+}
