Merge "Do not restart activity when pinned set changes - just re-sort."

This commit is contained in:
Alison Cichowlas
2019-12-18 14:35:02 +00:00
committed by Android (Google) Code Review
2 changed files with 12 additions and 5 deletions

View File

@@ -859,14 +859,21 @@ public class ChooserActivity extends ResolverActivity implements
return new PackageMonitor() {
@Override
public void onSomePackagesChanged() {
// TODO(arangelov): Dispatch this to all adapters when we have the helper methods
// in a follow-up CL
mChooserMultiProfilePagerAdapter.getActiveListAdapter().handlePackagesChanged();
updateProfileViewButton();
handlePackagesChanged();
}
};
}
/**
* Update UI to reflect changes in data.
*/
public void handlePackagesChanged() {
// TODO(arangelov): Dispatch this to all adapters when we have the helper methods
// in a follow-up CL
mChooserMultiProfilePagerAdapter.getActiveListAdapter().handlePackagesChanged();
updateProfileViewButton();
}
private void onCopyButtonClicked(View v) {
Intent targetIntent = getTargetIntent();
if (targetIntent == null) {

View File

@@ -116,7 +116,7 @@ public class ResolverTargetActionsDialogFragment extends DialogFragment
pinComponent(mTargetInfos.get(which).getResolvedComponentName());
}
// Force the chooser to requery and resort things
getActivity().recreate();
((ChooserActivity) getActivity()).handlePackagesChanged();
} else {
// Last item in dialog is App Info
Intent in = new Intent().setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)