Merge "Add method to set start source info from launcher"

This commit is contained in:
Riddle Hsu
2020-10-01 03:17:56 +00:00
committed by Android (Google) Code Review

View File

@@ -86,4 +86,12 @@ public abstract class ActivityOptionsCompat {
opts.setFreezeRecentTasksReordering();
return opts;
}
/**
* Sets the launch event time from launcher.
*/
public static ActivityOptions setLauncherSourceInfo(ActivityOptions opts, long uptimeMillis) {
opts.setSourceInfo(ActivityOptions.SourceInfo.TYPE_LAUNCHER, uptimeMillis);
return opts;
}
}