summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorlambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-27 01:21:14 +0000
committerlambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-27 01:21:14 +0000
commitbe3da6812e249ee08a833c7af8bc01cc930c0c87 (patch)
tree4d458b0633a3ab7dda88516fb6e4759df70ab84f /remoting
parent777e941dbc7e8c8d97e78922f8795e4ec699c51a (diff)
downloadchromium_src-be3da6812e249ee08a833c7af8bc01cc930c0c87.zip
chromium_src-be3da6812e249ee08a833c7af8bc01cc930c0c87.tar.gz
chromium_src-be3da6812e249ee08a833c7af8bc01cc930c0c87.tar.bz2
Move some code from onCreate() to onStart() in Chromoting Android app
This reloads the system's accounts list whenever the app is started (so if the user adds an account, then switches back to the app, the change will be reflected). This also reloads the host list, which will alleviate many of the problems with stale OAuth tokens such as in bug 304719. BUG=304719 NOTRY=true Review URL: https://codereview.chromium.org/212673010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259763 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/android/java/src/org/chromium/chromoting/Chromoting.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/remoting/android/java/src/org/chromium/chromoting/Chromoting.java b/remoting/android/java/src/org/chromium/chromoting/Chromoting.java
index 8727d95..9a477b0 100644
--- a/remoting/android/java/src/org/chromium/chromoting/Chromoting.java
+++ b/remoting/android/java/src/org/chromium/chromoting/Chromoting.java
@@ -155,6 +155,16 @@ public class Chromoting extends Activity implements JniInterface.ConnectionListe
// Bring native components online.
JniInterface.loadLibrary(this);
+ }
+
+ /**
+ * Called when the activity becomes visible. This happens on initial launch and whenever the
+ * user switches to the activity, for example, by using the window-switcher or when coming from
+ * the device's lock screen.
+ */
+ @Override
+ public void onStart() {
+ super.onStart();
mAccounts = AccountManager.get(this).getAccountsByType(ACCOUNT_TYPE);
if (mAccounts.length == 0) {