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

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

Issue 1322933002: Fix deprecation warnings in remoting/android/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
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.annotation.SuppressLint; 9 import android.annotation.SuppressLint;
10 import android.app.AlertDialog; 10 import android.app.AlertDialog;
11 import android.app.ProgressDialog; 11 import android.app.ProgressDialog;
12 import android.content.DialogInterface; 12 import android.content.DialogInterface;
13 import android.content.Intent; 13 import android.content.Intent;
14 import android.content.SharedPreferences; 14 import android.content.SharedPreferences;
15 import android.content.res.Configuration; 15 import android.content.res.Configuration;
16 import android.content.res.Resources; 16 import android.content.res.Resources;
17 import android.os.Bundle; 17 import android.os.Bundle;
18 import android.provider.Settings; 18 import android.provider.Settings;
19 import android.support.v4.widget.DrawerLayout; 19 import android.support.v4.widget.DrawerLayout;
20 import android.support.v7.app.ActionBarActivity;
21 import android.support.v7.app.ActionBarDrawerToggle; 20 import android.support.v7.app.ActionBarDrawerToggle;
21 import android.support.v7.app.AppCompatActivity;
22 import android.support.v7.widget.Toolbar; 22 import android.support.v7.widget.Toolbar;
23 import android.text.TextUtils; 23 import android.text.TextUtils;
24 import android.util.Log; 24 import android.util.Log;
25 import android.view.Menu; 25 import android.view.Menu;
26 import android.view.MenuItem; 26 import android.view.MenuItem;
27 import android.view.View; 27 import android.view.View;
28 import android.widget.AdapterView; 28 import android.widget.AdapterView;
29 import android.widget.ArrayAdapter; 29 import android.widget.ArrayAdapter;
30 import android.widget.ListView; 30 import android.widget.ListView;
31 import android.widget.Spinner; 31 import android.widget.Spinner;
32 import android.widget.Toast; 32 import android.widget.Toast;
33 33
34 import org.chromium.chromoting.jni.JniInterface; 34 import org.chromium.chromoting.jni.JniInterface;
35 35
36 import java.util.Arrays; 36 import java.util.Arrays;
37 import java.util.Locale; 37 import java.util.Locale;
38 38
39 /** 39 /**
40 * The user interface for querying and displaying a user's host list from the di rectory server. It 40 * The user interface for querying and displaying a user's host list from the di rectory server. It
41 * also requests and renews authentication tokens using the system account manag er. 41 * also requests and renews authentication tokens using the system account manag er.
42 */ 42 */
43 public class Chromoting extends ActionBarActivity implements JniInterface.Connec tionListener, 43 public class Chromoting extends AppCompatActivity implements JniInterface.Connec tionListener,
44 AdapterView.OnItemSelectedListener, HostListLoader.Callback, View.OnClic kListener { 44 AdapterView.OnItemSelectedListener, HostListLoader.Callback, View.OnClic kListener {
45 /** Only accounts of this type will be selectable for authentication. */ 45 /** Only accounts of this type will be selectable for authentication. */
46 private static final String ACCOUNT_TYPE = "com.google"; 46 private static final String ACCOUNT_TYPE = "com.google";
47 47
48 /** Web page to be displayed in the Help screen when launched from this acti vity. */ 48 /** Web page to be displayed in the Help screen when launched from this acti vity. */
49 private static final String HELP_URL = 49 private static final String HELP_URL =
50 "https://support.google.com/chrome/?p=mobile_crd_hostslist"; 50 "https://support.google.com/chrome/?p=mobile_crd_hostslist";
51 51
52 /** Web page to be displayed when user triggers the hyperlink for setting up hosts. */ 52 /** Web page to be displayed when user triggers the hyperlink for setting up hosts. */
53 private static final String HOST_SETUP_URL = 53 private static final String HOST_SETUP_URL =
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 // Unreachable, but required by Google Java style and findbugs. 540 // Unreachable, but required by Google Java style and findbugs.
541 assert false : "Unreached"; 541 assert false : "Unreached";
542 } 542 }
543 543
544 if (dismissProgress && mProgressIndicator != null) { 544 if (dismissProgress && mProgressIndicator != null) {
545 mProgressIndicator.dismiss(); 545 mProgressIndicator.dismiss();
546 mProgressIndicator = null; 546 mProgressIndicator = null;
547 } 547 }
548 } 548 }
549 } 549 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698