Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4658080a authored by Ben Murdoch's avatar Ben Murdoch
Browse files

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
parent b7c16ecf
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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) {