| 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.content.DialogInterface; | 9 import android.content.DialogInterface; |
| 10 import android.content.Intent; | 10 import android.content.Intent; |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 int itemId = menuFinal.getItem(i).getItemId(); | 235 int itemId = menuFinal.getItem(i).getItemId(); |
| 236 View menuItemView = findViewById(itemId); | 236 View menuItemView = findViewById(itemId); |
| 237 if (menuItemView != null) { | 237 if (menuItemView != null) { |
| 238 attachToolbarInteractionListenerToView(menuItemView)
; | 238 attachToolbarInteractionListenerToView(menuItemView)
; |
| 239 } | 239 } |
| 240 } | 240 } |
| 241 } | 241 } |
| 242 }); | 242 }); |
| 243 } | 243 } |
| 244 | 244 |
| 245 // TODO(joedow): Remove this line when touch input mode has been impleme
nted. | |
| 246 menu.findItem(R.id.actionbar_input_mode).setVisible(false); | |
| 247 | |
| 248 ChromotingUtil.tintMenuIcons(this, menu); | 245 ChromotingUtil.tintMenuIcons(this, menu); |
| 249 | 246 |
| 250 // Wait to set the input mode until after the default tinting has been a
pplied. | 247 // Wait to set the input mode until after the default tinting has been a
pplied. |
| 251 setInputMode(mInputMode); | 248 setInputMode(mInputMode); |
| 252 | 249 |
| 253 return super.onCreateOptionsMenu(menu); | 250 return super.onCreateOptionsMenu(menu); |
| 254 } | 251 } |
| 255 | 252 |
| 256 private InputMode getInitialInputModeValue() { | 253 private InputMode getInitialInputModeValue() { |
| 257 // Load the previously-selected input mode from Preferences. | 254 // Load the previously-selected input mode from Preferences. |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 JniInterface.sendKeyEvent(0, KeyEvent.KEYCODE_SHIFT_LEFT, presse
d); | 663 JniInterface.sendKeyEvent(0, KeyEvent.KEYCODE_SHIFT_LEFT, presse
d); |
| 667 JniInterface.sendKeyEvent(0, KeyEvent.KEYCODE_EQUALS, pressed); | 664 JniInterface.sendKeyEvent(0, KeyEvent.KEYCODE_EQUALS, pressed); |
| 668 return true; | 665 return true; |
| 669 | 666 |
| 670 default: | 667 default: |
| 671 // We try to send all other key codes to the host directly. | 668 // We try to send all other key codes to the host directly. |
| 672 return JniInterface.sendKeyEvent(0, keyCode, pressed); | 669 return JniInterface.sendKeyEvent(0, keyCode, pressed); |
| 673 } | 670 } |
| 674 } | 671 } |
| 675 } | 672 } |
| OLD | NEW |