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

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

Issue 2396323003: [Remoting Android] Talkback confirmation for changing account (Closed)
Patch Set: Created 4 years, 2 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.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;
11 import android.content.SharedPreferences; 11 import android.content.SharedPreferences;
12 import android.content.pm.PackageManager; 12 import android.content.pm.PackageManager;
13 import android.content.res.Configuration; 13 import android.content.res.Configuration;
14 import android.graphics.drawable.Drawable; 14 import android.graphics.drawable.Drawable;
15 import android.os.Build;
15 import android.os.Bundle; 16 import android.os.Bundle;
16 import android.provider.Settings; 17 import android.provider.Settings;
17 import android.support.v4.content.ContextCompat; 18 import android.support.v4.content.ContextCompat;
18 import android.support.v4.graphics.drawable.DrawableCompat; 19 import android.support.v4.graphics.drawable.DrawableCompat;
19 import android.support.v4.widget.DrawerLayout; 20 import android.support.v4.widget.DrawerLayout;
20 import android.support.v7.app.ActionBarDrawerToggle; 21 import android.support.v7.app.ActionBarDrawerToggle;
21 import android.support.v7.app.AlertDialog; 22 import android.support.v7.app.AlertDialog;
22 import android.support.v7.app.AppCompatActivity; 23 import android.support.v7.app.AppCompatActivity;
23 import android.support.v7.widget.Toolbar; 24 import android.support.v7.widget.Toolbar;
24 import android.view.ContextMenu; 25 import android.view.ContextMenu;
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 @Override 598 @Override
598 public void onError(OAuthTokenFetcher.Error error) { 599 public void onError(OAuthTokenFetcher.Error error) {
599 showAuthErrorMessage(error); 600 showAuthErrorMessage(error);
600 updateHostListView(); 601 updateHostListView();
601 } 602 }
602 }); 603 });
603 } 604 }
604 605
605 @Override 606 @Override
606 public void onAccountSelected(String accountName) { 607 public void onAccountSelected(String accountName) {
608 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
609 String logInAnnouncement = getString(R.string.log_in_account_descrip tion, accountName);
Yuwei 2016/10/07 19:16:30 Just double check to be safe. Will accountName eve
Lambros 2016/10/07 20:46:22 This is OK - onAccountSelected() should never be c
Yuwei 2016/10/10 21:43:31 Acknowledged.
610 mAccountSwitcher.getView().announceForAccessibility(logInAnnouncemen t);
611 }
607 mAccount = accountName; 612 mAccount = accountName;
608 JniInterface.setAccountForLogging(accountName); 613 JniInterface.setAccountForLogging(accountName);
609 614
610 // The current host list is no longer valid for the new account, so clea r the list. 615 // The current host list is no longer valid for the new account, so clea r the list.
611 mHosts = new HostInfo[0]; 616 mHosts = new HostInfo[0];
612 updateUi(); 617 updateUi();
613 refreshHostList(); 618 refreshHostList();
614 } 619 }
615 620
616 @Override 621 @Override
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 // Unreachable, but required by Google Java style and findbugs. 730 // Unreachable, but required by Google Java style and findbugs.
726 assert false : "Unreached"; 731 assert false : "Unreached";
727 } 732 }
728 733
729 if (dismissProgress && mProgressIndicator != null) { 734 if (dismissProgress && mProgressIndicator != null) {
730 mProgressIndicator.dismiss(); 735 mProgressIndicator.dismiss();
731 mProgressIndicator = null; 736 mProgressIndicator = null;
732 } 737 }
733 } 738 }
734 } 739 }
OLDNEW
« no previous file with comments | « no previous file | remoting/resources/remoting_strings.grd » ('j') | remoting/resources/remoting_strings.grd » ('J')

Powered by Google App Engine
This is Rietveld 408576698