File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -302,8 +302,6 @@ private void showPopupUnchecked(int maxActivityCount) {
302302
303303 getViewTreeObserver ().addOnGlobalLayoutListener (mOnGlobalLayoutListener );
304304
305- mAdapter .setMaxActivityCount (maxActivityCount );
306-
307305 final boolean defaultActivityButtonShown =
308306 mDefaultActivityButton .getVisibility () == VISIBLE ;
309307
@@ -312,8 +310,10 @@ private void showPopupUnchecked(int maxActivityCount) {
312310 if (maxActivityCount != ActivityChooserViewAdapter .MAX_ACTIVITY_COUNT_UNLIMITED
313311 && activityCount > maxActivityCount + maxActivityCountOffset ) {
314312 mAdapter .setShowFooterView (true );
313+ mAdapter .setMaxActivityCount (maxActivityCount - 1 );
315314 } else {
316315 mAdapter .setShowFooterView (false );
316+ mAdapter .setMaxActivityCount (maxActivityCount );
317317 }
318318
319319 ListPopupWindow popupWindow = getListPopupWindow ();
You can’t perform that action at this time.
0 commit comments