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

Side by Side Diff: base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java

Issue 973403002: Address NewApi warnings in src/ui. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
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.base; 5 package org.chromium.base;
6 6
7 import android.animation.ValueAnimator; 7 import android.animation.ValueAnimator;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.app.Activity; 9 import android.app.Activity;
10 import android.app.ActivityManager; 10 import android.app.ActivityManager;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 /** 67 /**
68 * @return True if the running version of the Android supports printing. 68 * @return True if the running version of the Android supports printing.
69 */ 69 */
70 public static boolean isPrintingSupported() { 70 public static boolean isPrintingSupported() {
71 return Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT; 71 return Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
72 } 72 }
73 73
74 /** 74 /**
75 * @return True if the running version of the Android supports HTML clipboar d.
76 */
77 public static boolean isHTMLClipboardSupported() {
78 return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN;
79 }
80
81 /**
82 * @see android.view.View#setLayoutDirection(int) 75 * @see android.view.View#setLayoutDirection(int)
83 */ 76 */
84 public static void setLayoutDirection(View view, int layoutDirection) { 77 public static void setLayoutDirection(View view, int layoutDirection) {
85 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { 78 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
86 view.setLayoutDirection(layoutDirection); 79 view.setLayoutDirection(layoutDirection);
87 } else { 80 } else {
88 // Do nothing. RTL layouts aren't supported before JB MR1. 81 // Do nothing. RTL layouts aren't supported before JB MR1.
89 } 82 }
90 } 83 }
91 84
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 Window window = activity.getWindow(); 474 Window window = activity.getWindow();
482 if (statusBarColor == Color.BLACK && window.getNavigationBarColor() == Color.BLACK) { 475 if (statusBarColor == Color.BLACK && window.getNavigationBarColor() == Color.BLACK) {
483 window.clearFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_B AR_BACKGROUNDS); 476 window.clearFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_B AR_BACKGROUNDS);
484 } else { 477 } else {
485 window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR _BACKGROUNDS); 478 window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR _BACKGROUNDS);
486 } 479 }
487 window.setStatusBarColor(statusBarColor); 480 window.setStatusBarColor(statusBarColor);
488 } 481 }
489 } 482 }
490 } 483 }
OLDNEW
« no previous file with comments | « no previous file | ui/android/java/src/org/chromium/ui/ColorPickerAdvancedComponent.java » ('j') | ui/gl/android/surface_texture.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698