Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 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 | * limitations under the License. |
| 15 | */ |
| 16 | |
Tyler Gunn | 7cc70b4 | 2014-09-12 22:17:27 -0700 | [diff] [blame] | 17 | package com.android.server.telecom; |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 18 | |
Andrew Lee | 701dc00 | 2014-09-11 21:29:12 -0700 | [diff] [blame^] | 19 | import android.telecom.DisconnectCause; |
Tyler Gunn | 7cc70b4 | 2014-09-12 22:17:27 -0700 | [diff] [blame] | 20 | import android.telecom.ParcelableConnection; |
| 21 | import android.telecom.PhoneAccount; |
| 22 | import android.telecom.PhoneAccountHandle; |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 23 | |
| 24 | import java.util.ArrayList; |
| 25 | import java.util.Iterator; |
| 26 | import java.util.List; |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 27 | import java.util.Objects; |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 28 | |
| 29 | /** |
| 30 | * This class creates connections to place new outgoing calls to attached to an existing incoming |
| 31 | * call. In either case, this class cycles through a set of connection services until: |
| 32 | * - a connection service returns a newly created connection in which case the call is displayed |
| 33 | * to the user |
| 34 | * - a connection service cancels the process, in which case the call is aborted |
| 35 | */ |
| 36 | final class CreateConnectionProcessor { |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 37 | |
| 38 | // Describes information required to attempt to make a phone call |
| 39 | private static class CallAttemptRecord { |
| 40 | // The PhoneAccount describing the target connection service which we will |
| 41 | // contact in order to process an attempt |
Ihab Awad | b78b276 | 2014-07-25 15:16:23 -0700 | [diff] [blame] | 42 | public final PhoneAccountHandle connectionManagerPhoneAccount; |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 43 | // The PhoneAccount which we will tell the target connection service to use |
| 44 | // for attempting to make the actual phone call |
Ihab Awad | b78b276 | 2014-07-25 15:16:23 -0700 | [diff] [blame] | 45 | public final PhoneAccountHandle targetPhoneAccount; |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 46 | |
| 47 | public CallAttemptRecord( |
Ihab Awad | b78b276 | 2014-07-25 15:16:23 -0700 | [diff] [blame] | 48 | PhoneAccountHandle connectionManagerPhoneAccount, |
| 49 | PhoneAccountHandle targetPhoneAccount) { |
| 50 | this.connectionManagerPhoneAccount = connectionManagerPhoneAccount; |
| 51 | this.targetPhoneAccount = targetPhoneAccount; |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 52 | } |
| 53 | |
| 54 | @Override |
| 55 | public String toString() { |
| 56 | return "CallAttemptRecord(" |
Ihab Awad | b78b276 | 2014-07-25 15:16:23 -0700 | [diff] [blame] | 57 | + Objects.toString(connectionManagerPhoneAccount) + "," |
| 58 | + Objects.toString(targetPhoneAccount) + ")"; |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 59 | } |
Tyler Gunn | 6e6f6d1 | 2014-08-20 15:22:18 -0700 | [diff] [blame] | 60 | |
| 61 | /** |
| 62 | * Determines if this instance of {@code CallAttemptRecord} has the same underlying |
| 63 | * {@code PhoneAccountHandle}s as another instance. |
| 64 | * |
| 65 | * @param obj The other instance to compare against. |
| 66 | * @return {@code True} if the {@code CallAttemptRecord}s are equal. |
| 67 | */ |
| 68 | @Override |
| 69 | public boolean equals(Object obj) { |
| 70 | if (obj instanceof CallAttemptRecord) { |
| 71 | CallAttemptRecord other = (CallAttemptRecord) obj; |
| 72 | return Objects.equals(connectionManagerPhoneAccount, |
| 73 | other.connectionManagerPhoneAccount) && |
| 74 | Objects.equals(targetPhoneAccount, other.targetPhoneAccount); |
| 75 | } |
| 76 | return false; |
| 77 | } |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 78 | } |
| 79 | |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 80 | private final Call mCall; |
| 81 | private final ConnectionServiceRepository mRepository; |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 82 | private List<CallAttemptRecord> mAttemptRecords; |
| 83 | private Iterator<CallAttemptRecord> mAttemptRecordIterator; |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 84 | private CreateConnectionResponse mResponse; |
Andrew Lee | 701dc00 | 2014-09-11 21:29:12 -0700 | [diff] [blame^] | 85 | private DisconnectCause mLastErrorDisconnectCause; |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 86 | |
| 87 | CreateConnectionProcessor( |
| 88 | Call call, ConnectionServiceRepository repository, CreateConnectionResponse response) { |
| 89 | mCall = call; |
| 90 | mRepository = repository; |
| 91 | mResponse = response; |
| 92 | } |
| 93 | |
| 94 | void process() { |
| 95 | Log.v(this, "process"); |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 96 | mAttemptRecords = new ArrayList<>(); |
Ihab Awad | b78b276 | 2014-07-25 15:16:23 -0700 | [diff] [blame] | 97 | if (mCall.getTargetPhoneAccount() != null) { |
Sailesh Nepal | 7957f9c | 2014-08-09 17:13:19 -0700 | [diff] [blame] | 98 | mAttemptRecords.add(new CallAttemptRecord( |
| 99 | mCall.getTargetPhoneAccount(), mCall.getTargetPhoneAccount())); |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 100 | } |
Sailesh Nepal | 7957f9c | 2014-08-09 17:13:19 -0700 | [diff] [blame] | 101 | adjustAttemptsForConnectionManager(); |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 102 | adjustAttemptsForEmergency(); |
| 103 | mAttemptRecordIterator = mAttemptRecords.iterator(); |
Ihab Awad | 69eb0f5 | 2014-07-18 11:20:37 -0700 | [diff] [blame] | 104 | attemptNextPhoneAccount(); |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 105 | } |
| 106 | |
| 107 | void abort() { |
| 108 | Log.v(this, "abort"); |
| 109 | |
| 110 | // Clear the response first to prevent attemptNextConnectionService from attempting any |
| 111 | // more services. |
| 112 | CreateConnectionResponse response = mResponse; |
| 113 | mResponse = null; |
| 114 | |
| 115 | ConnectionServiceWrapper service = mCall.getConnectionService(); |
| 116 | if (service != null) { |
| 117 | service.abort(mCall); |
| 118 | mCall.clearConnectionService(); |
| 119 | } |
| 120 | if (response != null) { |
Andrew Lee | 701dc00 | 2014-09-11 21:29:12 -0700 | [diff] [blame^] | 121 | response.handleCreateConnectionFailure(new DisconnectCause(DisconnectCause.LOCAL)); |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 122 | } |
| 123 | } |
| 124 | |
Ihab Awad | 69eb0f5 | 2014-07-18 11:20:37 -0700 | [diff] [blame] | 125 | private void attemptNextPhoneAccount() { |
| 126 | Log.v(this, "attemptNextPhoneAccount"); |
Tyler Gunn | 7cc70b4 | 2014-09-12 22:17:27 -0700 | [diff] [blame] | 127 | PhoneAccountRegistrar registrar = TelecomApp.getInstance().getPhoneAccountRegistrar(); |
Tyler Gunn | cb59b67 | 2014-08-20 09:02:11 -0700 | [diff] [blame] | 128 | CallAttemptRecord attempt = null; |
| 129 | if (mAttemptRecordIterator.hasNext()) { |
| 130 | attempt = mAttemptRecordIterator.next(); |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 131 | |
Tyler Gunn | cb59b67 | 2014-08-20 09:02:11 -0700 | [diff] [blame] | 132 | if (!registrar.phoneAccountHasPermission(attempt.connectionManagerPhoneAccount)) { |
| 133 | Log.w(this, |
| 134 | "Connection mgr does not have BIND_CONNECTION_SERVICE for attempt: %s", |
| 135 | attempt); |
| 136 | attemptNextPhoneAccount(); |
| 137 | return; |
| 138 | } |
| 139 | |
| 140 | // If the target PhoneAccount differs from the ConnectionManager phone acount, ensure it |
| 141 | // also has BIND_CONNECTION_SERVICE permission. |
| 142 | if (!attempt.connectionManagerPhoneAccount.equals(attempt.targetPhoneAccount) && |
| 143 | !registrar.phoneAccountHasPermission(attempt.targetPhoneAccount)) { |
| 144 | Log.w(this, |
| 145 | "Target PhoneAccount does not have BIND_CONNECTION_SERVICE for attempt: %s", |
| 146 | attempt); |
| 147 | attemptNextPhoneAccount(); |
| 148 | return; |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | if (mResponse != null && attempt != null) { |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 153 | Log.i(this, "Trying attempt %s", attempt); |
Evan Charlton | 94d0162 | 2014-07-20 12:32:05 -0700 | [diff] [blame] | 154 | ConnectionServiceWrapper service = |
Ihab Awad | b78b276 | 2014-07-25 15:16:23 -0700 | [diff] [blame] | 155 | mRepository.getService( |
| 156 | attempt.connectionManagerPhoneAccount.getComponentName()); |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 157 | if (service == null) { |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 158 | Log.i(this, "Found no connection service for attempt %s", attempt); |
Ihab Awad | 69eb0f5 | 2014-07-18 11:20:37 -0700 | [diff] [blame] | 159 | attemptNextPhoneAccount(); |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 160 | } else { |
Ihab Awad | b78b276 | 2014-07-25 15:16:23 -0700 | [diff] [blame] | 161 | mCall.setConnectionManagerPhoneAccount(attempt.connectionManagerPhoneAccount); |
| 162 | mCall.setTargetPhoneAccount(attempt.targetPhoneAccount); |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 163 | mCall.setConnectionService(service); |
| 164 | Log.i(this, "Attempting to call from %s", service.getComponentName()); |
| 165 | service.createConnection(mCall, new Response(service)); |
| 166 | } |
| 167 | } else { |
Ihab Awad | 69eb0f5 | 2014-07-18 11:20:37 -0700 | [diff] [blame] | 168 | Log.v(this, "attemptNextPhoneAccount, no more accounts, failing"); |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 169 | if (mResponse != null) { |
Andrew Lee | 701dc00 | 2014-09-11 21:29:12 -0700 | [diff] [blame^] | 170 | mResponse.handleCreateConnectionFailure(mLastErrorDisconnectCause); |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 171 | mResponse = null; |
| 172 | mCall.clearConnectionService(); |
| 173 | } |
| 174 | } |
| 175 | } |
| 176 | |
Sailesh Nepal | 7957f9c | 2014-08-09 17:13:19 -0700 | [diff] [blame] | 177 | private boolean shouldSetConnectionManager() { |
| 178 | if (mAttemptRecords.size() == 0) { |
| 179 | return false; |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 180 | } |
Ihab Awad | c17294c | 2014-08-04 19:23:37 -0700 | [diff] [blame] | 181 | |
Sailesh Nepal | 7957f9c | 2014-08-09 17:13:19 -0700 | [diff] [blame] | 182 | if (mAttemptRecords.size() > 1) { |
| 183 | Log.d(this, "shouldSetConnectionManager, error, mAttemptRecords should not have more " |
| 184 | + "than 1 record"); |
| 185 | return false; |
| 186 | } |
| 187 | |
Tyler Gunn | 7cc70b4 | 2014-09-12 22:17:27 -0700 | [diff] [blame] | 188 | PhoneAccountRegistrar registrar = TelecomApp.getInstance().getPhoneAccountRegistrar(); |
Sailesh Nepal | 7957f9c | 2014-08-09 17:13:19 -0700 | [diff] [blame] | 189 | PhoneAccountHandle connectionManager = registrar.getSimCallManager(); |
| 190 | if (connectionManager == null) { |
| 191 | return false; |
| 192 | } |
| 193 | |
| 194 | PhoneAccountHandle targetPhoneAccountHandle = mAttemptRecords.get(0).targetPhoneAccount; |
| 195 | if (Objects.equals(connectionManager, targetPhoneAccountHandle)) { |
| 196 | return false; |
| 197 | } |
| 198 | |
| 199 | // Connection managers are only allowed to manage SIM subscriptions. |
| 200 | PhoneAccount targetPhoneAccount = registrar.getPhoneAccount(targetPhoneAccountHandle); |
| 201 | boolean isSimSubscription = (targetPhoneAccount.getCapabilities() & |
| 202 | PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION) != 0; |
| 203 | if (!isSimSubscription) { |
| 204 | return false; |
| 205 | } |
| 206 | |
| 207 | return true; |
| 208 | } |
| 209 | |
| 210 | // If there exists a registered connection manager then use it. |
| 211 | private void adjustAttemptsForConnectionManager() { |
| 212 | if (shouldSetConnectionManager()) { |
| 213 | CallAttemptRecord record = new CallAttemptRecord( |
Tyler Gunn | 7cc70b4 | 2014-09-12 22:17:27 -0700 | [diff] [blame] | 214 | TelecomApp.getInstance().getPhoneAccountRegistrar().getSimCallManager(), |
Sailesh Nepal | 7957f9c | 2014-08-09 17:13:19 -0700 | [diff] [blame] | 215 | mAttemptRecords.get(0).targetPhoneAccount); |
| 216 | Log.v(this, "setConnectionManager, changing %s -> %s", |
| 217 | mAttemptRecords.get(0).targetPhoneAccount, record); |
| 218 | mAttemptRecords.set(0, record); |
| 219 | } else { |
| 220 | Log.v(this, "setConnectionManager, not changing"); |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 221 | } |
| 222 | } |
| 223 | |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 224 | // If we are possibly attempting to call a local emergency number, ensure that the |
Ihab Awad | 69eb0f5 | 2014-07-18 11:20:37 -0700 | [diff] [blame] | 225 | // plain PSTN connection services are listed, and nothing else. |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 226 | private void adjustAttemptsForEmergency() { |
Tyler Gunn | 7cc70b4 | 2014-09-12 22:17:27 -0700 | [diff] [blame] | 227 | if (TelephonyUtil.shouldProcessAsEmergency(TelecomApp.getInstance(), mCall.getHandle())) { |
Ihab Awad | 69eb0f5 | 2014-07-18 11:20:37 -0700 | [diff] [blame] | 228 | Log.i(this, "Emergency number detected"); |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 229 | mAttemptRecords.clear(); |
Tyler Gunn | 7cc70b4 | 2014-09-12 22:17:27 -0700 | [diff] [blame] | 230 | List<PhoneAccount> allAccounts = TelecomApp.getInstance() |
Tyler Gunn | 8e0fef4 | 2014-09-08 18:34:44 -0700 | [diff] [blame] | 231 | .getPhoneAccountRegistrar().getAllPhoneAccounts(); |
| 232 | // First, add SIM phone accounts which can place emergency calls. |
| 233 | for (PhoneAccount phoneAccount : allAccounts) { |
| 234 | if (phoneAccount.hasCapabilities(PhoneAccount.CAPABILITY_PLACE_EMERGENCY_CALLS) && |
| 235 | phoneAccount.hasCapabilities(PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION)) { |
| 236 | Log.i(this, "Will try PSTN account %s for emergency", |
| 237 | phoneAccount.getAccountHandle()); |
Ihab Awad | 293edf2 | 2014-07-24 17:52:29 -0700 | [diff] [blame] | 238 | mAttemptRecords.add( |
| 239 | new CallAttemptRecord( |
Tyler Gunn | 8e0fef4 | 2014-09-08 18:34:44 -0700 | [diff] [blame] | 240 | phoneAccount.getAccountHandle(), |
| 241 | phoneAccount.getAccountHandle())); |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 242 | } |
| 243 | } |
Tyler Gunn | 6e6f6d1 | 2014-08-20 15:22:18 -0700 | [diff] [blame] | 244 | |
Tyler Gunn | 8e0fef4 | 2014-09-08 18:34:44 -0700 | [diff] [blame] | 245 | // Next, add the connection manager account as a backup if it can place emergency calls. |
Tyler Gunn | 7cc70b4 | 2014-09-12 22:17:27 -0700 | [diff] [blame] | 246 | PhoneAccountHandle callManagerHandle = TelecomApp.getInstance() |
Tyler Gunn | 6e6f6d1 | 2014-08-20 15:22:18 -0700 | [diff] [blame] | 247 | .getPhoneAccountRegistrar().getSimCallManager(); |
Tyler Gunn | 8e0fef4 | 2014-09-08 18:34:44 -0700 | [diff] [blame] | 248 | if (callManagerHandle != null) { |
Tyler Gunn | 7cc70b4 | 2014-09-12 22:17:27 -0700 | [diff] [blame] | 249 | PhoneAccount callManager = TelecomApp.getInstance() |
Tyler Gunn | 8e0fef4 | 2014-09-08 18:34:44 -0700 | [diff] [blame] | 250 | .getPhoneAccountRegistrar().getPhoneAccount(callManagerHandle); |
| 251 | if (callManager.hasCapabilities(PhoneAccount.CAPABILITY_PLACE_EMERGENCY_CALLS)) { |
| 252 | CallAttemptRecord callAttemptRecord = new CallAttemptRecord(callManagerHandle, |
Tyler Gunn | 7cc70b4 | 2014-09-12 22:17:27 -0700 | [diff] [blame] | 253 | TelecomApp.getInstance().getPhoneAccountRegistrar(). |
Tyler Gunn | 8e0fef4 | 2014-09-08 18:34:44 -0700 | [diff] [blame] | 254 | getDefaultOutgoingPhoneAccount(mCall.getHandle().getScheme()) |
| 255 | ); |
Tyler Gunn | 6e6f6d1 | 2014-08-20 15:22:18 -0700 | [diff] [blame] | 256 | |
Tyler Gunn | 8e0fef4 | 2014-09-08 18:34:44 -0700 | [diff] [blame] | 257 | if (!mAttemptRecords.contains(callAttemptRecord)) { |
| 258 | Log.i(this, "Will try Connection Manager account %s for emergency", |
| 259 | callManager); |
| 260 | mAttemptRecords.add(callAttemptRecord); |
| 261 | } |
| 262 | } |
Tyler Gunn | 6e6f6d1 | 2014-08-20 15:22:18 -0700 | [diff] [blame] | 263 | } |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 264 | } |
| 265 | } |
| 266 | |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 267 | private class Response implements CreateConnectionResponse { |
| 268 | private final ConnectionServiceWrapper mService; |
| 269 | |
| 270 | Response(ConnectionServiceWrapper service) { |
| 271 | mService = service; |
| 272 | } |
| 273 | |
| 274 | @Override |
Ihab Awad | 8000845 | 2014-08-23 20:35:44 -0700 | [diff] [blame] | 275 | public void handleCreateConnectionSuccess( |
| 276 | CallIdMapper idMapper, |
| 277 | ParcelableConnection connection) { |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 278 | if (mResponse == null) { |
Ihab Awad | fb5560d | 2014-08-18 09:32:51 -0700 | [diff] [blame] | 279 | // Nobody is listening for this connection attempt any longer; ask the responsible |
| 280 | // ConnectionService to tear down any resources associated with the call |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 281 | mService.abort(mCall); |
| 282 | } else { |
Ihab Awad | fb5560d | 2014-08-18 09:32:51 -0700 | [diff] [blame] | 283 | // Success -- share the good news and remember that we are no longer interested |
| 284 | // in hearing about any more attempts |
Ihab Awad | 8000845 | 2014-08-23 20:35:44 -0700 | [diff] [blame] | 285 | mResponse.handleCreateConnectionSuccess(idMapper, connection); |
Santos Cordon | 72890ce | 2014-07-21 01:32:04 -0700 | [diff] [blame] | 286 | mResponse = null; |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 287 | } |
| 288 | } |
| 289 | |
| 290 | @Override |
Andrew Lee | 701dc00 | 2014-09-11 21:29:12 -0700 | [diff] [blame^] | 291 | public void handleCreateConnectionFailure(DisconnectCause errorDisconnectCause) { |
Ihab Awad | fb5560d | 2014-08-18 09:32:51 -0700 | [diff] [blame] | 292 | // Failure of some sort; record the reasons for failure and try again if possible |
Andrew Lee | 701dc00 | 2014-09-11 21:29:12 -0700 | [diff] [blame^] | 293 | Log.d(CreateConnectionProcessor.this, "Connection failed: (%s)", errorDisconnectCause); |
| 294 | mLastErrorDisconnectCause = errorDisconnectCause; |
Ihab Awad | 69eb0f5 | 2014-07-18 11:20:37 -0700 | [diff] [blame] | 295 | attemptNextPhoneAccount(); |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 296 | } |
Sailesh Nepal | 664837f | 2014-07-14 16:31:51 -0700 | [diff] [blame] | 297 | } |
| 298 | } |