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

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

Issue 1194423002: Don't check for USE_CREDENTIALS permission on Android M. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 6 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 | sync/android/java/src/org/chromium/sync/signin/AccountManagerHelper.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/BuildInfo.java
diff --git a/base/android/java/src/org/chromium/base/BuildInfo.java b/base/android/java/src/org/chromium/base/BuildInfo.java
index 54f611d5092ea4595f5d07b6345952d039bd144f..ce262f41d2ee4a2dd141c91d794ce8a132d6b202 100644
--- a/base/android/java/src/org/chromium/base/BuildInfo.java
+++ b/base/android/java/src/org/chromium/base/BuildInfo.java
@@ -10,6 +10,7 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Build;
+import android.text.TextUtils;
import android.util.Log;
/**
@@ -122,4 +123,13 @@ public class BuildInfo {
public static int getSdkInt() {
return Build.VERSION.SDK_INT;
}
+
+ /**
+ * @return Whether the Android build is M or later.
+ */
+ public static boolean isMncOrLater() {
+ // TODO(bauerb): Update this once the SDK is updated.
+ return Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP_MR1
+ || TextUtils.equals("MNC", Build.VERSION.CODENAME);
+ }
}
« no previous file with comments | « no previous file | sync/android/java/src/org/chromium/sync/signin/AccountManagerHelper.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698