| 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 3ddf18a321bf42e31cc90f5f71cb3c13dd21be36..a119acb79f1167be4bc43d1ef8e446a509403c9d 100644
|
| --- a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
|
| +++ b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
|
| @@ -12,6 +12,7 @@ import android.content.ContentResolver;
|
| import android.content.Context;
|
| import android.content.Intent;
|
| import android.content.pm.PackageManager;
|
| +import android.content.res.ColorStateList;
|
| import android.content.res.Configuration;
|
| import android.content.res.Resources;
|
| import android.content.res.Resources.NotFoundException;
|
| @@ -441,4 +442,16 @@ public class ApiCompatibilityUtils {
|
| return res.getColor(id);
|
| }
|
| }
|
| +
|
| + /**
|
| + * @see android.content.res.Resources#getColorStateList(int id).
|
| + */
|
| + @SuppressWarnings("deprecation")
|
| + public static ColorStateList getColorStateList(Resources res, int id) throws NotFoundException {
|
| + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
| + return res.getColorStateList(id, null);
|
| + } else {
|
| + return res.getColorStateList(id);
|
| + }
|
| + }
|
| }
|
|
|