OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chromoting; | 5 package org.chromium.chromoting; |
6 | 6 |
7 import android.accounts.Account; | 7 import android.accounts.Account; |
8 import android.accounts.AccountManager; | 8 import android.accounts.AccountManager; |
9 import android.accounts.AccountManagerCallback; | 9 import android.accounts.AccountManagerCallback; |
10 import android.accounts.AccountManagerFuture; | 10 import android.accounts.AccountManagerFuture; |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
405 finishActivity(0); | 405 finishActivity(0); |
406 break; | 406 break; |
407 | 407 |
408 case CLOSED: | 408 case CLOSED: |
409 // No need to show toast in this case. Either the connection wil l have failed | 409 // No need to show toast in this case. Either the connection wil l have failed |
410 // because of an error, which will trigger toast already. Or the disconnection will | 410 // because of an error, which will trigger toast already. Or the disconnection will |
411 // have been initiated by the user. | 411 // have been initiated by the user. |
412 dismissProgress = true; | 412 dismissProgress = true; |
413 finishActivity(0); | 413 finishActivity(0); |
414 break; | 414 break; |
415 | |
416 default: | |
417 // Unreachable, but required by Google Java style and findbugs. | |
Sergey Ulanov
2014/01/11 08:55:47
Throw RuntimeException here?
Lambros
2014/01/13 17:38:32
Added an assertion, which seems the right thing to
| |
415 } | 418 } |
416 | 419 |
417 if (dismissProgress && mProgressIndicator != null) { | 420 if (dismissProgress && mProgressIndicator != null) { |
418 mProgressIndicator.dismiss(); | 421 mProgressIndicator.dismiss(); |
419 mProgressIndicator = null; | 422 mProgressIndicator = null; |
420 } | 423 } |
421 } | 424 } |
422 } | 425 } |
OLD | NEW |