android.support.v4.util.TimeUtils Java Examples

The following examples show how to use android.support.v4.util.TimeUtils. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AsyncTaskLoader.java    From letv with Apache License 2.0 6 votes vote down vote up
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
    super.dump(prefix, fd, writer, args);
    if (this.mTask != null) {
        writer.print(prefix);
        writer.print("mTask=");
        writer.print(this.mTask);
        writer.print(" waiting=");
        writer.println(this.mTask.waiting);
    }
    if (this.mCancellingTask != null) {
        writer.print(prefix);
        writer.print("mCancellingTask=");
        writer.print(this.mCancellingTask);
        writer.print(" waiting=");
        writer.println(this.mCancellingTask.waiting);
    }
    if (this.mUpdateThrottle != 0) {
        writer.print(prefix);
        writer.print("mUpdateThrottle=");
        TimeUtils.formatDuration(this.mUpdateThrottle, writer);
        writer.print(" mLastLoadCompleteTime=");
        TimeUtils.formatDuration(this.mLastLoadCompleteTime, SystemClock.uptimeMillis(), writer);
        writer.println();
    }
}
 
Example #2
Source File: AsyncTaskLoader.java    From CodenameOne with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
    super.dump(prefix, fd, writer, args);
    if (mTask != null) {
        writer.print(prefix); writer.print("mTask="); writer.print(mTask);
                writer.print(" waiting="); writer.println(mTask.waiting);
    }
    if (mCancellingTask != null) {
        writer.print(prefix); writer.print("mCancellingTask="); writer.print(mCancellingTask);
                writer.print(" waiting="); writer.println(mCancellingTask.waiting);
    }
    if (mUpdateThrottle != 0) {
        writer.print(prefix); writer.print("mUpdateThrottle=");
                TimeUtils.formatDuration(mUpdateThrottle, writer);
                writer.print(" mLastLoadCompleteTime=");
                TimeUtils.formatDuration(mLastLoadCompleteTime,
                        SystemClock.uptimeMillis(), writer);
                writer.println();
    }
}
 
Example #3
Source File: AsyncTaskLoader.java    From adt-leanback-support with Apache License 2.0 6 votes vote down vote up
@Override
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
    super.dump(prefix, fd, writer, args);
    if (mTask != null) {
        writer.print(prefix); writer.print("mTask="); writer.print(mTask);
                writer.print(" waiting="); writer.println(mTask.waiting);
    }
    if (mCancellingTask != null) {
        writer.print(prefix); writer.print("mCancellingTask="); writer.print(mCancellingTask);
                writer.print(" waiting="); writer.println(mCancellingTask.waiting);
    }
    if (mUpdateThrottle != 0) {
        writer.print(prefix); writer.print("mUpdateThrottle=");
                TimeUtils.formatDuration(mUpdateThrottle, writer);
                writer.print(" mLastLoadCompleteTime=");
                TimeUtils.formatDuration(mLastLoadCompleteTime,
                        SystemClock.uptimeMillis(), writer);
                writer.println();
    }
}
 
Example #4
Source File: AsyncTaskLoader.java    From android-recipes-app with Apache License 2.0 6 votes vote down vote up
@Override
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
    super.dump(prefix, fd, writer, args);
    if (mTask != null) {
        writer.print(prefix); writer.print("mTask="); writer.print(mTask);
                writer.print(" waiting="); writer.println(mTask.waiting);
    }
    if (mCancellingTask != null) {
        writer.print(prefix); writer.print("mCancellingTask="); writer.print(mCancellingTask);
                writer.print(" waiting="); writer.println(mCancellingTask.waiting);
    }
    if (mUpdateThrottle != 0) {
        writer.print(prefix); writer.print("mUpdateThrottle=");
                TimeUtils.formatDuration(mUpdateThrottle, writer);
                writer.print(" mLastLoadCompleteTime=");
                TimeUtils.formatDuration(mLastLoadCompleteTime,
                        SystemClock.uptimeMillis(), writer);
                writer.println();
    }
}
 
Example #5
Source File: AsyncTaskLoader.java    From V.FlyoutTest with MIT License 6 votes vote down vote up
@Override
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
    super.dump(prefix, fd, writer, args);
    if (mTask != null) {
        writer.print(prefix); writer.print("mTask="); writer.print(mTask);
                writer.print(" waiting="); writer.println(mTask.waiting);
    }
    if (mCancellingTask != null) {
        writer.print(prefix); writer.print("mCancellingTask="); writer.print(mCancellingTask);
                writer.print(" waiting="); writer.println(mCancellingTask.waiting);
    }
    if (mUpdateThrottle != 0) {
        writer.print(prefix); writer.print("mUpdateThrottle=");
                TimeUtils.formatDuration(mUpdateThrottle, writer);
                writer.print(" mLastLoadCompleteTime=");
                TimeUtils.formatDuration(mLastLoadCompleteTime,
                        SystemClock.uptimeMillis(), writer);
                writer.println();
    }
}
 
