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

Commit 04d1031b authored by Dianne Hackborn's avatar Dianne Hackborn Committed by android-build-merger
Browse files

Merge "Add APIs to find out the time when a process was created." into nyc-dev am: ef1971ff

am: 623ebce5

* commit '623ebce5':
  Add APIs to find out the time when a process was created.
parents efd2db1d 623ebce5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -29054,6 +29054,8 @@ package android.os {
    ctor public Process();
    method public static final long getElapsedCpuTime();
    method public static final int getGidForName(java.lang.String);
    method public static final long getStartElapsedRealtime();
    method public static final long getStartUptimeMillis();
    method public static final int getThreadPriority(int) throws java.lang.IllegalArgumentException;
    method public static final int getUidForName(java.lang.String);
    method public static final boolean is64Bit();
+2 −0
Original line number Diff line number Diff line
@@ -31345,6 +31345,8 @@ package android.os {
    ctor public Process();
    method public static final long getElapsedCpuTime();
    method public static final int getGidForName(java.lang.String);
    method public static final long getStartElapsedRealtime();
    method public static final long getStartUptimeMillis();
    method public static final int getThreadPriority(int) throws java.lang.IllegalArgumentException;
    method public static final int getUidForName(java.lang.String);
    method public static final boolean is64Bit();
+2 −0
Original line number Diff line number Diff line
@@ -29065,6 +29065,8 @@ package android.os {
    ctor public Process();
    method public static final long getElapsedCpuTime();
    method public static final int getGidForName(java.lang.String);
    method public static final long getStartElapsedRealtime();
    method public static final long getStartUptimeMillis();
    method public static final int getThreadPriority(int) throws java.lang.IllegalArgumentException;
    method public static final int getUidForName(java.lang.String);
    method public static final boolean is64Bit();
+3 −0
Original line number Diff line number Diff line
@@ -4909,6 +4909,9 @@ public final class ActivityThread {
            DdmVmInternal.enableRecentAllocations(true);
        }

        // Note when this process has started.
        Process.setStartTimes(SystemClock.elapsedRealtime(), SystemClock.uptimeMillis());

        mBoundApplication = data;
        mConfiguration = new Configuration(data.config);
        mCompatConfiguration = new Configuration(data.config);
+23 −0
Original line number Diff line number Diff line
@@ -383,6 +383,9 @@ public class Process {
    public static final int SIGNAL_KILL = 9;
    public static final int SIGNAL_USR1 = 10;

    private static long sStartElapsedRealtime;
    private static long sStartUptimeMillis;

    /**
     * State for communicating with the zygote process.
     *
@@ -771,6 +774,26 @@ public class Process {
     */
    public static final native long getElapsedCpuTime();

    /**
     * Return the {@link SystemClock#elapsedRealtime()} at which this process was started.
     */
    public static final long getStartElapsedRealtime() {
        return sStartElapsedRealtime;
    }

    /**
     * Return the {@link SystemClock#uptimeMillis()} at which this process was started.
     */
    public static final long getStartUptimeMillis() {
        return sStartUptimeMillis;
    }

    /** @hide */
    public static final void setStartTimes(long elapsedRealtime, long uptimeMillis) {
        sStartElapsedRealtime = elapsedRealtime;
        sStartUptimeMillis = uptimeMillis;
    }

    /**
     * Returns true if the current process is a 64-bit runtime.
     */