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

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

Issue 1660353002: Update account and sync management UX (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODO in comments for an additional task for the bug Created 4 years, 10 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 | chrome/android/java/res/drawable-hdpi/add_circle_blue.png » ('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 3a2b024a0c0fad6fbb573cd37a74fe353b138745..df4ef4124140a79fdcf05fd01b1e3b99968df471 100644
--- a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
+++ b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
@@ -18,6 +18,7 @@ import android.content.res.Resources;
import android.content.res.Resources.NotFoundException;
import android.graphics.Bitmap;
import android.graphics.Color;
+import android.graphics.ColorFilter;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Build;
@@ -444,6 +445,18 @@ public class ApiCompatibilityUtils {
}
/**
+ * @see android.graphics.drawable.Drawable#getColorFilter().
+ */
+ @SuppressWarnings("NewApi")
+ public static ColorFilter getColorFilter(Drawable drawable) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ return drawable.getColorFilter();
+ } else {
+ return null;
+ }
+ }
+
+ /**
* @see android.content.res.Resources#getColorStateList(int id).
*/
@SuppressWarnings("deprecation")
« no previous file with comments | « no previous file | chrome/android/java/res/drawable-hdpi/add_circle_blue.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698