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 am: 22e135e17c am: 8549324e42 am: 4472c5f9a0

Original change: undetermined

Change-Id: Icf4d4d30f3218934f128e7f064a3bffc64f7e8c9
This commit is contained in:
TreeHugger Robot
2020-06-02 13:51:05 +00:00
committed by Automerger Merge Worker
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.
*/