Lines Matching defs:connection

58     /** New ringing connection event code. */
133 Connection connection = (Connection) asyncResult.result;
134 if (connection != null) {
135 Call call = connection.getCall();
139 sendIncomingCallIntent(connection);
149 Connection connection = call.getLatestConnection();
150 if (connection != null) {
151 String number = connection.getAddress();
153 sendIncomingCallIntent(connection);
165 Connection connection = (Connection) asyncResult.result;
166 if (connection != null) {
170 Call.State state = connection.getState();
172 Log.i(this, "Skipping new unknown connection because it is idle. " + connection);
176 Call call = connection.getCall();
178 addNewUnknownCall(connection);
183 private void addNewUnknownCall(Connection connection) {
184 Log.i(this, "addNewUnknownCall, connection is: %s", connection);
186 if (!maybeSwapAnyWithUnknownConnection(connection)) {
187 Log.i(this, "determined new connection is: %s", connection);
189 if (connection.getNumberPresentation() == TelecomManager.PRESENTATION_ALLOWED &&
190 !TextUtils.isEmpty(connection.getAddress())) {
191 Uri uri = Uri.fromParts(PhoneAccount.SCHEME_TEL, connection.getAddress(), null);
196 // TelephonyConnectionService, we will be able to determine which unknown connection is
198 if (connection instanceof ImsExternalConnection) {
199 ImsExternalConnection externalConnection = (ImsExternalConnection) connection;
211 connection.hangup();
213 // connection already disconnected. Do nothing
219 Log.i(this, "swapped an old connection, new one is: %s", connection);
226 private void sendIncomingCallIntent(Connection connection) {
228 if (connection.getNumberPresentation() == TelecomManager.PRESENTATION_ALLOWED &&
229 !TextUtils.isEmpty(connection.getAddress())) {
230 Uri uri = Uri.fromParts(PhoneAccount.SCHEME_TEL, connection.getAddress(), null);
241 connection.hangup();
243 // connection already disconnected. Do nothing