Merge "Fix NPE in sharesheet on devices without Work Profile." into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
58bb12f7f8
@@ -1017,14 +1017,17 @@ public class ChooserActivity extends ResolverActivity implements
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Update UI to reflect changes in data.
|
* 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) {
|
private void handlePackagesChanged(@Nullable ResolverListAdapter listAdapter) {
|
||||||
// Refresh pinned items
|
// Refresh pinned items
|
||||||
mPinnedSharedPrefs = getPinnedSharedPrefs(this);
|
mPinnedSharedPrefs = getPinnedSharedPrefs(this);
|
||||||
if (listAdapter == null) {
|
if (listAdapter == null) {
|
||||||
mChooserMultiProfilePagerAdapter.getActiveListAdapter().handlePackagesChanged();
|
mChooserMultiProfilePagerAdapter.getActiveListAdapter().handlePackagesChanged();
|
||||||
|
if (mChooserMultiProfilePagerAdapter.getCount() > 1) {
|
||||||
mChooserMultiProfilePagerAdapter.getInactiveListAdapter().handlePackagesChanged();
|
mChooserMultiProfilePagerAdapter.getInactiveListAdapter().handlePackagesChanged();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
listAdapter.handlePackagesChanged();
|
listAdapter.handlePackagesChanged();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user