FileDocCategorySizeDatePackage
RemoteConnectionManager.javaAPI DocAndroid 5.1 API3332Thu Mar 12 22:22:42 GMT 2015android.telecom

RemoteConnectionManager

public class RemoteConnectionManager extends Object
hide

Fields Summary
private final Map
mRemoteConnectionServices
private final ConnectionService
mOurConnectionServiceImpl
Constructors Summary
public RemoteConnectionManager(ConnectionService ourConnectionServiceImpl)


       
        mOurConnectionServiceImpl = ourConnectionServiceImpl;
    
Methods Summary
voidaddConnectionService(android.content.ComponentName componentName, com.android.internal.telecom.IConnectionService outgoingConnectionServiceRpc)

        if (!mRemoteConnectionServices.containsKey(componentName)) {
            try {
                RemoteConnectionService remoteConnectionService = new RemoteConnectionService(
                        outgoingConnectionServiceRpc,
                        mOurConnectionServiceImpl);
                mRemoteConnectionServices.put(componentName, remoteConnectionService);
            } catch (RemoteException ignored) {
            }
        }
    
public voidconferenceRemoteConnections(RemoteConnection a, RemoteConnection b)

        if (a.getConnectionService() == b.getConnectionService()) {
            try {
                a.getConnectionService().conference(a.getId(), b.getId());
            } catch (RemoteException e) {
            }
        } else {
            Log.w(this, "Request to conference incompatible remote connections (%s,%s) (%s,%s)",
                    a.getConnectionService(), a.getId(),
                    b.getConnectionService(), b.getId());
        }
    
public RemoteConnectioncreateRemoteConnection(PhoneAccountHandle connectionManagerPhoneAccount, ConnectionRequest request, boolean isIncoming)

        PhoneAccountHandle accountHandle = request.getAccountHandle();
        if (accountHandle == null) {
            throw new IllegalArgumentException("accountHandle must be specified.");
        }

        ComponentName componentName = request.getAccountHandle().getComponentName();
        if (!mRemoteConnectionServices.containsKey(componentName)) {
            throw new UnsupportedOperationException("accountHandle not supported: "
                    + componentName);
        }

        RemoteConnectionService remoteService = mRemoteConnectionServices.get(componentName);
        if (remoteService != null) {
            return remoteService.createRemoteConnection(
                    connectionManagerPhoneAccount, request, isIncoming);
        }
        return null;