Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | R* limitations under the License. |
| 15 | */ |
| 16 | |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 17 | package android.telecom; |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 18 | |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 19 | import android.net.Uri; |
Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 20 | import android.os.Bundle; |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 21 | import android.os.Handler; |
| 22 | import android.os.Message; |
| 23 | import android.os.RemoteException; |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 24 | import android.telecom.Logging.Session; |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 25 | |
Santos Cordon | 7c7bc7f | 2014-07-28 18:15:48 -0700 | [diff] [blame] | 26 | import com.android.internal.os.SomeArgs; |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 27 | import com.android.internal.telecom.IConnectionServiceAdapter; |
| 28 | import com.android.internal.telecom.IVideoProvider; |
| 29 | import com.android.internal.telecom.RemoteServiceCallback; |
Santos Cordon | 7c7bc7f | 2014-07-28 18:15:48 -0700 | [diff] [blame] | 30 | |
| 31 | import java.util.List; |
| 32 | |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 33 | /** |
| 34 | * A component that provides an RPC servant implementation of {@link IConnectionServiceAdapter}, |
| 35 | * posting incoming messages on the main thread on a client-supplied delegate object. |
| 36 | * |
| 37 | * TODO: Generate this and similar classes using a compiler starting from AIDL interfaces. |
| 38 | * |
| 39 | * @hide |
| 40 | */ |
| 41 | final class ConnectionServiceAdapterServant { |
Ihab Awad | 6107bab | 2014-08-18 09:23:25 -0700 | [diff] [blame] | 42 | private static final int MSG_HANDLE_CREATE_CONNECTION_COMPLETE = 1; |
| 43 | private static final int MSG_SET_ACTIVE = 2; |
| 44 | private static final int MSG_SET_RINGING = 3; |
| 45 | private static final int MSG_SET_DIALING = 4; |
| 46 | private static final int MSG_SET_DISCONNECTED = 5; |
| 47 | private static final int MSG_SET_ON_HOLD = 6; |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 48 | private static final int MSG_SET_RINGBACK_REQUESTED = 7; |
Ihab Awad | 5c9c86e | 2014-11-12 13:41:16 -0800 | [diff] [blame] | 49 | private static final int MSG_SET_CONNECTION_CAPABILITIES = 8; |
Ihab Awad | 6107bab | 2014-08-18 09:23:25 -0700 | [diff] [blame] | 50 | private static final int MSG_SET_IS_CONFERENCED = 9; |
| 51 | private static final int MSG_ADD_CONFERENCE_CALL = 10; |
| 52 | private static final int MSG_REMOVE_CALL = 11; |
| 53 | private static final int MSG_ON_POST_DIAL_WAIT = 12; |
| 54 | private static final int MSG_QUERY_REMOTE_CALL_SERVICES = 13; |
| 55 | private static final int MSG_SET_VIDEO_STATE = 14; |
| 56 | private static final int MSG_SET_VIDEO_CALL_PROVIDER = 15; |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 57 | private static final int MSG_SET_IS_VOIP_AUDIO_MODE = 16; |
Ihab Awad | 6107bab | 2014-08-18 09:23:25 -0700 | [diff] [blame] | 58 | private static final int MSG_SET_STATUS_HINTS = 17; |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 59 | private static final int MSG_SET_ADDRESS = 18; |
Ihab Awad | 6107bab | 2014-08-18 09:23:25 -0700 | [diff] [blame] | 60 | private static final int MSG_SET_CALLER_DISPLAY_NAME = 19; |
Evan Charlton | 23dc241 | 2014-09-03 10:07:03 -0700 | [diff] [blame] | 61 | private static final int MSG_SET_CONFERENCEABLE_CONNECTIONS = 20; |
Tyler Gunn | 4a57b9b | 2014-10-30 14:27:48 -0700 | [diff] [blame] | 62 | private static final int MSG_ADD_EXISTING_CONNECTION = 21; |
Nancy Chen | 27d1c2d | 2014-12-15 16:12:50 -0800 | [diff] [blame] | 63 | private static final int MSG_ON_POST_DIAL_CHAR = 22; |
Anthony Lee | 17455a3 | 2015-04-24 15:25:29 -0700 | [diff] [blame] | 64 | private static final int MSG_SET_CONFERENCE_MERGE_FAILED = 23; |
Tyler Gunn | dee56a8 | 2016-03-23 16:06:34 -0700 | [diff] [blame] | 65 | private static final int MSG_PUT_EXTRAS = 24; |
| 66 | private static final int MSG_REMOVE_EXTRAS = 25; |
| 67 | private static final int MSG_ON_CONNECTION_EVENT = 26; |
Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 68 | private static final int MSG_SET_CONNECTION_PROPERTIES = 27; |
Tyler Gunn | c96b5e0 | 2016-07-07 22:53:57 -0700 | [diff] [blame] | 69 | private static final int MSG_SET_PULLING = 28; |
Tyler Gunn | f503543 | 2017-01-09 09:43:12 -0800 | [diff] [blame] | 70 | private static final int MSG_SET_AUDIO_ROUTE = 29; |
Hall Liu | 57006aa | 2017-02-06 10:49:48 -0800 | [diff] [blame] | 71 | private static final int MSG_ON_RTT_INITIATION_SUCCESS = 30; |
| 72 | private static final int MSG_ON_RTT_INITIATION_FAILURE = 31; |
| 73 | private static final int MSG_ON_RTT_REMOTELY_TERMINATED = 32; |
| 74 | private static final int MSG_ON_RTT_UPGRADE_REQUEST = 33; |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 75 | |
| 76 | private final IConnectionServiceAdapter mDelegate; |
| 77 | |
| 78 | private final Handler mHandler = new Handler() { |
| 79 | @Override |
| 80 | public void handleMessage(Message msg) { |
| 81 | try { |
| 82 | internalHandleMessage(msg); |
| 83 | } catch (RemoteException e) { |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | // Internal method defined to centralize handling of RemoteException |
| 88 | private void internalHandleMessage(Message msg) throws RemoteException { |
| 89 | switch (msg.what) { |
Ihab Awad | 6107bab | 2014-08-18 09:23:25 -0700 | [diff] [blame] | 90 | case MSG_HANDLE_CREATE_CONNECTION_COMPLETE: { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 91 | SomeArgs args = (SomeArgs) msg.obj; |
| 92 | try { |
Ihab Awad | 6107bab | 2014-08-18 09:23:25 -0700 | [diff] [blame] | 93 | mDelegate.handleCreateConnectionComplete( |
Ihab Awad | b19a0bc | 2014-08-07 19:46:01 -0700 | [diff] [blame] | 94 | (String) args.arg1, |
| 95 | (ConnectionRequest) args.arg2, |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 96 | (ParcelableConnection) args.arg3, |
| 97 | null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 98 | } finally { |
| 99 | args.recycle(); |
| 100 | } |
| 101 | break; |
| 102 | } |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 103 | case MSG_SET_ACTIVE: |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 104 | mDelegate.setActive((String) msg.obj, null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 105 | break; |
| 106 | case MSG_SET_RINGING: |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 107 | mDelegate.setRinging((String) msg.obj, null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 108 | break; |
| 109 | case MSG_SET_DIALING: |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 110 | mDelegate.setDialing((String) msg.obj, null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 111 | break; |
Tyler Gunn | c96b5e0 | 2016-07-07 22:53:57 -0700 | [diff] [blame] | 112 | case MSG_SET_PULLING: |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 113 | mDelegate.setPulling((String) msg.obj, null /*Session.Info*/); |
Tyler Gunn | c96b5e0 | 2016-07-07 22:53:57 -0700 | [diff] [blame] | 114 | break; |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 115 | case MSG_SET_DISCONNECTED: { |
| 116 | SomeArgs args = (SomeArgs) msg.obj; |
| 117 | try { |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 118 | mDelegate.setDisconnected((String) args.arg1, (DisconnectCause) args.arg2, |
| 119 | null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 120 | } finally { |
| 121 | args.recycle(); |
| 122 | } |
| 123 | break; |
| 124 | } |
| 125 | case MSG_SET_ON_HOLD: |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 126 | mDelegate.setOnHold((String) msg.obj, null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 127 | break; |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 128 | case MSG_SET_RINGBACK_REQUESTED: |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 129 | mDelegate.setRingbackRequested((String) msg.obj, msg.arg1 == 1, |
| 130 | null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 131 | break; |
Ihab Awad | 5c9c86e | 2014-11-12 13:41:16 -0800 | [diff] [blame] | 132 | case MSG_SET_CONNECTION_CAPABILITIES: |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 133 | mDelegate.setConnectionCapabilities((String) msg.obj, msg.arg1, |
| 134 | null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 135 | break; |
Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 136 | case MSG_SET_CONNECTION_PROPERTIES: |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 137 | mDelegate.setConnectionProperties((String) msg.obj, msg.arg1, |
| 138 | null /*Session.Info*/); |
Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 139 | break; |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 140 | case MSG_SET_IS_CONFERENCED: { |
| 141 | SomeArgs args = (SomeArgs) msg.obj; |
| 142 | try { |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 143 | mDelegate.setIsConferenced((String) args.arg1, (String) args.arg2, |
| 144 | null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 145 | } finally { |
| 146 | args.recycle(); |
| 147 | } |
| 148 | break; |
| 149 | } |
Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 150 | case MSG_ADD_CONFERENCE_CALL: { |
| 151 | SomeArgs args = (SomeArgs) msg.obj; |
| 152 | try { |
| 153 | mDelegate.addConferenceCall( |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 154 | (String) args.arg1, (ParcelableConference) args.arg2, |
| 155 | null /*Session.Info*/); |
Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 156 | } finally { |
| 157 | args.recycle(); |
| 158 | } |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 159 | break; |
Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 160 | } |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 161 | case MSG_REMOVE_CALL: |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 162 | mDelegate.removeCall((String) msg.obj, |
| 163 | null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 164 | break; |
| 165 | case MSG_ON_POST_DIAL_WAIT: { |
| 166 | SomeArgs args = (SomeArgs) msg.obj; |
| 167 | try { |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 168 | mDelegate.onPostDialWait((String) args.arg1, (String) args.arg2, |
| 169 | null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 170 | } finally { |
| 171 | args.recycle(); |
| 172 | } |
| 173 | break; |
| 174 | } |
Nancy Chen | 27d1c2d | 2014-12-15 16:12:50 -0800 | [diff] [blame] | 175 | case MSG_ON_POST_DIAL_CHAR: { |
| 176 | SomeArgs args = (SomeArgs) msg.obj; |
| 177 | try { |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 178 | mDelegate.onPostDialChar((String) args.arg1, (char) args.argi1, |
| 179 | null /*Session.Info*/); |
Nancy Chen | 27d1c2d | 2014-12-15 16:12:50 -0800 | [diff] [blame] | 180 | } finally { |
| 181 | args.recycle(); |
| 182 | } |
| 183 | break; |
| 184 | } |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 185 | case MSG_QUERY_REMOTE_CALL_SERVICES: |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 186 | mDelegate.queryRemoteConnectionServices((RemoteServiceCallback) msg.obj, |
| 187 | null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 188 | break; |
| 189 | case MSG_SET_VIDEO_STATE: |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 190 | mDelegate.setVideoState((String) msg.obj, msg.arg1, null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 191 | break; |
| 192 | case MSG_SET_VIDEO_CALL_PROVIDER: { |
| 193 | SomeArgs args = (SomeArgs) msg.obj; |
| 194 | try { |
Ihab Awad | b19a0bc | 2014-08-07 19:46:01 -0700 | [diff] [blame] | 195 | mDelegate.setVideoProvider((String) args.arg1, |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 196 | (IVideoProvider) args.arg2, null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 197 | } finally { |
| 198 | args.recycle(); |
| 199 | } |
| 200 | break; |
| 201 | } |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 202 | case MSG_SET_IS_VOIP_AUDIO_MODE: |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 203 | mDelegate.setIsVoipAudioMode((String) msg.obj, msg.arg1 == 1, |
| 204 | null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 205 | break; |
| 206 | case MSG_SET_STATUS_HINTS: { |
| 207 | SomeArgs args = (SomeArgs) msg.obj; |
| 208 | try { |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 209 | mDelegate.setStatusHints((String) args.arg1, (StatusHints) args.arg2, |
| 210 | null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 211 | } finally { |
| 212 | args.recycle(); |
| 213 | } |
| 214 | break; |
| 215 | } |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 216 | case MSG_SET_ADDRESS: { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 217 | SomeArgs args = (SomeArgs) msg.obj; |
| 218 | try { |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 219 | mDelegate.setAddress((String) args.arg1, (Uri) args.arg2, args.argi1, |
| 220 | null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 221 | } finally { |
| 222 | args.recycle(); |
| 223 | } |
| 224 | break; |
| 225 | } |
| 226 | case MSG_SET_CALLER_DISPLAY_NAME: { |
| 227 | SomeArgs args = (SomeArgs) msg.obj; |
| 228 | try { |
| 229 | mDelegate.setCallerDisplayName( |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 230 | (String) args.arg1, (String) args.arg2, args.argi1, |
| 231 | null /*Session.Info*/); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 232 | } finally { |
| 233 | args.recycle(); |
| 234 | } |
| 235 | break; |
| 236 | } |
Santos Cordon | 7c7bc7f | 2014-07-28 18:15:48 -0700 | [diff] [blame] | 237 | case MSG_SET_CONFERENCEABLE_CONNECTIONS: { |
| 238 | SomeArgs args = (SomeArgs) msg.obj; |
| 239 | try { |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 240 | mDelegate.setConferenceableConnections((String) args.arg1, |
| 241 | (List<String>) args.arg2, null /*Session.Info*/); |
Santos Cordon | 7c7bc7f | 2014-07-28 18:15:48 -0700 | [diff] [blame] | 242 | } finally { |
| 243 | args.recycle(); |
| 244 | } |
| 245 | break; |
| 246 | } |
Tyler Gunn | 4a57b9b | 2014-10-30 14:27:48 -0700 | [diff] [blame] | 247 | case MSG_ADD_EXISTING_CONNECTION: { |
| 248 | SomeArgs args = (SomeArgs) msg.obj; |
| 249 | try { |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 250 | mDelegate.addExistingConnection((String) args.arg1, |
| 251 | (ParcelableConnection) args.arg2, null /*Session.Info*/); |
Tyler Gunn | 4a57b9b | 2014-10-30 14:27:48 -0700 | [diff] [blame] | 252 | } finally { |
| 253 | args.recycle(); |
| 254 | } |
| 255 | break; |
| 256 | } |
Anthony Lee | 17455a3 | 2015-04-24 15:25:29 -0700 | [diff] [blame] | 257 | case MSG_SET_CONFERENCE_MERGE_FAILED: { |
| 258 | SomeArgs args = (SomeArgs) msg.obj; |
| 259 | try { |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 260 | mDelegate.setConferenceMergeFailed((String) args.arg1, |
| 261 | null /*Session.Info*/); |
Anthony Lee | 17455a3 | 2015-04-24 15:25:29 -0700 | [diff] [blame] | 262 | } finally { |
| 263 | args.recycle(); |
| 264 | } |
| 265 | break; |
| 266 | } |
Tyler Gunn | dee56a8 | 2016-03-23 16:06:34 -0700 | [diff] [blame] | 267 | case MSG_PUT_EXTRAS: { |
Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 268 | SomeArgs args = (SomeArgs) msg.obj; |
| 269 | try { |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 270 | mDelegate.putExtras((String) args.arg1, (Bundle) args.arg2, |
| 271 | null /*Session.Info*/); |
Tyler Gunn | dee56a8 | 2016-03-23 16:06:34 -0700 | [diff] [blame] | 272 | } finally { |
| 273 | args.recycle(); |
| 274 | } |
| 275 | break; |
| 276 | } |
| 277 | case MSG_REMOVE_EXTRAS: { |
| 278 | SomeArgs args = (SomeArgs) msg.obj; |
| 279 | try { |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 280 | mDelegate.removeExtras((String) args.arg1, (List<String>) args.arg2, |
| 281 | null /*Session.Info*/); |
Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 282 | } finally { |
| 283 | args.recycle(); |
| 284 | } |
Tyler Gunn | 86c9fb4 | 2016-02-24 13:17:21 -0800 | [diff] [blame] | 285 | break; |
Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 286 | } |
Tyler Gunn | bd1eb1f | 2016-02-16 14:36:20 -0800 | [diff] [blame] | 287 | case MSG_ON_CONNECTION_EVENT: { |
| 288 | SomeArgs args = (SomeArgs) msg.obj; |
| 289 | try { |
Tyler Gunn | 876dbfb | 2016-03-14 15:18:07 -0700 | [diff] [blame] | 290 | mDelegate.onConnectionEvent((String) args.arg1, (String) args.arg2, |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 291 | (Bundle) args.arg3, null /*Session.Info*/); |
Tyler Gunn | bd1eb1f | 2016-02-16 14:36:20 -0800 | [diff] [blame] | 292 | } finally { |
| 293 | args.recycle(); |
| 294 | } |
Tyler Gunn | 86c9fb4 | 2016-02-24 13:17:21 -0800 | [diff] [blame] | 295 | break; |
Tyler Gunn | bd1eb1f | 2016-02-16 14:36:20 -0800 | [diff] [blame] | 296 | } |
Tyler Gunn | f503543 | 2017-01-09 09:43:12 -0800 | [diff] [blame] | 297 | case MSG_SET_AUDIO_ROUTE: { |
| 298 | SomeArgs args = (SomeArgs) msg.obj; |
| 299 | try { |
| 300 | mDelegate.setAudioRoute((String) args.arg1, args.argi1, |
| 301 | (Session.Info) args.arg2); |
| 302 | } finally { |
| 303 | args.recycle(); |
| 304 | } |
| 305 | break; |
| 306 | } |
Hall Liu | 57006aa | 2017-02-06 10:49:48 -0800 | [diff] [blame] | 307 | case MSG_ON_RTT_INITIATION_SUCCESS: |
| 308 | mDelegate.onRttInitiationSuccess((String) msg.obj, null /*Session.Info*/); |
| 309 | break; |
| 310 | case MSG_ON_RTT_INITIATION_FAILURE: |
| 311 | mDelegate.onRttInitiationFailure((String) msg.obj, msg.arg1, |
| 312 | null /*Session.Info*/); |
| 313 | break; |
| 314 | case MSG_ON_RTT_REMOTELY_TERMINATED: |
| 315 | mDelegate.onRttSessionRemotelyTerminated((String) msg.obj, |
| 316 | null /*Session.Info*/); |
| 317 | break; |
| 318 | case MSG_ON_RTT_UPGRADE_REQUEST: |
| 319 | mDelegate.onRemoteRttRequest((String) msg.obj, null /*Session.Info*/); |
| 320 | break; |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 321 | } |
| 322 | } |
| 323 | }; |
| 324 | |
| 325 | private final IConnectionServiceAdapter mStub = new IConnectionServiceAdapter.Stub() { |
| 326 | @Override |
Ihab Awad | 6107bab | 2014-08-18 09:23:25 -0700 | [diff] [blame] | 327 | public void handleCreateConnectionComplete( |
Ihab Awad | b19a0bc | 2014-08-07 19:46:01 -0700 | [diff] [blame] | 328 | String id, |
| 329 | ConnectionRequest request, |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 330 | ParcelableConnection connection, |
| 331 | Session.Info sessionInfo) { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 332 | SomeArgs args = SomeArgs.obtain(); |
Ihab Awad | b19a0bc | 2014-08-07 19:46:01 -0700 | [diff] [blame] | 333 | args.arg1 = id; |
| 334 | args.arg2 = request; |
| 335 | args.arg3 = connection; |
Ihab Awad | 6107bab | 2014-08-18 09:23:25 -0700 | [diff] [blame] | 336 | mHandler.obtainMessage(MSG_HANDLE_CREATE_CONNECTION_COMPLETE, args).sendToTarget(); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 337 | } |
| 338 | |
| 339 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 340 | public void setActive(String connectionId, Session.Info sessionInfo) { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 341 | mHandler.obtainMessage(MSG_SET_ACTIVE, connectionId).sendToTarget(); |
| 342 | } |
| 343 | |
| 344 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 345 | public void setRinging(String connectionId, Session.Info sessionInfo) { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 346 | mHandler.obtainMessage(MSG_SET_RINGING, connectionId).sendToTarget(); |
| 347 | } |
| 348 | |
| 349 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 350 | public void setDialing(String connectionId, Session.Info sessionInfo) { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 351 | mHandler.obtainMessage(MSG_SET_DIALING, connectionId).sendToTarget(); |
| 352 | } |
| 353 | |
| 354 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 355 | public void setPulling(String connectionId, Session.Info sessionInfo) { |
Tyler Gunn | c96b5e0 | 2016-07-07 22:53:57 -0700 | [diff] [blame] | 356 | mHandler.obtainMessage(MSG_SET_PULLING, connectionId).sendToTarget(); |
| 357 | } |
| 358 | |
| 359 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 360 | public void setDisconnected(String connectionId, DisconnectCause disconnectCause, |
| 361 | Session.Info sessionInfo) { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 362 | SomeArgs args = SomeArgs.obtain(); |
| 363 | args.arg1 = connectionId; |
Andrew Lee | 7f3d41f | 2014-09-11 17:33:16 -0700 | [diff] [blame] | 364 | args.arg2 = disconnectCause; |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 365 | mHandler.obtainMessage(MSG_SET_DISCONNECTED, args).sendToTarget(); |
| 366 | } |
| 367 | |
| 368 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 369 | public void setOnHold(String connectionId, Session.Info sessionInfo) { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 370 | mHandler.obtainMessage(MSG_SET_ON_HOLD, connectionId).sendToTarget(); |
| 371 | } |
| 372 | |
| 373 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 374 | public void setRingbackRequested(String connectionId, boolean ringback, |
| 375 | Session.Info sessionInfo) { |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 376 | mHandler.obtainMessage(MSG_SET_RINGBACK_REQUESTED, ringback ? 1 : 0, 0, connectionId) |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 377 | .sendToTarget(); |
| 378 | } |
| 379 | |
| 380 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 381 | public void setConnectionCapabilities(String connectionId, int connectionCapabilities, |
| 382 | Session.Info sessionInfo) { |
Ihab Awad | 5c9c86e | 2014-11-12 13:41:16 -0800 | [diff] [blame] | 383 | mHandler.obtainMessage( |
| 384 | MSG_SET_CONNECTION_CAPABILITIES, connectionCapabilities, 0, connectionId) |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 385 | .sendToTarget(); |
| 386 | } |
| 387 | |
| 388 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 389 | public void setConnectionProperties(String connectionId, int connectionProperties, |
| 390 | Session.Info sessionInfo) { |
Tyler Gunn | 720c664 | 2016-03-22 09:02:47 -0700 | [diff] [blame] | 391 | mHandler.obtainMessage( |
| 392 | MSG_SET_CONNECTION_PROPERTIES, connectionProperties, 0, connectionId) |
| 393 | .sendToTarget(); |
| 394 | } |
| 395 | |
| 396 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 397 | public void setConferenceMergeFailed(String callId, Session.Info sessionInfo) { |
Anthony Lee | 17455a3 | 2015-04-24 15:25:29 -0700 | [diff] [blame] | 398 | SomeArgs args = SomeArgs.obtain(); |
| 399 | args.arg1 = callId; |
| 400 | mHandler.obtainMessage(MSG_SET_CONFERENCE_MERGE_FAILED, args).sendToTarget(); |
| 401 | } |
| 402 | |
| 403 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 404 | public void setIsConferenced(String callId, String conferenceCallId, |
| 405 | Session.Info sessionInfo) { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 406 | SomeArgs args = SomeArgs.obtain(); |
| 407 | args.arg1 = callId; |
| 408 | args.arg2 = conferenceCallId; |
| 409 | mHandler.obtainMessage(MSG_SET_IS_CONFERENCED, args).sendToTarget(); |
| 410 | } |
| 411 | |
| 412 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 413 | public void addConferenceCall(String callId, ParcelableConference parcelableConference, |
| 414 | Session.Info sessionInfo) { |
Santos Cordon | 823fd3c | 2014-08-07 18:35:18 -0700 | [diff] [blame] | 415 | SomeArgs args = SomeArgs.obtain(); |
| 416 | args.arg1 = callId; |
| 417 | args.arg2 = parcelableConference; |
| 418 | mHandler.obtainMessage(MSG_ADD_CONFERENCE_CALL, args).sendToTarget(); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 419 | } |
| 420 | |
| 421 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 422 | public void removeCall(String connectionId, |
| 423 | Session.Info sessionInfo) { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 424 | mHandler.obtainMessage(MSG_REMOVE_CALL, connectionId).sendToTarget(); |
| 425 | } |
| 426 | |
| 427 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 428 | public void onPostDialWait(String connectionId, String remainingDigits, |
| 429 | Session.Info sessionInfo) { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 430 | SomeArgs args = SomeArgs.obtain(); |
| 431 | args.arg1 = connectionId; |
| 432 | args.arg2 = remainingDigits; |
| 433 | mHandler.obtainMessage(MSG_ON_POST_DIAL_WAIT, args).sendToTarget(); |
| 434 | } |
| 435 | |
| 436 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 437 | public void onPostDialChar(String connectionId, char nextChar, |
| 438 | Session.Info sessionInfo) { |
Nancy Chen | 27d1c2d | 2014-12-15 16:12:50 -0800 | [diff] [blame] | 439 | SomeArgs args = SomeArgs.obtain(); |
| 440 | args.arg1 = connectionId; |
| 441 | args.argi1 = nextChar; |
| 442 | mHandler.obtainMessage(MSG_ON_POST_DIAL_CHAR, args).sendToTarget(); |
| 443 | } |
| 444 | |
| 445 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 446 | public void queryRemoteConnectionServices(RemoteServiceCallback callback, |
| 447 | Session.Info sessionInfo) { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 448 | mHandler.obtainMessage(MSG_QUERY_REMOTE_CALL_SERVICES, callback).sendToTarget(); |
| 449 | } |
| 450 | |
| 451 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 452 | public void setVideoState(String connectionId, int videoState, |
| 453 | Session.Info sessionInfo) { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 454 | mHandler.obtainMessage(MSG_SET_VIDEO_STATE, videoState, 0, connectionId).sendToTarget(); |
| 455 | } |
| 456 | |
| 457 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 458 | public void setVideoProvider(String connectionId, IVideoProvider videoProvider, |
| 459 | Session.Info sessionInfo) { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 460 | SomeArgs args = SomeArgs.obtain(); |
| 461 | args.arg1 = connectionId; |
Ihab Awad | b19a0bc | 2014-08-07 19:46:01 -0700 | [diff] [blame] | 462 | args.arg2 = videoProvider; |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 463 | mHandler.obtainMessage(MSG_SET_VIDEO_CALL_PROVIDER, args).sendToTarget(); |
| 464 | } |
| 465 | |
| 466 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 467 | public final void setIsVoipAudioMode(String connectionId, boolean isVoip, |
| 468 | Session.Info sessionInfo) { |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 469 | mHandler.obtainMessage(MSG_SET_IS_VOIP_AUDIO_MODE, isVoip ? 1 : 0, 0, |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 470 | connectionId).sendToTarget(); |
| 471 | } |
| 472 | |
| 473 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 474 | public final void setStatusHints(String connectionId, StatusHints statusHints, |
| 475 | Session.Info sessionInfo) { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 476 | SomeArgs args = SomeArgs.obtain(); |
| 477 | args.arg1 = connectionId; |
| 478 | args.arg2 = statusHints; |
| 479 | mHandler.obtainMessage(MSG_SET_STATUS_HINTS, args).sendToTarget(); |
| 480 | } |
| 481 | |
| 482 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 483 | public final void setAddress(String connectionId, Uri address, int presentation, |
| 484 | Session.Info sessionInfo) { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 485 | SomeArgs args = SomeArgs.obtain(); |
| 486 | args.arg1 = connectionId; |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 487 | args.arg2 = address; |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 488 | args.argi1 = presentation; |
Andrew Lee | 100e293 | 2014-09-08 15:34:24 -0700 | [diff] [blame] | 489 | mHandler.obtainMessage(MSG_SET_ADDRESS, args).sendToTarget(); |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 490 | } |
| 491 | |
| 492 | @Override |
| 493 | public final void setCallerDisplayName( |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 494 | String connectionId, String callerDisplayName, int presentation, |
| 495 | Session.Info sessionInfo) { |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 496 | SomeArgs args = SomeArgs.obtain(); |
| 497 | args.arg1 = connectionId; |
| 498 | args.arg2 = callerDisplayName; |
| 499 | args.argi1 = presentation; |
| 500 | mHandler.obtainMessage(MSG_SET_CALLER_DISPLAY_NAME, args).sendToTarget(); |
| 501 | } |
| 502 | |
| 503 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 504 | public final void setConferenceableConnections(String connectionId, |
| 505 | List<String> conferenceableConnectionIds, Session.Info sessionInfo) { |
Santos Cordon | 7c7bc7f | 2014-07-28 18:15:48 -0700 | [diff] [blame] | 506 | SomeArgs args = SomeArgs.obtain(); |
| 507 | args.arg1 = connectionId; |
| 508 | args.arg2 = conferenceableConnectionIds; |
| 509 | mHandler.obtainMessage(MSG_SET_CONFERENCEABLE_CONNECTIONS, args).sendToTarget(); |
| 510 | } |
Tyler Gunn | 4a57b9b | 2014-10-30 14:27:48 -0700 | [diff] [blame] | 511 | |
| 512 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 513 | public final void addExistingConnection(String connectionId, |
| 514 | ParcelableConnection connection, Session.Info sessionInfo) { |
Tyler Gunn | 4a57b9b | 2014-10-30 14:27:48 -0700 | [diff] [blame] | 515 | SomeArgs args = SomeArgs.obtain(); |
| 516 | args.arg1 = connectionId; |
| 517 | args.arg2 = connection; |
| 518 | mHandler.obtainMessage(MSG_ADD_EXISTING_CONNECTION, args).sendToTarget(); |
| 519 | } |
Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 520 | |
| 521 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 522 | public final void putExtras(String connectionId, Bundle extras, Session.Info sessionInfo) { |
Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 523 | SomeArgs args = SomeArgs.obtain(); |
| 524 | args.arg1 = connectionId; |
| 525 | args.arg2 = extras; |
Tyler Gunn | dee56a8 | 2016-03-23 16:06:34 -0700 | [diff] [blame] | 526 | mHandler.obtainMessage(MSG_PUT_EXTRAS, args).sendToTarget(); |
| 527 | } |
| 528 | |
| 529 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 530 | public final void removeExtras(String connectionId, List<String> keys, |
| 531 | Session.Info sessionInfo) { |
Tyler Gunn | dee56a8 | 2016-03-23 16:06:34 -0700 | [diff] [blame] | 532 | SomeArgs args = SomeArgs.obtain(); |
| 533 | args.arg1 = connectionId; |
| 534 | args.arg2 = keys; |
| 535 | mHandler.obtainMessage(MSG_REMOVE_EXTRAS, args).sendToTarget(); |
Santos Cordon | 6b7f955 | 2015-05-27 17:21:45 -0700 | [diff] [blame] | 536 | } |
Tyler Gunn | bd1eb1f | 2016-02-16 14:36:20 -0800 | [diff] [blame] | 537 | |
| 538 | @Override |
Tyler Gunn | f503543 | 2017-01-09 09:43:12 -0800 | [diff] [blame] | 539 | public final void setAudioRoute(String connectionId, int audioRoute, |
| 540 | Session.Info sessionInfo) { |
| 541 | |
| 542 | SomeArgs args = SomeArgs.obtain(); |
| 543 | args.arg1 = connectionId; |
| 544 | args.argi1 = audioRoute; |
| 545 | args.arg2 = sessionInfo; |
| 546 | mHandler.obtainMessage(MSG_SET_AUDIO_ROUTE, args).sendToTarget(); |
| 547 | } |
| 548 | |
| 549 | @Override |
Brad Ebinger | 4d75bee | 2016-10-28 12:29:55 -0700 | [diff] [blame] | 550 | public final void onConnectionEvent(String connectionId, String event, Bundle extras, |
| 551 | Session.Info sessionInfo) { |
Tyler Gunn | bd1eb1f | 2016-02-16 14:36:20 -0800 | [diff] [blame] | 552 | SomeArgs args = SomeArgs.obtain(); |
| 553 | args.arg1 = connectionId; |
| 554 | args.arg2 = event; |
Tyler Gunn | 876dbfb | 2016-03-14 15:18:07 -0700 | [diff] [blame] | 555 | args.arg3 = extras; |
Tyler Gunn | bd1eb1f | 2016-02-16 14:36:20 -0800 | [diff] [blame] | 556 | mHandler.obtainMessage(MSG_ON_CONNECTION_EVENT, args).sendToTarget(); |
| 557 | } |
Hall Liu | 57006aa | 2017-02-06 10:49:48 -0800 | [diff] [blame] | 558 | |
| 559 | @Override |
| 560 | public void onRttInitiationSuccess(String connectionId, Session.Info sessionInfo) |
| 561 | throws RemoteException { |
| 562 | mHandler.obtainMessage(MSG_ON_RTT_INITIATION_SUCCESS, connectionId).sendToTarget(); |
| 563 | } |
| 564 | |
| 565 | @Override |
| 566 | public void onRttInitiationFailure(String connectionId, int reason, |
| 567 | Session.Info sessionInfo) |
| 568 | throws RemoteException { |
| 569 | mHandler.obtainMessage(MSG_ON_RTT_INITIATION_FAILURE, reason, 0, connectionId) |
| 570 | .sendToTarget(); |
| 571 | } |
| 572 | |
| 573 | @Override |
| 574 | public void onRttSessionRemotelyTerminated(String connectionId, Session.Info sessionInfo) |
| 575 | throws RemoteException { |
| 576 | mHandler.obtainMessage(MSG_ON_RTT_REMOTELY_TERMINATED, connectionId).sendToTarget(); |
| 577 | } |
| 578 | |
| 579 | @Override |
| 580 | public void onRemoteRttRequest(String connectionId, Session.Info sessionInfo) |
| 581 | throws RemoteException { |
| 582 | mHandler.obtainMessage(MSG_ON_RTT_UPGRADE_REQUEST, connectionId).sendToTarget(); |
| 583 | } |
Ihab Awad | 5d0410f | 2014-07-30 10:07:40 -0700 | [diff] [blame] | 584 | }; |
| 585 | |
| 586 | public ConnectionServiceAdapterServant(IConnectionServiceAdapter delegate) { |
| 587 | mDelegate = delegate; |
| 588 | } |
| 589 | |
| 590 | public IConnectionServiceAdapter getStub() { |
| 591 | return mStub; |
| 592 | } |
| 593 | } |