Loading core/java/android/view/WindowManager.java +20 −9 Original line number Diff line number Diff line Loading @@ -1476,15 +1476,26 @@ public interface WindowManager extends ViewManager { */ @TestApi static boolean hasWindowExtensionsEnabled() { return HAS_WINDOW_EXTENSIONS_ON_DEVICE && ActivityTaskManager.supportsMultiWindow(ActivityThread.currentApplication()) if (!Flags.enableWmExtensionsForAllFlag() && ACTIVITY_EMBEDDING_GUARD_WITH_ANDROID_15) { // Since enableWmExtensionsForAllFlag, HAS_WINDOW_EXTENSIONS_ON_DEVICE is now true // on all devices by default as a build file property. // Until finishing flag ramp up, only return true when // ACTIVITY_EMBEDDING_GUARD_WITH_ANDROID_15 is false, which is set per device by // OEMs. && (Flags.enableWmExtensionsForAllFlag() || !ACTIVITY_EMBEDDING_GUARD_WITH_ANDROID_15); return false; } if (!HAS_WINDOW_EXTENSIONS_ON_DEVICE) { return false; } try { return ActivityTaskManager.supportsMultiWindow(ActivityThread.currentApplication()); } catch (Exception e) { // In case the PackageManager is not set up correctly in test. Log.e("WindowManager", "Unable to read if the device supports multi window", e); return false; } } /** Loading Loading
core/java/android/view/WindowManager.java +20 −9 Original line number Diff line number Diff line Loading @@ -1476,15 +1476,26 @@ public interface WindowManager extends ViewManager { */ @TestApi static boolean hasWindowExtensionsEnabled() { return HAS_WINDOW_EXTENSIONS_ON_DEVICE && ActivityTaskManager.supportsMultiWindow(ActivityThread.currentApplication()) if (!Flags.enableWmExtensionsForAllFlag() && ACTIVITY_EMBEDDING_GUARD_WITH_ANDROID_15) { // Since enableWmExtensionsForAllFlag, HAS_WINDOW_EXTENSIONS_ON_DEVICE is now true // on all devices by default as a build file property. // Until finishing flag ramp up, only return true when // ACTIVITY_EMBEDDING_GUARD_WITH_ANDROID_15 is false, which is set per device by // OEMs. && (Flags.enableWmExtensionsForAllFlag() || !ACTIVITY_EMBEDDING_GUARD_WITH_ANDROID_15); return false; } if (!HAS_WINDOW_EXTENSIONS_ON_DEVICE) { return false; } try { return ActivityTaskManager.supportsMultiWindow(ActivityThread.currentApplication()); } catch (Exception e) { // In case the PackageManager is not set up correctly in test. Log.e("WindowManager", "Unable to read if the device supports multi window", e); return false; } } /** Loading