This reverts commit 8c56ac6b945e4050d56968e2adac673e052b772d.
Underlying issue has been fixed:
Test: InsetsControllerTest
Bug: 152071027
Change-Id: I2b80de7067bf688a6b36233b9a1e92e2cf31c148
This reverts commit 2751c29414d17650b1737e19c250ffbe4f266b82.
Reason: Broken logic
Test: Open IME in Messages
Fixes: 152695319
Change-Id: I6a63f20c6342d4284a5da99e39e8f835028a5b6b
...otherwise developer will get onApplyWindowInsets which don't
match end value of animation. Super confusing
Test: InsetsControllerTest
Bug: 152071027
Change-Id: Ic1819512a5ce78843433bf7c231d062e12de0e7b
Adds more comprehensive callbacks and getters for the WindowInsetsAnimationController,
to make it more straight forward to properly use.
Test: atest InsetsControllerTest PendingInsetsControllerTest
Fixes: 151707442
Change-Id: Ida55f609112396c0f6de4c5c4431e0793c2e315e
This reverts commit c549e19c5efd37494dac75e4b372d126f1d2bf19.
Reason for revert: Droidcop: Potential culprit for Bug X - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Change-Id: I2ab42d96d2599dfcc946fa48b3940e2bd92b22b0
It's useful for apps to know which inset types they can currently
control, as otherwise they have to poll by calling
controlInsetsAnimation repeatedly.
This can be used when apps want to apply a custom animation
immediately during startup as soon as possible.
Fixes: 150780468
Test: InsetsControllerTest
Test: CTS will be added soon
Test: WindowInsetsActivity
Change-Id: Ic0388c11d759843d3ac9edd8ef23904c9ce05c46
Fixes issues the app developers have raised with
the WindowInsetsAnimation API:
- it really makes more sense to have the Animation
as the outer class, and the Callback nested within
- it was not obvious previously that multiple animations
could be running at the same time. A new argument to
onProgress now makes this abundantly clear by passing
in the list of running animations.
- The dispatch mode really fits better as a final
property on the callback, rather than it being
queried once from a getter.
Also fixes lint warnings.
Fixes: 143556682
Test: make checkapi; atest WindowInsetsControllerTests
Change-Id: I8cd8faac70dd5a15d779d2c983f0a0ea5d6bbd8e
Fraction is now from animation start to end state. This makes it
more in line with other animation fraction meaning. Also, the app
can figure out the animation direction on its own by inspecting
the visibility state when the animation gets prepared.
Also fix some other stuff in WindowInsetsAnimationCallback.
Test: CTS coming soon
Bug: 118118435
Change-Id: I81d36159817719a9b0ee25bb78cfbfddc2029270
- Fix up target SDK check
- Keep WindowInsets.CONSUMED concept to stop dispatch for
performance optimization. If the insets are handled at some point
in the hierarchy, we really don't need to dispatch it to all the
children. However, deprecate all the individual consuming methods
instead.
Bug: 118118435
Test: ViewGroupTest
Change-Id: I6b6627fb9c0a43444ee3f9dbeb978109f9138fbd