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

Commit a6fc25f6 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[DO NOT MERGE] AM: Use ActivityMetricsLogger to get app launch times" into pi-dev

parents bd74ac1a cf235049
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -28,10 +28,10 @@ import java.io.PrintWriter;
 * @hide
 */
public class WaitResult implements Parcelable {
    public static final int INVALID_DELAY = -1;
    public int result;
    public boolean timeout;
    public ComponentName who;
    public long thisTime;
    public long totalTime;

    public WaitResult() {
@@ -47,7 +47,6 @@ public class WaitResult implements Parcelable {
        dest.writeInt(result);
        dest.writeInt(timeout ? 1 : 0);
        ComponentName.writeToParcel(who, dest);
        dest.writeLong(thisTime);
        dest.writeLong(totalTime);
    }

@@ -68,7 +67,6 @@ public class WaitResult implements Parcelable {
        result = source.readInt();
        timeout = source.readInt() != 0;
        who = ComponentName.readFromParcel(source);
        thisTime = source.readLong();
        totalTime = source.readLong();
    }

@@ -77,7 +75,6 @@ public class WaitResult implements Parcelable {
        pw.println(prefix + "  result=" + result);
        pw.println(prefix + "  timeout=" + timeout);
        pw.println(prefix + "  who=" + who);
        pw.println(prefix + "  thisTime=" + thisTime);
        pw.println(prefix + "  totalTime=" + totalTime);
    }
}
 No newline at end of file
+0 −13
Original line number Diff line number Diff line
@@ -5895,7 +5895,6 @@ public class ActivityManagerService extends IActivityManager.Stub
    private final void handleAppDiedLocked(ProcessRecord app,
            boolean restarting, boolean allowRestart) {
        int pid = app.pid;
        final boolean clearLaunchStartTime = !restarting && app.removed && app.foregroundActivities;
        boolean kept = cleanUpApplicationRecordLocked(app, restarting, allowRestart, -1,
                false /*replacingPid*/);
        if (!kept && !restarting) {
@@ -5937,18 +5936,6 @@ public class ActivityManagerService extends IActivityManager.Stub
            mWindowManager.continueSurfaceLayout();
        }
        // Hack for pi
        // When an app process is removed, activities from the process may be relaunched. In the
        // case of forceStopPackageLocked the activities are finished before any window is drawn,
        // and the launch time is not cleared. This will be incorrectly used to calculate launch
        // time for the next launched activity launched in the same windowing mode.
        if (clearLaunchStartTime) {
            final LaunchTimeTracker.Entry entry = mStackSupervisor
                    .getLaunchTimeTracker().getEntry(mStackSupervisor.getWindowingMode());
            if (entry != null) {
                entry.mLaunchStartTime = 0;
            }
        }
    }
    private final int getLRURecordIndexForAppLocked(IApplicationThread thread) {
+0 −3
Original line number Diff line number Diff line
@@ -558,9 +558,6 @@ final class ActivityManagerShellCommand extends ShellCommand {
                if (result.who != null) {
                    pw.println("Activity: " + result.who.flattenToShortString());
                }
                if (result.thisTime >= 0) {
                    pw.println("ThisTime: " + result.thisTime);
                }
                if (result.totalTime >= 0) {
                    pw.println("TotalTime: " + result.totalTime);
                }
+173 −43

File changed.

Preview size limit exceeded, changes collapsed.

+12 −93

File changed.

Preview size limit exceeded, changes collapsed.

Loading