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

Commit 2366ff12 authored by Adam Powell's avatar Adam Powell
Browse files

ResolverComparator transitivity

Fix a bug where ResolverComparator's results were not consistent for
targets that cross profile boundaries.

Bug: 31640894
Change-Id: Ic6bf9512d2c2eb6f8fb7851e18eb9a347db29755
parent 18fb24c5
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -157,7 +157,10 @@ class ResolverComparator implements Comparator<ResolvedComponentInfo> {

        // We want to put the one targeted to another user at the end of the dialog.
        if (lhs.targetUserId != UserHandle.USER_CURRENT) {
            return 1;
            return rhs.targetUserId != UserHandle.USER_CURRENT ? 0 : 1;
        }
        if (rhs.targetUserId != UserHandle.USER_CURRENT) {
            return -1;
        }

        if (mHttp) {