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

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

Issue 1369653002: Android Chromoting: Tint menu icons. (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
« no previous file with comments | « remoting/android/java/src/org/chromium/chromoting/ChromotingUtil.java ('k') | 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.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.content.Intent; 8 import android.content.Intent;
9 import android.content.pm.ApplicationInfo; 9 import android.content.pm.ApplicationInfo;
10 import android.content.pm.PackageManager; 10 import android.content.pm.PackageManager;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 .getApplicationInfo(getPackageName(), PackageManager.GET_MET A_DATA); 122 .getApplicationInfo(getPackageName(), PackageManager.GET_MET A_DATA);
123 Bundle bundle = ai.metaData; 123 Bundle bundle = ai.metaData;
124 enableCardboard = bundle.getInt("enable_cardboard") == 1; 124 enableCardboard = bundle.getInt("enable_cardboard") == 1;
125 } catch (NameNotFoundException e) { 125 } catch (NameNotFoundException e) {
126 // Does nothing since by default Cardboard activity is turned off. 126 // Does nothing since by default Cardboard activity is turned off.
127 } 127 }
128 128
129 MenuItem item = menu.findItem(R.id.actionbar_cardboard); 129 MenuItem item = menu.findItem(R.id.actionbar_cardboard);
130 item.setVisible(enableCardboard); 130 item.setVisible(enableCardboard);
131 131
132 ChromotingUtil.tintMenuIcons(this, menu);
133
132 return super.onCreateOptionsMenu(menu); 134 return super.onCreateOptionsMenu(menu);
133 } 135 }
134 136
135 /** Called whenever the visibility of the system status bar or navigation ba r changes. */ 137 /** Called whenever the visibility of the system status bar or navigation ba r changes. */
136 @Override 138 @Override
137 public void onSystemUiVisibilityChange(int visibility) { 139 public void onSystemUiVisibilityChange(int visibility) {
138 // Ensure the action-bar's visibility matches that of the system control s. This 140 // Ensure the action-bar's visibility matches that of the system control s. This
139 // minimizes the number of states the UI can be in, to keep things simpl e for the user. 141 // minimizes the number of states the UI can be in, to keep things simpl e for the user.
140 142
141 // Determine if the system is in fullscreen/lights-out mode. LOW_PROFILE is needed since 143 // Determine if the system is in fullscreen/lights-out mode. LOW_PROFILE is needed since
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 JniInterface.sendKeyEvent(0, KeyEvent.KEYCODE_SHIFT_LEFT, presse d); 333 JniInterface.sendKeyEvent(0, KeyEvent.KEYCODE_SHIFT_LEFT, presse d);
332 JniInterface.sendKeyEvent(0, KeyEvent.KEYCODE_EQUALS, pressed); 334 JniInterface.sendKeyEvent(0, KeyEvent.KEYCODE_EQUALS, pressed);
333 return true; 335 return true;
334 336
335 default: 337 default:
336 // We try to send all other key codes to the host directly. 338 // We try to send all other key codes to the host directly.
337 return JniInterface.sendKeyEvent(0, keyCode, pressed); 339 return JniInterface.sendKeyEvent(0, keyCode, pressed);
338 } 340 }
339 } 341 }
340 } 342 }
OLDNEW
« no previous file with comments | « remoting/android/java/src/org/chromium/chromoting/ChromotingUtil.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698