From 5bb571dc403b4384111ae987ed7b44aaef76ace0 Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Tue, 6 Nov 2018 14:42:04 +0100 Subject: A brave new world for window insets (5/n) Implement controlWindowInsetsAnimation Based on the leashes we have on the client, and the insets the client has requested, we are able to move the surfaces around such that the resulting insets will match what the client requested. Bug: 118118435 Change-Id: I0616e53455a6544aaf374c1b0eb10e258aced21d --- core/java/android/view/WindowInsetsController.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'core/java/android/view/WindowInsetsController.java') diff --git a/core/java/android/view/WindowInsetsController.java b/core/java/android/view/WindowInsetsController.java index 7be5f2e7a0b0..a35be273f3bf 100644 --- a/core/java/android/view/WindowInsetsController.java +++ b/core/java/android/view/WindowInsetsController.java @@ -16,6 +16,7 @@ package android.view; +import android.annotation.NonNull; import android.view.WindowInsets.Type.InsetType; /** @@ -51,4 +52,15 @@ public interface WindowInsetsController { * would like to make disappear. */ void hide(@InsetType int types); + + /** + * Lets the application control window inset animations in a frame-by-frame manner by modifying + * the position of the windows in the system causing insets directly. + * + * @param types The {@link InsetType}s the application has requested to control. + * @param listener The {@link WindowInsetsAnimationControlListener} that gets called when the + * windows are ready to be controlled, among other callbacks. + */ + void controlWindowInsetsAnimation(@InsetType int types, + @NonNull WindowInsetsAnimationControlListener listener); } -- cgit v1.2.3