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

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

Issue 2745663002: Add targetsAtLeastO() helper function (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java ('k') | no next file » | 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 49d0d136184959ba39b52ca70ebdc589105c9997..141b62b9e41f43be6c1404fd7b6cab7742231707 100644
--- a/base/android/java/src/org/chromium/base/BuildInfo.java
+++ b/base/android/java/src/org/chromium/base/BuildInfo.java
@@ -162,4 +162,13 @@ public class BuildInfo {
return !"REL".equals(Build.VERSION.CODENAME)
&& ("O".equals(Build.VERSION.CODENAME) || Build.VERSION.CODENAME.startsWith("OMR"));
}
+
+ /**
+ * @return Whether the current app targets the SDK for at least O
+ */
+ public static boolean targetsAtLeastO(Context appContext) {
+ return isAtLeastO()
+ && appContext.getApplicationInfo().targetSdkVersion
+ == Build.VERSION_CODES.CUR_DEVELOPMENT;
+ }
}
« no previous file with comments | « android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698