| 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.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.app.ProgressDialog; | 8 import android.app.ProgressDialog; |
| 9 import android.content.DialogInterface; | 9 import android.content.DialogInterface; |
| 10 import android.content.Intent; | 10 import android.content.Intent; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 /** Only accounts of this type will be selectable for authentication. */ | 58 /** Only accounts of this type will be selectable for authentication. */ |
| 59 private static final String ACCOUNT_TYPE = "com.google"; | 59 private static final String ACCOUNT_TYPE = "com.google"; |
| 60 | 60 |
| 61 /** Scope to use when fetching the OAuth token. */ | 61 /** Scope to use when fetching the OAuth token. */ |
| 62 private static final String TOKEN_SCOPE = "oauth2:https://www.googleapis.com
/auth/chromoting " | 62 private static final String TOKEN_SCOPE = "oauth2:https://www.googleapis.com
/auth/chromoting " |
| 63 + "https://www.googleapis.com/auth/googletalk"; | 63 + "https://www.googleapis.com/auth/googletalk"; |
| 64 | 64 |
| 65 /** Result code used for starting {@link DesktopActivity}. */ | 65 /** Result code used for starting {@link DesktopActivity}. */ |
| 66 public static final int DESKTOP_ACTIVITY = 0; | 66 public static final int DESKTOP_ACTIVITY = 0; |
| 67 | 67 |
| 68 /** Result code used for starting {@link CardboardDesktopActivity}. */ | |
| 69 public static final int CARDBOARD_DESKTOP_ACTIVITY = 1; | |
| 70 | |
| 71 /** Preference names for storing selected and recent accounts. */ | 68 /** Preference names for storing selected and recent accounts. */ |
| 72 private static final String PREFERENCE_SELECTED_ACCOUNT = "account_name"; | 69 private static final String PREFERENCE_SELECTED_ACCOUNT = "account_name"; |
| 73 private static final String PREFERENCE_RECENT_ACCOUNT_PREFIX = "recent_accou
nt_"; | 70 private static final String PREFERENCE_RECENT_ACCOUNT_PREFIX = "recent_accou
nt_"; |
| 74 private static final String PREFERENCE_EXPERIMENTAL_FLAGS = "flags"; | 71 private static final String PREFERENCE_EXPERIMENTAL_FLAGS = "flags"; |
| 75 | 72 |
| 76 /** User's account name (email). */ | 73 /** User's account name (email). */ |
| 77 private String mAccount; | 74 private String mAccount; |
| 78 | 75 |
| 79 /** Helper for fetching the host list. */ | 76 /** Helper for fetching the host list. */ |
| 80 private HostListManager mHostListManager; | 77 private HostListManager mHostListManager; |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 // Unreachable, but required by Google Java style and findbugs. | 705 // Unreachable, but required by Google Java style and findbugs. |
| 709 assert false : "Unreached"; | 706 assert false : "Unreached"; |
| 710 } | 707 } |
| 711 | 708 |
| 712 if (dismissProgress && mProgressIndicator != null) { | 709 if (dismissProgress && mProgressIndicator != null) { |
| 713 mProgressIndicator.dismiss(); | 710 mProgressIndicator.dismiss(); |
| 714 mProgressIndicator = null; | 711 mProgressIndicator = null; |
| 715 } | 712 } |
| 716 } | 713 } |
| 717 } | 714 } |
| OLD | NEW |