Merge "Import translations. DO NOT MERGE ANYWHERE"
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index b9d104a..a7e0eec 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -525,7 +525,7 @@
      * @return UserInfo of the user or null for non-existent user.
      */
     public static UserInfo getExistingUser(UserManager userManager, UserHandle checkUser) {
-        final List<UserInfo> users = userManager.getUsers(true /* excludeDying */);
+        final List<UserInfo> users = userManager.getAliveUsers();
         final int checkUserId = checkUser.getIdentifier();
         for (UserInfo user : users) {
             if (user.id == checkUserId) {
diff --git a/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java b/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
index 7aad245..6817bd6 100755
--- a/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
+++ b/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
@@ -526,7 +526,7 @@
 
     @VisibleForTesting
     int getNumberOfUserWithPackageInstalled(String packageName) {
-        final List<UserInfo> userInfos = mUserManager.getUsers(true);
+        final List<UserInfo> userInfos = mUserManager.getAliveUsers();
         int count = 0;
 
         for (final UserInfo userInfo : userInfos) {
diff --git a/src/com/android/settings/users/UserDetailsSettings.java b/src/com/android/settings/users/UserDetailsSettings.java
index 897b3c7..53d9849 100644
--- a/src/com/android/settings/users/UserDetailsSettings.java
+++ b/src/com/android/settings/users/UserDetailsSettings.java
@@ -309,7 +309,7 @@
             // Update the guest's restrictions, if there is a guest
             // TODO: Maybe setDefaultGuestRestrictions() can internally just set the restrictions
             // on any existing guest rather than do it here with multiple Binder calls.
-            List<UserInfo> users = mUserManager.getUsers(true);
+            List<UserInfo> users = mUserManager.getAliveUsers();
             for (UserInfo user : users) {
                 if (user.isGuest()) {
                     UserHandle userHandle = UserHandle.of(user.id);
diff --git a/src/com/android/settings/users/UserSettings.java b/src/com/android/settings/users/UserSettings.java
index 9669190..8bfac91 100644
--- a/src/com/android/settings/users/UserSettings.java
+++ b/src/com/android/settings/users/UserSettings.java
@@ -820,7 +820,7 @@
         if (context == null) {
             return;
         }
-        final List<UserInfo> users = mUserManager.getUsers(true);
+        final List<UserInfo> users = mUserManager.getAliveUsers();
 
         final ArrayList<Integer> missingIcons = new ArrayList<>();
         final ArrayList<UserPreference> userPreferences = new ArrayList<>();
diff --git a/tests/robotests/src/com/android/settings/applications/appinfo/AppInfoDashboardFragmentTest.java b/tests/robotests/src/com/android/settings/applications/appinfo/AppInfoDashboardFragmentTest.java
index e46cd06..95d7659 100644
--- a/tests/robotests/src/com/android/settings/applications/appinfo/AppInfoDashboardFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/applications/appinfo/AppInfoDashboardFragmentTest.java
@@ -297,7 +297,7 @@
         final List<UserInfo> userInfos = new ArrayList<>();
         userInfos.add(new UserInfo(userID1, "User1", UserInfo.FLAG_PRIMARY));
         userInfos.add(new UserInfo(userID2, "yue", UserInfo.FLAG_GUEST));
-        when(mUserManager.getUsers(true)).thenReturn(userInfos);
+        when(mUserManager.getAliveUsers()).thenReturn(userInfos);
         final ApplicationInfo appInfo = new ApplicationInfo();
         appInfo.flags = ApplicationInfo.FLAG_INSTALLED;
         when(mPackageManager.getApplicationInfoAsUser(
@@ -320,7 +320,7 @@
         final List<UserInfo> userInfos = new ArrayList<>();
         userInfos.add(new UserInfo(userID1, "User1", UserInfo.FLAG_PRIMARY));
         userInfos.add(new UserInfo(userID2, "yue", UserInfo.FLAG_GUEST));
-        when(mUserManager.getUsers(true)).thenReturn(userInfos);
+        when(mUserManager.getAliveUsers()).thenReturn(userInfos);
         final ApplicationInfo appInfo = new ApplicationInfo();
         appInfo.flags = ApplicationInfo.FLAG_INSTALLED;
         when(mPackageManager.getApplicationInfoAsUser(
diff --git a/tests/robotests/src/com/android/settings/users/UserSettingsTest.java b/tests/robotests/src/com/android/settings/users/UserSettingsTest.java
index 2057788..27c90b0 100644
--- a/tests/robotests/src/com/android/settings/users/UserSettingsTest.java
+++ b/tests/robotests/src/com/android/settings/users/UserSettingsTest.java
@@ -23,7 +23,6 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.ArgumentMatchers.notNull;
@@ -575,7 +574,7 @@
 
         verify(mUserManager, never()).getUserIcon(anyInt());
         // updateUserList should be called only once
-        verify(mUserManager).getUsers(true);
+        verify(mUserManager).getAliveUsers();
     }
 
     @Test
@@ -592,7 +591,7 @@
 
         verify(mUserManager).getUserIcon(ACTIVE_USER_ID);
         // updateUserList should be called another time after loading the icons
-        verify(mUserManager, times(2)).getUsers(true);
+        verify(mUserManager, times(2)).getAliveUsers();
     }
 
     @Test
@@ -672,7 +671,7 @@
     private void givenUsers(UserInfo... userInfo) {
         List<UserInfo> users = Arrays.asList(userInfo);
         doReturn(users).when(mUserManager).getUsers();
-        doReturn(users).when(mUserManager).getUsers(anyBoolean());
+        doReturn(users).when(mUserManager).getAliveUsers();
     }
 
     private static void removeFlag(UserInfo userInfo, int flag) {