Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80f83cc2 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Add method to set start source info from launcher

Bug: 166614700
Test: Enable statsd log: "adb shell cmd stats print-logs"
      Launch app from launcher check logcat ((48)0x10000).
Change-Id: Ifc944c5ae9f33147eb7e8768d3e6d1548d20a95a
parent 1e64ab97
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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;
    }
}