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

Commit 225e5943 authored by Sudheer Shanka's avatar Sudheer Shanka Committed by android-build-merger
Browse files

Merge "Add new api Activity.getStartInitiatedTime." into oc-dev

am: 2359f016

Change-Id: I8a2ab94f67894736188fd62df8503dfa637ad9ed
parents 6c608eba 2359f016
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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();
+1 −0
Original line number Diff line number Diff line
@@ -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();
+1 −0
Original line number Diff line number Diff line
@@ -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();
+20 −0
Original line number Diff line number Diff line
@@ -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;
@@ -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*/);
+2 −0
Original line number Diff line number Diff line
@@ -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