summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/os/Binder.java8
-rw-r--r--core/java/com/android/internal/os/BinderInternal.java4
2 files changed, 5 insertions, 7 deletions
diff --git a/core/java/android/os/Binder.java b/core/java/android/os/Binder.java
index 2ae796c1ec56..6adbad0c61e1 100644
--- a/core/java/android/os/Binder.java
+++ b/core/java/android/os/Binder.java
@@ -971,10 +971,11 @@ public class Binder implements IBinder {
if (tracingEnabled) {
Trace.traceEnd(Trace.TRACE_TAG_ALWAYS);
}
+ if (observer != null) {
+ observer.callEnded(callSession, data.dataSize(), reply.dataSize());
+ }
}
checkParcel(this, code, reply, "Unreasonably large binder reply buffer");
- int replySizeBytes = reply.dataSize();
- int requestSizeBytes = data.dataSize();
reply.recycle();
data.recycle();
@@ -984,9 +985,6 @@ public class Binder implements IBinder {
// to the main transaction loop to wait for another incoming transaction. Either
// way, strict mode begone!
StrictMode.clearGatheredViolations();
- if (observer != null) {
- observer.callEnded(callSession, requestSizeBytes, replySizeBytes);
- }
return res;
}
}
diff --git a/core/java/com/android/internal/os/BinderInternal.java b/core/java/com/android/internal/os/BinderInternal.java
index 015506722c73..7eb944ce3fa2 100644
--- a/core/java/com/android/internal/os/BinderInternal.java
+++ b/core/java/com/android/internal/os/BinderInternal.java
@@ -22,7 +22,6 @@ import android.os.Handler;
import android.os.IBinder;
import android.os.SystemClock;
import android.util.EventLog;
-import android.util.Log;
import android.util.SparseIntArray;
import com.android.internal.util.Preconditions;
@@ -100,7 +99,8 @@ public class BinderInternal {
/**
* Called when a binder call stops.
*
- * <li>This method will be called even when an exception is thrown.
+ * <li>This method will be called even when an exception is thrown by the binder stub
+ * implementation.
*/
void callEnded(CallSession s, int parcelRequestSize, int parcelReplySize);