Merge "Fix app stack issue: send the selected target info into AppPredictionService and UsageStatsManager, when user share from app stack on sharesheet." into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-06-02 13:35:51 +00:00
committed by Android (Google) Code Review
2 changed files with 10 additions and 0 deletions

View File

@@ -2182,6 +2182,9 @@ public class ChooserActivity extends ResolverActivity implements
}
void updateModelAndChooserCounts(TargetInfo info) {
if (info != null && info instanceof MultiDisplayResolveInfo) {
info = ((MultiDisplayResolveInfo) info).getSelectedTarget();
}
if (info != null) {
sendClickToAppPredictor(info);
final ResolveInfo ri = info.getResolveInfo();

View File

@@ -69,6 +69,13 @@ public class MultiDisplayResolveInfo extends DisplayResolveInfo {
mSelected = selected;
}
/**
* Return selected target.
*/
public DisplayResolveInfo getSelectedTarget() {
return hasSelected() ? mTargetInfos.get(mSelected) : null;
}
/**
* Whether or not the user has selected a specific target for this MultiInfo.
*/