summaryrefslogtreecommitdiff
path: root/core/java/android/view/InsetsAnimationControlCallbacks.java
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2019-12-27 15:17:44 +0100
committerJorim Jaggi <jjaggi@google.com>2020-01-10 11:24:31 +0100
commita51168aaee6b623f340e6ae4691e7c5ca1a629ce (patch)
treed80e1d4f4a6a84e3a5c95101a6f5e5b17a2d8f07 /core/java/android/view/InsetsAnimationControlCallbacks.java
parent7b469d73d243f305e665905cfbef3491f2a8d791 (diff)
Correct layout/draw/animation interleaving for insets callbacks
See WindowInsetsAnimationCallback.onPrepare for detailed description of new behavior. Also rename InsetsSourceConsumer.setVisible to setRequestedVisible to communicate that this is client intent vs. current state. Test: windowinsetstest application Bug: 111084606 Change-Id: Id35c60e0f59a8aa4f0d300220391d1e2b96a91fd
Diffstat (limited to 'core/java/android/view/InsetsAnimationControlCallbacks.java')
-rw-r--r--core/java/android/view/InsetsAnimationControlCallbacks.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/core/java/android/view/InsetsAnimationControlCallbacks.java b/core/java/android/view/InsetsAnimationControlCallbacks.java
index 6fdadc60afea..27edb0b69bdd 100644
--- a/core/java/android/view/InsetsAnimationControlCallbacks.java
+++ b/core/java/android/view/InsetsAnimationControlCallbacks.java
@@ -16,17 +16,28 @@
package android.view;
+import android.view.InsetsController.LayoutInsetsDuringAnimation;
+import android.view.WindowInsetsAnimationCallback.AnimationBounds;
+import android.view.WindowInsetsAnimationCallback.InsetsAnimation;
+
/**
* Provide an interface to let InsetsAnimationControlImpl call back into its owner.
* @hide
*/
public interface InsetsAnimationControlCallbacks {
+
/**
- * Dispatch the animation started event to all listeners.
- * @param animation
+ * Executes the necessary code to start the animation in the correct order, including:
+ * <ul>
+ * <li>Dispatch {@link WindowInsetsAnimationCallback#onPrepare}</li>
+ * <li>Update insets state and run layout according to {@code layoutDuringAnimation}</li>
+ * <li>Dispatch {@link WindowInsetsAnimationCallback#onStart}</li>
+ * <li>Dispatch {@link WindowInsetsAnimationControlListener#onReady}</li>
+ * </ul>
*/
- void dispatchAnimationStarted(WindowInsetsAnimationCallback.InsetsAnimation animation,
- WindowInsetsAnimationCallback.AnimationBounds bounds);
+ void startAnimation(InsetsAnimationControlImpl controller,
+ WindowInsetsAnimationControlListener listener, int types, InsetsAnimation animation,
+ AnimationBounds bounds, @LayoutInsetsDuringAnimation int layoutDuringAnimation);
/**
* Schedule the apply by posting the animation callback.