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

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

Issue 2931443003: Add support for Android spellcheck menu in Chrome/WebViews (Closed)
Patch Set: Respond to latest comments Created 3 years, 5 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
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 24f85d6635fce1bcd806aff172a7d6afb4535de8..2e74589cabbc9c6ecc4bf42a75ca9904d25f5257 100644
--- a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
+++ b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
@@ -671,6 +671,17 @@ public class ApiCompatibilityUtils {
}
}
+ /**
+ * @param activity The {@link Activity} to check.
+ * @return Whether or not {@code activity} is currently in Android N+ multi-window mode.
+ */
+ public static boolean isInMultiWindowMode(Activity activity) {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
+ return false;
+ }
+ return activity.isInMultiWindowMode();
+ }
+
/**
* Null-safe equivalent of {@code a.equals(b)}.
*

Powered by Google App Engine
This is Rietveld 408576698