Address a couple small followups for TaskbarInsetsController
- Added no-op onDestroy()
- Reformated some if conditions, also adding
AbstractFloatingView.hasOpenView()
Test: TaplTestsTaskbar
Bug: 215411414
Change-Id: I89b39ca5fabd03f5ac0f25d6ef69170683cf060d
diff --git a/src/com/android/launcher3/AbstractFloatingView.java b/src/com/android/launcher3/AbstractFloatingView.java
index 4386f41..90869c2 100644
--- a/src/com/android/launcher3/AbstractFloatingView.java
+++ b/src/com/android/launcher3/AbstractFloatingView.java
@@ -208,6 +208,13 @@
}
/**
+ * Returns whether there is at least one view of the given type where {@link #isOpen()} == true.
+ */
+ public static boolean hasOpenView(ActivityContext activity, @FloatingViewType int type) {
+ return getOpenView(activity, type) != null;
+ }
+
+ /**
* Returns a view matching FloatingViewType, and {@link #isOpen()} may be false (if animating
* closed).
*/