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
This commit is contained in:
Tony Wickham
2022-04-20 14:43:39 -07:00
parent a681cf6abe
commit f286f9cb98
3 changed files with 13 additions and 9 deletions

View File

@@ -207,6 +207,13 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
return getView(activity, type, true /* mustBeOpen */);
}
/**
* 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).