Loading core/java/android/app/ActivityManager.java +19 −10 Original line number Diff line number Diff line Loading @@ -4222,6 +4222,10 @@ public class ActivityManager { * Return a list of {@link ApplicationStartInfo} records containing the information about the * most recent app startups. * * Records accessed using this path might include "incomplete" records such as in-progress app * starts. Accessing in-progress starts using this method lets you access start information * early to better optimize your startup path. * * <p class="note"> Note: System stores this historical information in a ring buffer and only * the most recent records will be returned. </p> * Loading Loading @@ -4249,6 +4253,9 @@ public class ActivityManager { * Return a list of {@link ApplicationStartInfo} records containing the information about the * most recent app startups. * * Records accessed using this path might include "incomplete" records such as in-progress app * starts. * * <p class="note"> Note: System stores this historical information in a ring buffer and only * the most recent records will be returned. </p> * Loading Loading @@ -4294,17 +4301,19 @@ public class ActivityManager { } /** * Adds a callback to be notified when the {@link ApplicationStartInfo} records of this startup * are complete. * Adds a callback that is notified when the {@link ApplicationStartInfo} record of this startup * is complete. The startup is considered complete when the first frame is drawn. * * <p class="note"> Note: callback will be removed automatically after being triggered.</p> * The callback doesn't wait for {@link Activity#reportFullyDrawn} to occur. Retrieve a copy * of {@link ApplicationStartInfo} after {@link Activity#reportFullyDrawn} is called (using this * callback or {@link getHistoricalProcessStartReasons}) if you need the * {@link ApplicationStartInfo.START_TIMESTAMP_FULLY_DRAWN} timestamp. * * <p class="note"> Note: callback will not wait for {@link Activity#reportFullyDrawn} to occur. * Timestamp for fully drawn may be added after callback occurs. Set callback after invoking * {@link Activity#reportFullyDrawn} if timestamp for fully drawn is required.</p> * If the current start record has already been completed (that is, the process is not currently * starting), the callback will be invoked immediately on the specified executor with the * previously completed {@link ApplicationStartInfo} record. * * <p class="note"> Note: if start records have already been retrieved, the callback will be * invoked immediately on the specified executor with the previously resolved AppStartInfo.</p> * Callback will be called at most once and removed automatically after being triggered. * * <p class="note"> Note: callback is asynchronous and should be made from a background thread. * </p> Loading Loading @@ -4394,8 +4403,8 @@ public class ActivityManager { * Adds an optional developer supplied timestamp to the calling apps most recent * {@link ApplicationStartInfo}. This is in addition to system recorded timestamps. * * <p class="note"> Note: timestamps added after {@link Activity#reportFullyDrawn} is called * will be discarded.</p> * <p class="note"> Note: any timestamps added after {@link Activity#reportFullyDrawn} is called * are discarded.</p> * * <p class="note"> Note: will overwrite existing timestamp if called with same key.</p> * Loading core/java/android/app/ApplicationStartInfo.java +10 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,16 @@ import java.util.Objects; * start times, throttling, and other useful diagnostic data can be obtained from * {@link ApplicationStartInfo} records. * </p> * * <p> * ApplicationStartInfo objects can be retrieved via: * - {@link ActivityManager#getHistoricalProcessStartReasons}, which can be called during or after * a application's startup. Using this method, an app can retrieve information about an * in-progress app start. * - {@link ActivityManager#addApplicationStartInfoCompletionListener}, which returns an * ApplicationStartInfo object via a callback when the startup is complete, or immediately * if requested after the startup is complete. * </p> */ @FlaggedApi(Flags.FLAG_APP_START_INFO) public final class ApplicationStartInfo implements Parcelable { Loading Loading
core/java/android/app/ActivityManager.java +19 −10 Original line number Diff line number Diff line Loading @@ -4222,6 +4222,10 @@ public class ActivityManager { * Return a list of {@link ApplicationStartInfo} records containing the information about the * most recent app startups. * * Records accessed using this path might include "incomplete" records such as in-progress app * starts. Accessing in-progress starts using this method lets you access start information * early to better optimize your startup path. * * <p class="note"> Note: System stores this historical information in a ring buffer and only * the most recent records will be returned. </p> * Loading Loading @@ -4249,6 +4253,9 @@ public class ActivityManager { * Return a list of {@link ApplicationStartInfo} records containing the information about the * most recent app startups. * * Records accessed using this path might include "incomplete" records such as in-progress app * starts. * * <p class="note"> Note: System stores this historical information in a ring buffer and only * the most recent records will be returned. </p> * Loading Loading @@ -4294,17 +4301,19 @@ public class ActivityManager { } /** * Adds a callback to be notified when the {@link ApplicationStartInfo} records of this startup * are complete. * Adds a callback that is notified when the {@link ApplicationStartInfo} record of this startup * is complete. The startup is considered complete when the first frame is drawn. * * <p class="note"> Note: callback will be removed automatically after being triggered.</p> * The callback doesn't wait for {@link Activity#reportFullyDrawn} to occur. Retrieve a copy * of {@link ApplicationStartInfo} after {@link Activity#reportFullyDrawn} is called (using this * callback or {@link getHistoricalProcessStartReasons}) if you need the * {@link ApplicationStartInfo.START_TIMESTAMP_FULLY_DRAWN} timestamp. * * <p class="note"> Note: callback will not wait for {@link Activity#reportFullyDrawn} to occur. * Timestamp for fully drawn may be added after callback occurs. Set callback after invoking * {@link Activity#reportFullyDrawn} if timestamp for fully drawn is required.</p> * If the current start record has already been completed (that is, the process is not currently * starting), the callback will be invoked immediately on the specified executor with the * previously completed {@link ApplicationStartInfo} record. * * <p class="note"> Note: if start records have already been retrieved, the callback will be * invoked immediately on the specified executor with the previously resolved AppStartInfo.</p> * Callback will be called at most once and removed automatically after being triggered. * * <p class="note"> Note: callback is asynchronous and should be made from a background thread. * </p> Loading Loading @@ -4394,8 +4403,8 @@ public class ActivityManager { * Adds an optional developer supplied timestamp to the calling apps most recent * {@link ApplicationStartInfo}. This is in addition to system recorded timestamps. * * <p class="note"> Note: timestamps added after {@link Activity#reportFullyDrawn} is called * will be discarded.</p> * <p class="note"> Note: any timestamps added after {@link Activity#reportFullyDrawn} is called * are discarded.</p> * * <p class="note"> Note: will overwrite existing timestamp if called with same key.</p> * Loading
core/java/android/app/ApplicationStartInfo.java +10 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,16 @@ import java.util.Objects; * start times, throttling, and other useful diagnostic data can be obtained from * {@link ApplicationStartInfo} records. * </p> * * <p> * ApplicationStartInfo objects can be retrieved via: * - {@link ActivityManager#getHistoricalProcessStartReasons}, which can be called during or after * a application's startup. Using this method, an app can retrieve information about an * in-progress app start. * - {@link ActivityManager#addApplicationStartInfoCompletionListener}, which returns an * ApplicationStartInfo object via a callback when the startup is complete, or immediately * if requested after the startup is complete. * </p> */ @FlaggedApi(Flags.FLAG_APP_START_INFO) public final class ApplicationStartInfo implements Parcelable { Loading