/** * Notifies the request queue that this request has finished (successfully or with error). * * <p>Also dumps all events from this request's event log; for debugging.</p> */ void finish(final String tag) { if (mRequestQueue != null) { mRequestQueue.finish(this); } if (MarkerLog.ENABLED) { final long threadId = Thread.currentThread().getId(); if (Looper.myLooper() != Looper.getMainLooper()) { // If we finish marking off of the main thread, we need to // actually do it on the main thread to ensure correct ordering. Handler mainThread = new Handler(Looper.getMainLooper()); mainThread.post(new Runnable() { @Override public void run() { mEventLog.add(tag, threadId); mEventLog.finish(this.toString()); } }); return; } mEventLog.add(tag, threadId); mEventLog.finish(this.toString()); } }
/** * Notifies the request queue that this request has finished (successfully or with error). * * <p>Also dumps all events from this request's event log; for debugging.</p> */ void finish(final String tag) { if (mRequestQueue != null) { mRequestQueue.finish(this); onFinish(); } if (MarkerLog.ENABLED) { final long threadId = Thread.currentThread().getId(); if (Looper.myLooper() != Looper.getMainLooper()) { // If we finish marking off of the main thread, we need to // actually do it on the main thread to ensure correct ordering. Handler mainThread = new Handler(Looper.getMainLooper()); mainThread.post(new Runnable() { @Override public void run() { mEventLog.add(tag, threadId); mEventLog.finish(this.toString()); } }); return; } mEventLog.add(tag, threadId); mEventLog.finish(this.toString()); } }
mEventLog.finish(this.toString()); } else { long requestTime = SystemClock.elapsedRealtime() - mRequestBirthTime;
@Override public void run() { mEventLog.add(tag, threadId); mEventLog.finish(this.toString()); } });
@Override protected void finalize() throws Throwable { // Catch requests that have been collected (and hence end-of-lifed) // but had no debugging output printed for them. if (!mFinished) { finish("Request on the loose"); e("Marker log finalized without finish() - uncaught exit point for request"); } }
@Override public void run() { mEventLog.add(tag, threadId); mEventLog.finish(this.toString()); } });
@Override protected void finalize() throws Throwable { // Catch requests that have been collected (and hence end-of-lifed) // but had no debugging output printed for them. if (!mFinished) { finish("Request on the loose"); e("Marker log finalized without finish() - uncaught exit point for request"); } }
@Override public void run() { mEventLog.add(tag, threadId); mEventLog.finish(this.toString()); } });
@Override protected void finalize() throws Throwable { // Catch requests that have been collected (and hence end-of-lifed) // but had no debugging output printed for them. if (!mFinished) { finish("Request on the loose"); e("Marker log finalized without finish() - uncaught exit point for request"); } }
@Override public void run() { mEventLog.add(tag, threadId); mEventLog.finish(this.toString()); } });
@Override protected void finalize() throws Throwable { // Catch requests that have been collected (and hence end-of-lifed) // but had no debugging output printed for them. if (!mFinished) { finish("Request on the loose"); e("Marker log finalized without finish() - uncaught exit point for request"); } }
@Override public void run() { mEventLog.add(tag, threadId); mEventLog.finish(this.toString()); } });
@Override public void run() { mEventLog.add(tag, threadId); mEventLog.finish(this.toString()); } });
@Override protected void finalize() throws Throwable { // Catch requests that have been collected (and hence end-of-lifed) // but had no debugging output printed for them. if (!mFinished) { finish("Request on the loose"); e("Marker log finalized without finish() - uncaught exit point for request"); } }
@Override protected void finalize() throws Throwable { // Catch requests that have been collected (and hence end-of-lifed) // but had no debugging output printed for them. if (!mFinished) { finish("Request on the loose"); e("Marker log finalized without finish() - uncaught exit point for request"); } }
@Override public void run() { mEventLog.add(tag, threadId); mEventLog.finish(this.toString()); } });
@Override protected void finalize() throws Throwable { // Catch requests that have been collected (and hence end-of-lifed) // but had no debugging output printed for them. if (!mFinished) { finish("Request on the loose"); e("Marker log finalized without finish() - uncaught exit point for request"); } }
@Override public void run() { mEventLog.add(tag, threadId); mEventLog.finish(this.toString()); } });
@Override protected void finalize() throws Throwable { // Catch requests that have been collected (and hence end-of-lifed) // but had no debugging output printed for them. if (!mFinished) { finish("Request on the loose"); e("Marker log finalized without finish() - uncaught exit point for request"); } }
@Override public void run() { mEventLog.add(tag, threadId); mEventLog.finish(this.toString()); } });