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

Commit 260d6c6e authored by Sumir Kataria's avatar Sumir Kataria Committed by Android (Google) Code Review
Browse files

Merge "Use placeholderCount-1 if using default layout." into oc-dev

parents 00496c40 db688af9
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1341,6 +1341,8 @@ public class ResolverActivity extends Activity {
            mPlaceholderCount = count;
        }

        public int getPlaceholderCount() { return mPlaceholderCount; }

        @Nullable
        public DisplayResolveInfo getFilteredItem() {
            if (mFilterLastUsed && mLastChosenPosition >= 0) {
@@ -1447,7 +1449,11 @@ public class ResolverActivity extends Activity {
                }

                if (currentResolveList.size() > 1) {
                    setPlaceholderCount(currentResolveList.size());
                    int placeholderCount = currentResolveList.size();
                    if (useLayoutWithDefault()) {
                        --placeholderCount;
                    }
                    setPlaceholderCount(placeholderCount);
                    AsyncTask<List<ResolvedComponentInfo>,
                            Void,
                            List<ResolvedComponentInfo>> sortingTask =
+1 −0
Original line number Diff line number Diff line
@@ -116,6 +116,7 @@ public class ResolverActivityTest {

        // The other entry is filtered to the last used slot
        assertThat(activity.getAdapter().getCount(), is(1));
        assertThat(activity.getAdapter().getPlaceholderCount(), is(1));

        ResolveInfo[] chosen = new ResolveInfo[1];
        sOverrides.onSafelyStartCallback = targetInfo -> {