Merge "Fix "always" option in ResolverActivity" into tm-dev am: 926db2d6d3

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17943621

Change-Id: I5cbd1b15815d0b09ea148d53daa77d0f729edd1a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-04-27 14:12:59 +00:00
committed by Automerger Merge Worker

View File

@@ -233,8 +233,14 @@ public class ResolverListAdapter extends BaseAdapter {
// copied the original unfiltered items to a separate List instance and can now filter // copied the original unfiltered items to a separate List instance and can now filter
// the remainder in-place without any further bookkeeping. // the remainder in-place without any further bookkeeping.
boolean needsCopyOfUnfiltered = (mUnfilteredResolveList == currentResolveList); boolean needsCopyOfUnfiltered = (mUnfilteredResolveList == currentResolveList);
mUnfilteredResolveList = performSecondaryResolveListFiltering( List<ResolvedComponentInfo> originalList = performSecondaryResolveListFiltering(
currentResolveList, needsCopyOfUnfiltered); currentResolveList, needsCopyOfUnfiltered);
if (originalList != null) {
// Only need the originalList value if there was a modification (otherwise it's null
// and shouldn't overwrite mUnfilteredResolveList).
mUnfilteredResolveList = originalList;
}
return finishRebuildingListWithFilteredResults(currentResolveList, doPostProcessing); return finishRebuildingListWithFilteredResults(currentResolveList, doPostProcessing);
} }
@@ -293,7 +299,7 @@ public class ResolverListAdapter extends BaseAdapter {
* appearing in the rebuilt-list results, while still considering those items for the "other * appearing in the rebuilt-list results, while still considering those items for the "other
* profile" special-treatment described in {@code rebuildList()}. * profile" special-treatment described in {@code rebuildList()}.
* *
* @return the same (possibly null) List reference as {@code currentResolveList}, if the list is * @return the same (possibly null) List reference as {@code currentResolveList} if the list is
* unmodified as a result of filtering; or, if some item(s) were removed, then either a copy of * unmodified as a result of filtering; or, if some item(s) were removed, then either a copy of
* the original {@code currentResolveList} (if {@code returnCopyOfOriginalListIfModified} is * the original {@code currentResolveList} (if {@code returnCopyOfOriginalListIfModified} is
* true), or null (otherwise). * true), or null (otherwise).