Merge "Merge "Fix NPE in sharesheet on devices without Work Profile." into rvc-dev am: 58bb12f7f8 am: 14ae5d77ee am: 57962cd18b" into rvc-qpr-dev-plus-aosp am: f3333136f4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11971848 Change-Id: I7842f94bd3a7a2755bcd859c88a376e959a6ffc7
This commit is contained in:
@@ -1017,14 +1017,17 @@ public class ChooserActivity extends ResolverActivity implements
|
||||
|
||||
/**
|
||||
* Update UI to reflect changes in data.
|
||||
* <p>If {@code listAdapter} is {@code null}, both profile list adapters are updated.
|
||||
* <p>If {@code listAdapter} is {@code null}, both profile list adapters are updated if
|
||||
* available.
|
||||
*/
|
||||
private void handlePackagesChanged(@Nullable ResolverListAdapter listAdapter) {
|
||||
// Refresh pinned items
|
||||
mPinnedSharedPrefs = getPinnedSharedPrefs(this);
|
||||
if (listAdapter == null) {
|
||||
mChooserMultiProfilePagerAdapter.getActiveListAdapter().handlePackagesChanged();
|
||||
mChooserMultiProfilePagerAdapter.getInactiveListAdapter().handlePackagesChanged();
|
||||
if (mChooserMultiProfilePagerAdapter.getCount() > 1) {
|
||||
mChooserMultiProfilePagerAdapter.getInactiveListAdapter().handlePackagesChanged();
|
||||
}
|
||||
} else {
|
||||
listAdapter.handlePackagesChanged();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user