Call updateChooserCounts with the correct user id

Fixes: 154216098
Test: atest ChooserActivityTest
Test: manually share in-profile and cross-profile
Change-Id: I7a970acba6ca4ab044c2fa07cef6bfe99582bf62
This commit is contained in:
arangelov
2020-04-16 15:57:38 +01:00
parent 5f29e27a11
commit 4872e68cf6
2 changed files with 4 additions and 3 deletions

View File

@@ -2171,7 +2171,7 @@ public class ChooserActivity extends ResolverActivity implements
mChooserMultiProfilePagerAdapter.getActiveListAdapter();
if (currentListAdapter != null) {
currentListAdapter.updateModel(info.getResolvedComponentName());
currentListAdapter.updateChooserCounts(ri.activityInfo.packageName, getUserId(),
currentListAdapter.updateChooserCounts(ri.activityInfo.packageName,
targetIntent.getAction());
}
if (DEBUG) {

View File

@@ -165,8 +165,9 @@ public class ResolverListAdapter extends BaseAdapter {
mResolverListController.updateModel(componentName);
}
public void updateChooserCounts(String packageName, int userId, String action) {
mResolverListController.updateChooserCounts(packageName, userId, action);
public void updateChooserCounts(String packageName, String action) {
mResolverListController.updateChooserCounts(
packageName, getUserHandle().getIdentifier(), action);
}
List<ResolvedComponentInfo> getUnfilteredResolveList() {