Example #6
Source File: AsyncTaskLoader.java    From guideshow with MIT License 6 votes vote down vote up
@Override
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
    super.dump(prefix, fd, writer, args);
    if (mTask != null) {
        writer.print(prefix); writer.print("mTask="); writer.print(mTask);
                writer.print(" waiting="); writer.println(mTask.waiting);
    }
    if (mCancellingTask != null) {
        writer.print(prefix); writer.print("mCancellingTask="); writer.print(mCancellingTask);
                writer.print(" waiting="); writer.println(mCancellingTask.waiting);
    }
    if (mUpdateThrottle != 0) {
        writer.print(prefix); writer.print("mUpdateThrottle=");
                TimeUtils.formatDuration(mUpdateThrottle, writer);
                writer.print(" mLastLoadCompleteTime=");
                TimeUtils.formatDuration(mLastLoadCompleteTime,
                        SystemClock.uptimeMillis(), writer);
                writer.println();
    }
}
 
Example #7
Source File: BackgroundLocation.java    From background-geolocation-android with Apache License 2.0 5 votes vote down vote up
@Override
public String toString () {
    StringBuilder s = new StringBuilder();
    s.append("BGLocation[").append(provider);
    s.append(String.format(" %.6f,%.6f", latitude, longitude));
    s.append(" id=").append(locationId);
    if (hasAccuracy) {
        s.append(String.format(" acc=%.0f", accuracy));
    } else {
        s.append(" acc=???");
    }
    if (time == 0) {
        s.append(" t=?!?");
    } else {
        s.append(" t=").append(time);
    }
    if (elapsedRealtimeNanos == 0) {
        s.append(" et=?!?");
    } else {
        s.append(" et=");
        TimeUtils.formatDuration(elapsedRealtimeNanos / 1000000L, s);
    }
    if (hasAltitude) s.append(" alt=").append(altitude);
    if (hasSpeed) s.append(" vel=").append(speed);
    if (hasBearing) s.append(" bear=").append(bearing);
    if (hasRadius) s.append(" radius=").append(radius);
    if (isFromMockProvider()) s.append(" mock");
    if (areMockLocationsEnabled()) s.append(" mocksEnabled");
    if (extras != null) {
        s.append(" {").append(extras).append('}');
    }
    s.append(" locprov=").append(locationProvider);
    s.append("]");

    return s.toString();
}
 
Example #8
Source File: AsyncTaskLoader.java    From MiBandDecompiled with Apache License 2.0 5 votes vote down vote up
public void dump(String s, FileDescriptor filedescriptor, PrintWriter printwriter, String as[])
{
    super.dump(s, filedescriptor, printwriter, as);
    if (c != null)
    {
        printwriter.print(s);
        printwriter.print("mTask=");
        printwriter.print(c);
        printwriter.print(" waiting=");
        printwriter.println(c.b);
    }
    if (d != null)
    {
        printwriter.print(s);
        printwriter.print("mCancellingTask=");
        printwriter.print(d);
        printwriter.print(" waiting=");
        printwriter.println(d.b);
    }
    if (e != 0L)
    {
        printwriter.print(s);
        printwriter.print("mUpdateThrottle=");
        TimeUtils.formatDuration(e, printwriter);
        printwriter.print(" mLastLoadCompleteTime=");
        TimeUtils.formatDuration(f, SystemClock.uptimeMillis(), printwriter);
        printwriter.println();
    }
}
 
Example #9
Source File: MediaSessionStatus.java    From cwac-mediarouter with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    StringBuilder result = new StringBuilder();
    result.append("MediaSessionStatus{ ");
    result.append("timestamp=");
    TimeUtils.formatDuration(SystemClock.elapsedRealtime() - getTimestamp(), result);
    result.append(" ms ago");
    result.append(", sessionState=").append(sessionStateToString(getSessionState()));
    result.append(", queuePaused=").append(isQueuePaused());
    result.append(", extras=").append(getExtras());
    result.append(" }");
    return result.toString();
}
 
Example #10
Source File: MediaItemStatus.java    From cwac-mediarouter with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    StringBuilder result = new StringBuilder();
    result.append("MediaItemStatus{ ");
    result.append("timestamp=");
    TimeUtils.formatDuration(SystemClock.elapsedRealtime() - getTimestamp(), result);
    result.append(" ms ago");
    result.append(", playbackState=").append(playbackStateToString(getPlaybackState()));
    result.append(", contentPosition=").append(getContentPosition());
    result.append(", contentDuration=").append(getContentDuration());
    result.append(", extras=").append(getExtras());
    result.append(" }");
    return result.toString();
}