diff --git a/service/src/com/android/car/user/CarUserService.java b/service/src/com/android/car/user/CarUserService.java
index eebb9d1..8716aed 100644
--- a/service/src/com/android/car/user/CarUserService.java
+++ b/service/src/com/android/car/user/CarUserService.java
@@ -95,8 +95,7 @@
             int currentUser = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1);
             if (currentUser > UserHandle.USER_SYSTEM
                         && mCarUserManagerHelper.isPersistentUser(currentUser)) {
-                mCarUserManagerHelper.setLastActiveUser(
-                        currentUser, /* skipGlobalSetting= */ false);
+                mCarUserManagerHelper.setLastActiveUser(currentUser);
             }
         }
     }
diff --git a/tests/carservice_unit_test/src/com/android/car/CarUserManagerHelperTest.java b/tests/carservice_unit_test/src/com/android/car/CarUserManagerHelperTest.java
index 83b1b29..f731bec 100644
--- a/tests/carservice_unit_test/src/com/android/car/CarUserManagerHelperTest.java
+++ b/tests/carservice_unit_test/src/com/android/car/CarUserManagerHelperTest.java
@@ -39,6 +39,7 @@
 import android.os.SystemProperties;
 import android.os.UserHandle;
 import android.os.UserManager;
+import android.provider.Settings;
 import android.support.test.InstrumentationRegistry;
 import android.support.test.filters.SmallTest;
 import android.support.test.runner.AndroidJUnit4;
@@ -91,6 +92,8 @@
         doReturn(mActivityManager).when(mContext).getSystemService(Context.ACTIVITY_SERVICE);
         doReturn(InstrumentationRegistry.getTargetContext().getResources())
                 .when(mContext).getResources();
+        doReturn(InstrumentationRegistry.getTargetContext().getContentResolver())
+                .when(mContext).getContentResolver();
         doReturn(mContext).when(mContext).getApplicationContext();
         mCarUserManagerHelper = new CarUserManagerHelper(mContext);
 
@@ -776,8 +779,7 @@
         UserInfo otherUser2 = createUserInfoForId(lastActiveUserId - 1);
         UserInfo otherUser3 = createUserInfoForId(lastActiveUserId);
 
-        mCarUserManagerHelper.setLastActiveUser(
-                lastActiveUserId, /* skipGlobalSettings= */ true);
+        setLastActiveUser(lastActiveUserId);
         mockGetUsers(mSystemUser, otherUser1, otherUser2, otherUser3);
 
         assertThat(mCarUserManagerHelper.getInitialUser()).isEqualTo(lastActiveUserId);
@@ -791,8 +793,7 @@
         UserInfo otherUser1 = createUserInfoForId(lastActiveUserId - 2);
         UserInfo otherUser2 = createUserInfoForId(lastActiveUserId - 1);
 
-        mCarUserManagerHelper.setLastActiveUser(
-                lastActiveUserId, /* skipGlobalSettings= */ true);
+        setLastActiveUser(lastActiveUserId);
         mockGetUsers(mSystemUser, otherUser1, otherUser2);
 
         assertThat(mCarUserManagerHelper.getInitialUser()).isEqualTo(lastActiveUserId - 2);
@@ -842,4 +843,9 @@
         }
         doReturn(testUsers).when(mUserManager).getUsers(true);
     }
+
+    private void setLastActiveUser(int userId) {
+        Settings.Global.putInt(InstrumentationRegistry.getTargetContext().getContentResolver(),
+                Settings.Global.LAST_ACTIVE_USER_ID, userId);
+    }
 }
diff --git a/tests/carservice_unit_test/src/com/android/car/user/CarUserServiceTest.java b/tests/carservice_unit_test/src/com/android/car/user/CarUserServiceTest.java
index addb53c..2e3386b 100644
--- a/tests/carservice_unit_test/src/com/android/car/user/CarUserServiceTest.java
+++ b/tests/carservice_unit_test/src/com/android/car/user/CarUserServiceTest.java
@@ -152,8 +152,7 @@
 
         mCarUserService.onReceive(mMockContext, intent);
 
-        verify(mCarUserManagerHelper).setLastActiveUser(
-                lastActiveUserId, /* skipGlobalSetting= */ false);
+        verify(mCarUserManagerHelper).setLastActiveUser(lastActiveUserId);
     }
 
     /**
diff --git a/user/car-user-lib/src/android/car/userlib/CarUserManagerHelper.java b/user/car-user-lib/src/android/car/userlib/CarUserManagerHelper.java
index fdf3ade..bb3976f 100644
--- a/user/car-user-lib/src/android/car/userlib/CarUserManagerHelper.java
+++ b/user/car-user-lib/src/android/car/userlib/CarUserManagerHelper.java
@@ -84,7 +84,6 @@
     private final Context mContext;
     private final UserManager mUserManager;
     private final ActivityManager mActivityManager;
-    private int mLastActiveUser = UserHandle.USER_SYSTEM;
     private Bitmap mDefaultGuestUserIcon;
     private ArrayList<OnUsersUpdateListener> mUpdateListeners;
     private final BroadcastReceiver mUserChangeReceiver = new BroadcastReceiver() {
@@ -164,10 +163,21 @@
      * Set last active user.
      *
      * @param userId last active user id.
-     * @param skipGlobalSetting whether to skip set the global settings value.
      */
+    public void setLastActiveUser(int userId) {
+        Settings.Global.putInt(
+                mContext.getContentResolver(), Settings.Global.LAST_ACTIVE_USER_ID, userId);
+    }
+
+    /**
+     * Set last active user.
+     *
+     * @param userId last active user id.
+     * @param skipGlobalSetting whether to skip set the global settings value.
+     * @deprecated Use {@link #setDefaultBootUser(int)} instead.
+     */
+    @Deprecated
     public void setLastActiveUser(int userId, boolean skipGlobalSetting) {
-        mLastActiveUser = userId;
         if (!skipGlobalSetting) {
             Settings.Global.putInt(
                     mContext.getContentResolver(), Settings.Global.LAST_ACTIVE_USER_ID, userId);
@@ -192,9 +202,6 @@
      * @return user id of the last active user.
      */
     public int getLastActiveUser() {
-        if (mLastActiveUser != UserHandle.USER_SYSTEM) {
-            return mLastActiveUser;
-        }
         return Settings.Global.getInt(
             mContext.getContentResolver(), Settings.Global.LAST_ACTIVE_USER_ID,
             /* default user id= */ UserHandle.USER_SYSTEM);
