diff options
| author | 2019-04-17 18:21:33 +0900 | |
|---|---|---|
| committer | 2019-04-17 18:44:15 +0900 | |
| commit | 664c45bad5d91d25ceb54d6d01ca7a37a55b2269 (patch) | |
| tree | 01c3fd06b6db55e3860df94d9f9f634729de1fb8 | |
| parent | cf44c4115880569034271637fb941399d57456d3 (diff) | |
MediaSession2Service: Log ControllerInfo in connection process
Since printing a binder in a log doesn't help debugging, this CL
makes the code print ControllerInfo instead of the binder.
Bug: 130706459
Test: N/A
Change-Id: I225f2854d15f5b9e7e6a9dca113f9050bbc8dd43
| -rw-r--r-- | media/apex/java/android/media/MediaSession2Service.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/media/apex/java/android/media/MediaSession2Service.java b/media/apex/java/android/media/MediaSession2Service.java index 28ead99357bc..3f392d28fa1f 100644 --- a/media/apex/java/android/media/MediaSession2Service.java +++ b/media/apex/java/android/media/MediaSession2Service.java @@ -370,10 +370,6 @@ public abstract class MediaSession2Service extends Service { } return; } - if (DEBUG) { - Log.d(TAG, "Handling incoming connection request from the" - + " controller, controller=" + caller + ", uid=" + uid); - } String callingPkg = connectionRequest.getString(KEY_PACKAGE_NAME); // The Binder.getCallingPid() can be 0 for an oneway call from the @@ -389,13 +385,18 @@ public abstract class MediaSession2Service extends Service { caller, connectionRequest.getBundle(KEY_CONNECTION_HINTS)); + if (DEBUG) { + Log.d(TAG, "Handling incoming connection request from the" + + " controller=" + controllerInfo); + } + final MediaSession2 session; session = service.onGetSession(controllerInfo); if (session == null) { if (DEBUG) { Log.d(TAG, "Rejecting incoming connection request from the" - + " controller, controller=" + caller + ", uid=" + uid); + + " controller=" + controllerInfo); } // Note: Trusted controllers also can be rejected according to the // service implementation. |