Don't re-order users in the lock screen / quick settings user switcher.
Keep the position of users static to reduce (perceived) jank of user switching. Bug:146426568 Test: Manual Change-Id: Id6f544803531ee2121d885909f88f907c3bb4957
This commit is contained in:
@@ -236,8 +236,7 @@ public class UserSwitcherController implements Dumpable {
|
||||
picture, avatarSize, avatarSize, true);
|
||||
}
|
||||
}
|
||||
int index = isCurrent ? 0 : records.size();
|
||||
records.add(index, new UserRecord(info, picture, false /* isGuest */,
|
||||
records.add(new UserRecord(info, picture, false /* isGuest */,
|
||||
isCurrent, false /* isAddUser */, false /* isRestricted */,
|
||||
switchToEnabled));
|
||||
}
|
||||
@@ -269,8 +268,7 @@ public class UserSwitcherController implements Dumpable {
|
||||
records.add(guestRecord);
|
||||
}
|
||||
} else {
|
||||
int index = guestRecord.isCurrent ? 0 : records.size();
|
||||
records.add(index, guestRecord);
|
||||
records.add(guestRecord);
|
||||
}
|
||||
|
||||
if (canCreateUser) {
|
||||
|
||||
Reference in New Issue
Block a user