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.Activity; | 8 import android.app.Activity; |
9 import android.content.res.Configuration; | 9 import android.content.res.Configuration; |
10 import android.os.Build; | 10 import android.os.Build; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 } | 105 } |
106 | 106 |
107 public void showActionBar() { | 107 public void showActionBar() { |
108 mOverlayButton.setVisibility(View.INVISIBLE); | 108 mOverlayButton.setVisibility(View.INVISIBLE); |
109 getActionBar().show(); | 109 getActionBar().show(); |
110 | 110 |
111 View decorView = getWindow().getDecorView(); | 111 View decorView = getWindow().getDecorView(); |
112 decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE); | 112 decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE); |
113 } | 113 } |
114 | 114 |
| 115 @SuppressLint("InlinedApi") |
115 public void hideActionBar() { | 116 public void hideActionBar() { |
116 mOverlayButton.setVisibility(View.VISIBLE); | 117 mOverlayButton.setVisibility(View.VISIBLE); |
117 getActionBar().hide(); | 118 getActionBar().hide(); |
118 | 119 |
119 View decorView = getWindow().getDecorView(); | 120 View decorView = getWindow().getDecorView(); |
120 | 121 |
121 // LOW_PROFILE gives the status and navigation bars a "lights-out" appea
rance. | 122 // LOW_PROFILE gives the status and navigation bars a "lights-out" appea
rance. |
122 // FULLSCREEN hides the status bar on supported devices (4.1 and above). | 123 // FULLSCREEN hides the status bar on supported devices (4.1 and above). |
123 int flags = getSystemUiFlags(); | 124 int flags = getSystemUiFlags(); |
124 | 125 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 JniInterface.sendKeyEvent(KeyEvent.KEYCODE_SHIFT_LEFT, pressed); | 245 JniInterface.sendKeyEvent(KeyEvent.KEYCODE_SHIFT_LEFT, pressed); |
245 JniInterface.sendKeyEvent(KeyEvent.KEYCODE_EQUALS, pressed); | 246 JniInterface.sendKeyEvent(KeyEvent.KEYCODE_EQUALS, pressed); |
246 return true; | 247 return true; |
247 | 248 |
248 default: | 249 default: |
249 // We try to send all other key codes to the host directly. | 250 // We try to send all other key codes to the host directly. |
250 return JniInterface.sendKeyEvent(keyCode, pressed); | 251 return JniInterface.sendKeyEvent(keyCode, pressed); |
251 } | 252 } |
252 } | 253 } |
253 } | 254 } |
OLD | NEW |