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)}. |
* |