summaryrefslogtreecommitdiff
path: root/core/java/android/view/InsetsAnimationThreadControlRunner.java
Commit message (Collapse)AuthorAgeFilesLines
* Prevent adding methods in WindowInsetsAnimationControllerTiger Huang2021-09-031-1/+1
| | | | | | | | | | It is a public interface which should not have different versions sharing the same API level. This CL moves the methods to an @hide interface. Fix: 198614722 Test: atest android.signature.cts.api.current.SignatureTest Change-Id: Ib02708aeb1ec960bda20b6b60d4df6f0c9b4d9d6
* Invoke insets animation callbacks when resizing system barsTiger Huang2021-07-211-2/+2
| | | | | | | | | | This gives the app a chance to react to the animation of resizing system bars. Fix: 191269755 Test: atest InsetsAnimationControlImplTest InsetsControllerTest InsetsStateTest Change-Id: Ibf47047c131867983064bef4e9ac011daf66ea18
* Update the surface position of each control in insets animationTiger Huang2021-05-311-1/+17
| | | | | | | | | | | | | | | If the surface position is changed during the insets animation, the surface position of the controls in the animation should be updated. Otherwise, the cached position in the animation will overwrite the newly-updated leash position. Fix: 177925500 Test: Steps in the bug. Test: 1. Open Window Insets Tests -> Window Insets Controller. 2. Click on the [IME INVISIBLE] button. 3. Click on the [STATUS BARS VISIBLE] button during IME animation. See if the position of IME (Gborad) is correct. Change-Id: I7441426a41019996651220e86ca90dd416ef9498
* Flush the animation if it is canceledTiger Huang2021-05-251-6/+8
| | | | | | | | | | | | | | | | The issue was that: if navigation bar is requested to show while a controller is playing an animation of hiding both status bar and navigation bar, the animation will be canceled and will stay in an intermediate state, and then, another controller will play an animation of showing navigation bar. At the end, status bar will stay visible but it should be invisible. This CL fast-forwards the insets animation to the end state if it is canceled. Fix: 185459811 Test: Steps in the bug. Change-Id: Id6ae321b6c153ed1d7155afd6111b193ac9c045c
* Force showing navigation bar while IME is visibleTiger Huang2021-05-171-0/+11
| | | | | | | | | | | | | This CL revokes navigation bar control to make navigation bar visible while IME is showing, so the button to dismiss IME would be available. This CL also lets IME receive visible navigation bar insets, regardless of the navigation bar visibility. Fix: 167971834 Fix: 186789472 Test: atest WindowStateTests WindowInsetsControllerTests Change-Id: I2e723d4fc50d006127caa473d67c2f6af0d2cbcd
* Let insets can still be controlled if its window bounds is movedTiger Huang2021-03-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Insets source window can be moved by the display area policy so that the window would not on the edge of the display. This makes the window cannot provide insets to the display frame. The default animation uses the display frame to compute insets, so the moved types cannot be animated properly. This CL adds an insets hint to InsetsSourceControl. It is the insets computed from its owning window bounds. With the insets hint, the insets animation can be played regardless of the display frame. This CL also fixes an issue that the insets animation would be played in the wrong direction by the fixed-rotation window. Bug: 175775686 Fix: 181939099 Fix: 163018915 Test: atest ImeInsetsSourceConsumerTest InsetsAnimationControlImplTest InsetsControllerTest InsetsSourceConsumerTest DisplayImeControllerTest WindowInsetsTests (manual) Change-Id: Ic6a8a215bd9b3a3b1af18e425dabe803c9be323e
* Merge "Handle cancelled Insets animation" into rvc-qpr-dev am: e272df9338 ↵Taran Singh2021-02-051-0/+3
|\ | | | | | | | | | | | | | | | | | | am: 99813602c0 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12735138 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I556713d0fa14ab0f794eab49ac6c16b5354ed647
| * Handle cancelled Insets animationTaran Singh2021-02-051-0/+3
| | | | | | | | | | | | | | | | | | | | If an Insets animation was cancelled before it could complete, handle it gracefully. Fix: 154381667 Test: Run monkey runner that on any window that has edit text atest InsetsControllerTests Change-Id: I052a0455f536a1c839a2782e54f19143295ba6c6
* | Provide vsync id for all animation transactions (except PIP)Jorim Jaggi2020-12-071-0/+1
| | | | | | | | | | | | Test: Builds? Bug: 166302754 Change-Id: Iaa72ca48df09855f3828ef106cec27376cf852b9
* | Don't dispatch legacy insets to clientTiger Huang2020-10-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The server won't dispatch the legacy content insets, stable insets, and visible insets to the client. The insets would be computed from the insets state by the client. This CL also fixes the insets scaling issue in compatible mode. Bug: 149813814 Fix: 169940916 Fix: 165412978 Test: atest WindowAddRemovePerfTest InsetsAnimationControlImplTest ActivityRecordTests DisplayPolicyLayoutTests InsetsPolicyTest InsetsStateControllerTest Change-Id: I83570973f587a6abf887752494f750b46e3e484d
* | Make the requested visibility always up-to-dateTiger Huang2020-10-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new logic sends the requested visibility to server even when the client doesn't have a control. This makes the requested visibility reliable at the server side. This CL also changes getRequestedState to getRequestedVisibility in WindowState, because the frames in getRequestedState are not reliable. Fix: 161247175 Fix: 166819574 Test: atest DisplayPolicyLayoutTests DisplayPolicyTests InsetsPolicyTest InsetsSourceProviderTest InsetsStateControllerTest WindowStateTests InsetsAnimationControlImplTest InsetsControllerTest WindowAddRemovePerfTest ActivityRecordTests Change-Id: I7d32dacaa1302bab61386f5bd69aaa7dde953ebe
* | Add proto-based client side dumping for IME tracingAnmol Gupta2020-09-291-0/+7
|/ | | | | | | | | | | | | | | | This CL implements a mechanism to dump IME related client states into a proto file which can later be imported to winscope to allow easy debugging. A new abstract class ImeTracing.java declares the methods related to scheduling, collecting and dumping logs. Two child class implement these methods for server and client separately. The Design Doc for the IME tracing project is: go/ime-tracing Bug: 154348613 Test: start trace by calling "adb shell ime tracing start" end trace by calling "adb shell ime tracing stop" pull trace using "adb pull /data/misc/wmtrace/ime_trace.pb ime_trace.pb" Change-Id: Ia89f11d5ef8a220ea7746191b18769cea5a8359d
* IME animation: hide IME-related navbar icons until perceptibleAdrian Roos2020-06-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | During transitions and while the IME is controlled by the app, the IME may be "visible" as far as the IME framework is concerned, but not actually perceptible by the user due to offsets or alpha applied to the leash. This may lead to out-of-place navbar symbols for the IME, especially in gesture nav. To avoid this, the ImeInsetsSourceConsumer now notifies the IMF of whether it has made the IME unperceptible to the user. For now, we ignore the cases where the IME is controlled by something other than the client window - in that case, we just revert to the previous behavior of it being always considered perceptible. Fixes: 158079255 Test: manual, launch email compose activity, observe that back button only indicates once IME appears Test: atest InsetsAnimationControlImplTest Change-Id: I4dc9d6513d0559156f7da39244f3fc5ebc952ed4
* Add Insets dumps and IME debug logsTaran Singh2020-05-271-0/+5
| | | | | | | | | | | | Add more dumps and logs to better help debug IME insets better Logging can be enabled by setting InsetsController.DEBUG to true. Bug: 154348613 Test: manually build and flash. Verify showing and hiding IME shows logs. verify adb shell dumpsys window windows has new dumps Change-Id: Iad0a21d81a22d6acfaaf5c5ca8b5131eec411e79
* Add tracing for Inset animationsJorim Jaggi2020-05-141-10/+9
| | | | | | | | So we can understand better what's going on. Bug: 156367695 Test: Systrace Change-Id: Ic9dc2c963f70a3bb787121d33476b84bd3dc5798
* Merge "WindowInsetsAnimation: Synchronously dispatch window insets animation ↵Adrian Roos2020-04-021-1/+1
|\ | | | | | | callbacks" into rvc-dev
| * WindowInsetsAnimation: Synchronously dispatch window insets animation callbacksAdrian Roos2020-04-011-1/+1
| | | | | | | | | | | | Test: atest WindowInsetsAnimationControllerTests Bug: 152617481 Change-Id: Ie002f2e605f841563d8c2669f949be3ddd666146
* | InsetAnimationThreadControlRunner: Don't copy controlsRobert Carr2020-03-311-1/+1
|/ | | | | | | | | The controls are copied previously in collectSourceControls and so this copy is unnecessary. Bug: 150805473 Test: Existing tests pass Change-Id: I98b51b4372ace95036e25e806d1ab646d2df7879
* Fine tune animation parameters for IME animationsJorim Jaggi2020-03-191-2/+2
| | | | | | | | To match spec as mentioned on the bug. Bug: 151826721 Test: Visual Change-Id: I1c2a70916e3a41195f5c003b9023c51ebd93eadb
* InsetAnimationControlImpl: Copy SurfaceControlRob Carr2020-03-131-0/+6
| | | | | | | | | | | This way the lifetime can be bound to the animation. Otherwise the InsetController owns the lifetime, and it can be challenging to synchronize the two (we would need to update all the running animations when we rebuild the control list). Bug: 150918857 Test: Existing tests pass Change-Id: I86017b2eaee29ab0d8174479d187c9b7dd014305
* Use separate thread if app doesn't listen to animationsJorim Jaggi2020-03-111-0/+130
There is no need to introduce jank risk and run the inset animations on the main thread if the app doesn't listen to animation events. In that case, move the animations onto a separate thread. Bug: 118118435 Test: Inspect systrace Change-Id: Ib6e4b4ce8e9dd8e27761ced6eb8d7700b6236a32