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

Commit 26b15ef1 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

Change-Id: I2d80cb5461bb18ff4f9d7d4acffa54c4c2dd3037
parents d779bb36 10a591bc
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -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.