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

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

Issue 281773003: Use @SuppressLint in place of @TargetApi to suppress lint warnings for the inlined API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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/Chromoting.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.TargetApi; 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;
11 import android.os.Bundle; 11 import android.os.Bundle;
12 import android.view.KeyEvent; 12 import android.view.KeyEvent;
13 import android.view.Menu; 13 import android.view.Menu;
14 import android.view.MenuItem; 14 import android.view.MenuItem;
15 import android.view.View; 15 import android.view.View;
16 import android.view.inputmethod.InputMethodManager; 16 import android.view.inputmethod.InputMethodManager;
17 import android.widget.ImageButton; 17 import android.widget.ImageButton;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // set) when the user swipes the edge to reveal the bars temporarily. Wh en this happens, 81 // set) when the user swipes the edge to reveal the bars temporarily. Wh en this happens,
82 // the action-bar should remain hidden. 82 // the action-bar should remain hidden.
83 int fullscreenFlags = getSystemUiFlags(); 83 int fullscreenFlags = getSystemUiFlags();
84 if ((visibility & fullscreenFlags) != 0) { 84 if ((visibility & fullscreenFlags) != 0) {
85 hideActionBar(); 85 hideActionBar();
86 } else { 86 } else {
87 showActionBar(); 87 showActionBar();
88 } 88 }
89 } 89 }
90 90
91 @TargetApi(Build.VERSION_CODES.JELLY_BEAN) 91 @SuppressLint("InlinedApi")
92 private int getSystemUiFlags() { 92 private int getSystemUiFlags() {
93 int flags = View.SYSTEM_UI_FLAG_LOW_PROFILE; 93 int flags = View.SYSTEM_UI_FLAG_LOW_PROFILE;
94 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { 94 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
95 flags |= View.SYSTEM_UI_FLAG_FULLSCREEN; 95 flags |= View.SYSTEM_UI_FLAG_FULLSCREEN;
96 } 96 }
97 return flags; 97 return flags;
98 } 98 }
99 99
100 public void showActionBar() { 100 public void showActionBar() {
101 mOverlayButton.setVisibility(View.INVISIBLE); 101 mOverlayButton.setVisibility(View.INVISIBLE);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 break; 216 break;
217 217
218 default: 218 default:
219 // We try to send all other key codes to the host directly. 219 // We try to send all other key codes to the host directly.
220 JniInterface.sendKeyEvent(event.getKeyCode(), depressed); 220 JniInterface.sendKeyEvent(event.getKeyCode(), depressed);
221 } 221 }
222 222
223 return super.dispatchKeyEvent(event); 223 return super.dispatchKeyEvent(event);
224 } 224 }
225 } 225 }
OLDNEW
« no previous file with comments | « remoting/android/java/src/org/chromium/chromoting/Chromoting.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698