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

Commit efc620a8 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Add time stamp to content provider connection." into jb-dev

parents 03e93e51 d9137ca8
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
package com.android.server.am;

import android.os.Binder;
import android.os.SystemClock;
import android.util.TimeUtils;

/**
 * Represents a link between a content provider and client.
@@ -24,6 +26,7 @@ import android.os.Binder;
public class ContentProviderConnection extends Binder {
    public final ContentProviderRecord provider;
    public final ProcessRecord client;
    public final long createTime;
    public int stableCount;
    public int unstableCount;
    // The client of this connection is currently waiting for the provider to appear.
@@ -39,6 +42,7 @@ public class ContentProviderConnection extends Binder {
    public ContentProviderConnection(ContentProviderRecord _provider, ProcessRecord _client) {
        provider = _provider;
        client = _client;
        createTime = SystemClock.elapsedRealtime();
    }

    public String toString() {
@@ -83,5 +87,8 @@ public class ContentProviderConnection extends Binder {
        if (dead) {
            sb.append(" DEAD");
        }
        long nowReal = SystemClock.elapsedRealtime();
        sb.append(" ");
        TimeUtils.formatDuration(nowReal-createTime, sb);
    }
}