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

Commit 00e76111 authored by Hyundo Moon's avatar Hyundo Moon Committed by android-build-merger
Browse files

Merge "MediaSession2Service: Log ControllerInfo in connection process" into qt-dev am: 10a591bc

am: 26b15ef1

Change-Id: I0b708770953656689c54cc7efe5d9739a2ba5f2a
parents 0e010353 26b15ef1
Loading
Loading
Loading
Loading
+6 −5
Original line number Original line Diff line number Diff line
@@ -370,10 +370,6 @@ public abstract class MediaSession2Service extends Service {
                            }
                            }
                            return;
                            return;
                        }
                        }
                        if (DEBUG) {
                            Log.d(TAG, "Handling incoming connection request from the"
                                    + " controller, controller=" + caller + ", uid=" + uid);
                        }


                        String callingPkg = connectionRequest.getString(KEY_PACKAGE_NAME);
                        String callingPkg = connectionRequest.getString(KEY_PACKAGE_NAME);
                        // The Binder.getCallingPid() can be 0 for an oneway call from the
                        // The Binder.getCallingPid() can be 0 for an oneway call from the
@@ -389,13 +385,18 @@ public abstract class MediaSession2Service extends Service {
                                caller,
                                caller,
                                connectionRequest.getBundle(KEY_CONNECTION_HINTS));
                                connectionRequest.getBundle(KEY_CONNECTION_HINTS));


                        if (DEBUG) {
                            Log.d(TAG, "Handling incoming connection request from the"
                                    + " controller=" + controllerInfo);
                        }

                        final MediaSession2 session;
                        final MediaSession2 session;
                        session = service.onGetSession(controllerInfo);
                        session = service.onGetSession(controllerInfo);


                        if (session == null) {
                        if (session == null) {
                            if (DEBUG) {
                            if (DEBUG) {
                                Log.d(TAG, "Rejecting incoming connection request from the"
                                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
                            // Note: Trusted controllers also can be rejected according to the
                            // service implementation.
                            // service implementation.