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

Unified Diff: base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java

Issue 1322933002: Fix deprecation warnings in remoting/android/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/android/java/src/org/chromium/chromoting/Chromoting.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
diff --git a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
index c2d596e381171221391cd2491fc42715dd773ac0..3ddf18a321bf42e31cc90f5f71cb3c13dd21be36 100644
--- a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
+++ b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
@@ -429,4 +429,16 @@ public class ApiCompatibilityUtils {
}
return drawable;
}
+
+ /**
+ * @see android.content.res.Resources#getColor(int id).
+ */
+ @SuppressWarnings("deprecation")
+ public static int getColor(Resources res, int id) throws NotFoundException {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+ return res.getColor(id, null);
+ } else {
+ return res.getColor(id);
+ }
+ }
}
« no previous file with comments | « no previous file | remoting/android/java/src/org/chromium/chromoting/Chromoting.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698