| 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.AlertDialog; | 8 import android.app.AlertDialog; |
| 9 import android.app.ProgressDialog; | 9 import android.app.ProgressDialog; |
| 10 import android.content.DialogInterface; | 10 import android.content.DialogInterface; |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 @Override | 331 @Override |
| 332 public boolean onCreateOptionsMenu(Menu menu) { | 332 public boolean onCreateOptionsMenu(Menu menu) { |
| 333 getMenuInflater().inflate(R.menu.chromoting_actionbar, menu); | 333 getMenuInflater().inflate(R.menu.chromoting_actionbar, menu); |
| 334 mRefreshButton = menu.findItem(R.id.actionbar_directoryrefresh); | 334 mRefreshButton = menu.findItem(R.id.actionbar_directoryrefresh); |
| 335 | 335 |
| 336 if (mAccount == null) { | 336 if (mAccount == null) { |
| 337 // If there is no account, don't allow the user to refresh the listi
ng. | 337 // If there is no account, don't allow the user to refresh the listi
ng. |
| 338 mRefreshButton.setEnabled(false); | 338 mRefreshButton.setEnabled(false); |
| 339 } | 339 } |
| 340 | 340 |
| 341 ChromotingUtil.tintMenuIcons(this, menu); |
| 342 |
| 341 return super.onCreateOptionsMenu(menu); | 343 return super.onCreateOptionsMenu(menu); |
| 342 } | 344 } |
| 343 | 345 |
| 344 /** Called whenever an action bar button is pressed. */ | 346 /** Called whenever an action bar button is pressed. */ |
| 345 @Override | 347 @Override |
| 346 public boolean onOptionsItemSelected(MenuItem item) { | 348 public boolean onOptionsItemSelected(MenuItem item) { |
| 347 if (mDrawerToggle.onOptionsItemSelected(item)) { | 349 if (mDrawerToggle.onOptionsItemSelected(item)) { |
| 348 return true; | 350 return true; |
| 349 } | 351 } |
| 350 | 352 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 // Unreachable, but required by Google Java style and findbugs. | 556 // Unreachable, but required by Google Java style and findbugs. |
| 555 assert false : "Unreached"; | 557 assert false : "Unreached"; |
| 556 } | 558 } |
| 557 | 559 |
| 558 if (dismissProgress && mProgressIndicator != null) { | 560 if (dismissProgress && mProgressIndicator != null) { |
| 559 mProgressIndicator.dismiss(); | 561 mProgressIndicator.dismiss(); |
| 560 mProgressIndicator = null; | 562 mProgressIndicator = null; |
| 561 } | 563 } |
| 562 } | 564 } |
| 563 } | 565 } |
| OLD | NEW |