Loading core/java/com/android/internal/app/ChooserActivity.java +13 −6 Original line number Original line Diff line number Diff line Loading @@ -2418,13 +2418,20 @@ public class ChooserActivity extends ResolverActivity implements if (isLayoutUpdated if (isLayoutUpdated || mLastNumberOfChildren != recyclerView.getChildCount()) { || mLastNumberOfChildren != recyclerView.getChildCount()) { mCurrAvailableWidth = availableWidth; mCurrAvailableWidth = availableWidth; if (isLayoutUpdated if (isLayoutUpdated) { && mChooserMultiProfilePagerAdapter.getCurrentUserHandle() != getUser()) { // It is very important we call setAdapter from here. Otherwise in some cases // This fixes b/150936654 - empty work tab in share sheet when swiping // the resolver list doesn't get populated, such as b/150922090, b/150918223 mChooserMultiProfilePagerAdapter.getActiveAdapterView() // and b/150936654 .setAdapter(mChooserMultiProfilePagerAdapter.getCurrentRootAdapter()); recyclerView.setAdapter(gridAdapter); ((GridLayoutManager) recyclerView.getLayoutManager()).setSpanCount( gridAdapter.getMaxTargetsPerRow()); } if (mChooserMultiProfilePagerAdapter.getCurrentUserHandle() != getUser()) { return; return; } else if (mChooserMultiProfilePagerAdapter.getCurrentUserHandle() != getUser()) { } if (mLastNumberOfChildren == recyclerView.getChildCount()) { return; return; } } Loading Loading
core/java/com/android/internal/app/ChooserActivity.java +13 −6 Original line number Original line Diff line number Diff line Loading @@ -2418,13 +2418,20 @@ public class ChooserActivity extends ResolverActivity implements if (isLayoutUpdated if (isLayoutUpdated || mLastNumberOfChildren != recyclerView.getChildCount()) { || mLastNumberOfChildren != recyclerView.getChildCount()) { mCurrAvailableWidth = availableWidth; mCurrAvailableWidth = availableWidth; if (isLayoutUpdated if (isLayoutUpdated) { && mChooserMultiProfilePagerAdapter.getCurrentUserHandle() != getUser()) { // It is very important we call setAdapter from here. Otherwise in some cases // This fixes b/150936654 - empty work tab in share sheet when swiping // the resolver list doesn't get populated, such as b/150922090, b/150918223 mChooserMultiProfilePagerAdapter.getActiveAdapterView() // and b/150936654 .setAdapter(mChooserMultiProfilePagerAdapter.getCurrentRootAdapter()); recyclerView.setAdapter(gridAdapter); ((GridLayoutManager) recyclerView.getLayoutManager()).setSpanCount( gridAdapter.getMaxTargetsPerRow()); } if (mChooserMultiProfilePagerAdapter.getCurrentUserHandle() != getUser()) { return; return; } else if (mChooserMultiProfilePagerAdapter.getCurrentUserHandle() != getUser()) { } if (mLastNumberOfChildren == recyclerView.getChildCount()) { return; return; } } Loading