Merge "Merge "Call setAdapter from handleLayoutChange for the other profile" into rvc-dev am: 5527ace031 am: 7eabb04fb9" into rvc-d1-dev-plus-aosp am: 967a7243f3
Change-Id: Ic52086a7cbd8bb54302eb8626cea92a21a833591
This commit is contained in:
@@ -2398,17 +2398,20 @@ public class ChooserActivity extends ResolverActivity implements
|
||||
}
|
||||
|
||||
final int availableWidth = right - left - v.getPaddingLeft() - v.getPaddingRight();
|
||||
if (mChooserMultiProfilePagerAdapter.getCurrentUserHandle() != getUser()) {
|
||||
gridAdapter.calculateChooserTargetWidth(availableWidth);
|
||||
return;
|
||||
}
|
||||
|
||||
if (gridAdapter.consumeLayoutRequest()
|
||||
boolean isLayoutUpdated = gridAdapter.consumeLayoutRequest()
|
||||
|| gridAdapter.calculateChooserTargetWidth(availableWidth)
|
||||
|| recyclerView.getAdapter() == null
|
||||
|| mLastNumberOfChildren != recyclerView.getChildCount()
|
||||
|| availableWidth != mCurrAvailableWidth) {
|
||||
|| availableWidth != mCurrAvailableWidth;
|
||||
if (isLayoutUpdated
|
||||
|| mLastNumberOfChildren != recyclerView.getChildCount()) {
|
||||
mCurrAvailableWidth = availableWidth;
|
||||
if (isLayoutUpdated
|
||||
&& mChooserMultiProfilePagerAdapter.getCurrentUserHandle() != getUser()) {
|
||||
// This fixes b/150936654 - empty work tab in share sheet when swiping
|
||||
mChooserMultiProfilePagerAdapter.getActiveAdapterView()
|
||||
.setAdapter(mChooserMultiProfilePagerAdapter.getCurrentRootAdapter());
|
||||
return;
|
||||
}
|
||||
|
||||
getMainThreadHandler().post(() -> {
|
||||
if (mResolverDrawerLayout == null || gridAdapter == null) {
|
||||
|
||||
Reference in New Issue
Block a user