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

Commit f10b0d00 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixes NPE thrown in sort if new targets are added." into oc-mr1-dev

parents 9174e877 0935f152
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -337,6 +337,7 @@ class ResolverComparator implements Comparator<ResolvedComponentInfo> {
                final ResolverTarget rhsTarget = mTargetsDict.get(new ComponentName(
                        rhs.activityInfo.packageName, rhs.activityInfo.name));

                if (lhsTarget != null && rhsTarget != null) {
                    final int selectProbabilityDiff = Float.compare(
                        rhsTarget.getSelectProbability(), lhsTarget.getSelectProbability());

@@ -345,6 +346,7 @@ class ResolverComparator implements Comparator<ResolvedComponentInfo> {
                    }
                }
            }
        }

        CharSequence  sa = lhs.loadLabel(mPm);
        if (sa == null) sa = lhs.activityInfo.name;