Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3615,6 +3615,7 @@ package android.app { method public android.net.Uri getReferrer(); method public int getRequestedOrientation(); method public final android.view.SearchEvent getSearchEvent(); method public long getStartInitiatedTime(); method public int getTaskId(); method public final java.lang.CharSequence getTitle(); method public final int getTitleColor(); api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3743,6 +3743,7 @@ package android.app { method public android.net.Uri getReferrer(); method public int getRequestedOrientation(); method public final android.view.SearchEvent getSearchEvent(); method public long getStartInitiatedTime(); method public int getTaskId(); method public final java.lang.CharSequence getTitle(); method public final int getTitleColor(); api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3617,6 +3617,7 @@ package android.app { method public android.net.Uri getReferrer(); method public int getRequestedOrientation(); method public final android.view.SearchEvent getSearchEvent(); method public long getStartInitiatedTime(); method public int getTaskId(); method public final java.lang.CharSequence getTitle(); method public final int getTitleColor(); core/java/android/app/Activity.java +20 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.app; import android.metrics.LogMaker; import android.graphics.Rect; import android.os.SystemClock; import android.view.ViewRootImpl.ActivityConfigCallback; import android.view.autofill.AutofillId; import android.view.autofill.AutofillManager; Loading Loading @@ -7433,6 +7434,25 @@ public class Activity extends ContextThemeWrapper } } /** * Return the timestamp at which this activity start was last initiated by the system in the * {@link SystemClock#uptimeMillis()} time base. * * This can be used to understand how much time is taken for an activity to be started and * displayed to the user. * * @return timestamp at which this activity start was initiated by the system * or {@code 0} if for any reason the timestamp could not be retrieved. */ public long getStartInitiatedTime() { try { return ActivityManager.getService().getActivityStartInitiatedTime(mToken); } catch (RemoteException e) { Log.e(TAG, "Failed to call getActivityStartTime", e); return 0; } } class HostCallbacks extends FragmentHostCallback<Activity> { public HostCallbacks() { super(Activity.this /*activity*/); Loading core/java/android/app/IActivityManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -632,6 +632,8 @@ interface IActivityManager { */ void backgroundWhitelistUid(int uid); long getActivityStartInitiatedTime(IBinder token); // WARNING: when these transactions are updated, check if they are any callers on the native // side. If so, make sure they are using the correct transaction ids and arguments. // If a transaction which will also be used on the native side is being inserted, add it Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3615,6 +3615,7 @@ package android.app { method public android.net.Uri getReferrer(); method public int getRequestedOrientation(); method public final android.view.SearchEvent getSearchEvent(); method public long getStartInitiatedTime(); method public int getTaskId(); method public final java.lang.CharSequence getTitle(); method public final int getTitleColor();
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3743,6 +3743,7 @@ package android.app { method public android.net.Uri getReferrer(); method public int getRequestedOrientation(); method public final android.view.SearchEvent getSearchEvent(); method public long getStartInitiatedTime(); method public int getTaskId(); method public final java.lang.CharSequence getTitle(); method public final int getTitleColor();
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3617,6 +3617,7 @@ package android.app { method public android.net.Uri getReferrer(); method public int getRequestedOrientation(); method public final android.view.SearchEvent getSearchEvent(); method public long getStartInitiatedTime(); method public int getTaskId(); method public final java.lang.CharSequence getTitle(); method public final int getTitleColor();
core/java/android/app/Activity.java +20 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.app; import android.metrics.LogMaker; import android.graphics.Rect; import android.os.SystemClock; import android.view.ViewRootImpl.ActivityConfigCallback; import android.view.autofill.AutofillId; import android.view.autofill.AutofillManager; Loading Loading @@ -7433,6 +7434,25 @@ public class Activity extends ContextThemeWrapper } } /** * Return the timestamp at which this activity start was last initiated by the system in the * {@link SystemClock#uptimeMillis()} time base. * * This can be used to understand how much time is taken for an activity to be started and * displayed to the user. * * @return timestamp at which this activity start was initiated by the system * or {@code 0} if for any reason the timestamp could not be retrieved. */ public long getStartInitiatedTime() { try { return ActivityManager.getService().getActivityStartInitiatedTime(mToken); } catch (RemoteException e) { Log.e(TAG, "Failed to call getActivityStartTime", e); return 0; } } class HostCallbacks extends FragmentHostCallback<Activity> { public HostCallbacks() { super(Activity.this /*activity*/); Loading
core/java/android/app/IActivityManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -632,6 +632,8 @@ interface IActivityManager { */ void backgroundWhitelistUid(int uid); long getActivityStartInitiatedTime(IBinder token); // WARNING: when these transactions are updated, check if they are any callers on the native // side. If so, make sure they are using the correct transaction ids and arguments. // If a transaction which will also be used on the native side is being inserted, add it Loading