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

Commit eed87d30 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Merge "Make queryRemoteConnectionServices DSDS aware." into...

Merge "Merge "Merge "Make queryRemoteConnectionServices DSDS aware." into qt-dev am: ac9d5722 am: deac4709" into qt-r1-dev-plus-aosp am: d8ebb085"
parents fb58b566 13b02792
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1937,6 +1937,8 @@ public abstract class ConnectionService extends Service {
            return;
        }

        String callingPackage = getOpPackageName();

        mAdapter.queryRemoteConnectionServices(new RemoteServiceCallback.Stub() {
            @Override
            public void onResult(
@@ -1965,7 +1967,7 @@ public abstract class ConnectionService extends Service {
                    }
                }.prepare());
            }
        });
        }, callingPackage);
    }

    /**
+2 −2
Original line number Diff line number Diff line
@@ -316,11 +316,11 @@ final class ConnectionServiceAdapter implements DeathRecipient {
    /**
     * Retrieves a list of remote connection services usable to place calls.
     */
    void queryRemoteConnectionServices(RemoteServiceCallback callback) {
    void queryRemoteConnectionServices(RemoteServiceCallback callback, String callingPackage) {
        // Only supported when there is only one adapter.
        if (mAdapters.size() == 1) {
            try {
                mAdapters.iterator().next().queryRemoteConnectionServices(callback,
                mAdapters.iterator().next().queryRemoteConnectionServices(callback, callingPackage,
                        Log.getExternalSession());
            } catch (RemoteException e) {
                Log.e(this, e, "Exception trying to query for remote CSs");
+11 −3
Original line number Diff line number Diff line
@@ -186,8 +186,13 @@ final class ConnectionServiceAdapterServant {
                    break;
                }
                case MSG_QUERY_REMOTE_CALL_SERVICES:
                    mDelegate.queryRemoteConnectionServices((RemoteServiceCallback) msg.obj,
                            null /*Session.Info*/);
                    SomeArgs args2 = (SomeArgs) msg.obj;
                    try {
                        mDelegate.queryRemoteConnectionServices((RemoteServiceCallback) args2.arg1,
                                (String) args2.arg2, null /*Session.Info*/);
                    } finally {
                        args2.recycle();
                    }
                    break;
                case MSG_SET_VIDEO_STATE:
                    mDelegate.setVideoState((String) msg.obj, msg.arg1, null /*Session.Info*/);
@@ -468,7 +473,10 @@ final class ConnectionServiceAdapterServant {

        @Override
        public void queryRemoteConnectionServices(RemoteServiceCallback callback,
                Session.Info sessionInfo) {
                String callingPackage, Session.Info sessionInfo) {
            SomeArgs args = SomeArgs.obtain();
            args.arg1 = callback;
            args.arg2 = callingPackage;
            mHandler.obtainMessage(MSG_QUERY_REMOTE_CALL_SERVICES, callback).sendToTarget();
        }

+1 −1
Original line number Diff line number Diff line
@@ -288,7 +288,7 @@ final class RemoteConnectionService {

        @Override
        public void queryRemoteConnectionServices(RemoteServiceCallback callback,
                Session.Info sessionInfo) {
                String callingPackage, Session.Info sessionInfo) {
            // Not supported from remote connection service.
        }

+2 −1
Original line number Diff line number Diff line
@@ -78,7 +78,8 @@ oneway interface IConnectionServiceAdapter {

    void onPostDialChar(String callId, char nextChar, in Session.Info sessionInfo);

    void queryRemoteConnectionServices(RemoteServiceCallback callback, in Session.Info sessionInfo);
    void queryRemoteConnectionServices(RemoteServiceCallback callback, String callingPackage,
    in Session.Info sessionInfo);

    void setVideoProvider(String callId, IVideoProvider videoProvider, in Session.Info sessionInfo);