ResolverComparator transitivity
Fix a bug where ResolverComparator's results were not consistent for targets that cross profile boundaries. Bug: 31640894 Change-Id: Ic6bf9512d2c2eb6f8fb7851e18eb9a347db29755
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user