Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: remoting/android/java/src/org/chromium/chromoting/Chromoting.java

Issue 308793007: Fix Chromoting Android client crashed on launch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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;
11 import android.accounts.AuthenticatorException; 11 import android.accounts.AuthenticatorException;
12 import android.accounts.OperationCanceledException; 12 import android.accounts.OperationCanceledException;
13 import android.annotation.SuppressLint; 13 import android.annotation.SuppressLint;
14 import android.app.ActionBar; 14 import android.app.ActionBar;
15 import android.app.Activity; 15 import android.app.Activity;
16 import android.app.AlertDialog; 16 import android.app.AlertDialog;
17 import android.app.ProgressDialog; 17 import android.app.ProgressDialog;
18 import android.content.DialogInterface; 18 import android.content.DialogInterface;
19 import android.content.Intent; 19 import android.content.Intent;
20 import android.content.SharedPreferences; 20 import android.content.SharedPreferences;
21 import android.content.res.Configuration; 21 import android.content.res.Configuration;
22 import android.os.Build;
23 import android.os.Bundle; 22 import android.os.Bundle;
24 import android.provider.Settings; 23 import android.provider.Settings;
25 import android.util.Log; 24 import android.util.Log;
26 import android.view.Menu; 25 import android.view.Menu;
27 import android.view.MenuItem; 26 import android.view.MenuItem;
28 import android.view.View; 27 import android.view.View;
29 import android.widget.ArrayAdapter; 28 import android.widget.ArrayAdapter;
30 import android.widget.ListView; 29 import android.widget.ListView;
31 import android.widget.Toast; 30 import android.widget.Toast;
32 31
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 explanation = getString(R.string.error_authentication_failed); 389 explanation = getString(R.string.error_authentication_failed);
391 Toast.makeText(this, explanation, Toast.LENGTH_LONG).show(); 390 Toast.makeText(this, explanation, Toast.LENGTH_LONG).show();
392 setHostListProgressVisible(false); 391 setHostListProgressVisible(false);
393 } 392 }
394 } 393 }
395 394
396 /** 395 /**
397 * Updates the infotext and host list display. 396 * Updates the infotext and host list display.
398 */ 397 */
399 private void updateUi() { 398 private void updateUi() {
400 mRefreshButton.setEnabled(mAccount != null); 399 if (mRefreshButton != null) {
Lambros 2014/06/02 17:07:22 Looks like there's a race between updateUi() and o
401 400 mRefreshButton.setEnabled(mAccount != null);
401 }
402 ArrayAdapter<HostInfo> displayer = new HostListAdapter(this, R.layout.ho st, mHosts); 402 ArrayAdapter<HostInfo> displayer = new HostListAdapter(this, R.layout.ho st, mHosts);
403 Log.i("hostlist", "About to populate host list display"); 403 Log.i("hostlist", "About to populate host list display");
404 mHostListView.setAdapter(displayer); 404 mHostListView.setAdapter(displayer);
405 } 405 }
406 406
407 @Override 407 @Override
408 public void onConnectionState(JniInterface.ConnectionListener.State state, 408 public void onConnectionState(JniInterface.ConnectionListener.State state,
409 JniInterface.ConnectionListener.Error error) { 409 JniInterface.ConnectionListener.Error error) {
410 boolean dismissProgress = false; 410 boolean dismissProgress = false;
411 switch (state) { 411 switch (state) {
(...skipping 28 matching lines...) Expand all
440 // Unreachable, but required by Google Java style and findbugs. 440 // Unreachable, but required by Google Java style and findbugs.
441 assert false : "Unreached"; 441 assert false : "Unreached";
442 } 442 }
443 443
444 if (dismissProgress && mProgressIndicator != null) { 444 if (dismissProgress && mProgressIndicator != null) {
445 mProgressIndicator.dismiss(); 445 mProgressIndicator.dismiss();
446 mProgressIndicator = null; 446 mProgressIndicator = null;
447 } 447 }
448 } 448 }
449 } 449 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698