| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When testing testImeSwitchingWithoutWindowFocusAfterDisplayOffOnFull on
the virtual device, the test flows will be:
1) Launch an activity and click the editor to show IME
2) Turn off/on the screen
3) Launch the IME picker dialog and expecting no window focus change.
4) Switch to another IME app and expect the IME visible after switched.
Somehow the flaky point is in step 4) that if attaching the new input
to show the IME comes first, before the input target updated to WM,
in the meantime the app received onControlChanged
callback with null control from WMS#relayoutWindow, then in
ImeInsetsSourceConsumer#setControl -> hide() will end up calling
notifyImeHidden for IME to invoke hideMySoftInput(), which is
not expected result.
As this unexpected IME hidden issue is related the timing issue of
updating IME targets to WM a bit late and showing IME request happends
from IMMS instead of from ImeInsetsSourceConsumer#requestShow.
(i.e. consumer#hide() be invoked when mIsRequestedVisibleAwaitingControl
is false but the control is null when setControl called)
To fix this issue case, it looks make sense to check with
ImeInsetsSourceConsumer#isRequestedVisibleAwaitingControl() when the
null control callback in setControl(), since
isRequestedVisibleAwaitingControl() will be true when requested the IME
visible, so that it won't fall into hide() logic.
Also, modified "Animation finished abruptly." debug log in
InsetsAnimationControlImpl#applyChangeInsets to print only when the
animation actually finished, since it does not make sense to print
when the animation is not finish.
Fix: 204524304
Test: atest InputMethodServiceLifecycleTest#\
testImeSwitchingWithoutWindowFocusAfterDisplayOffOnFull \
--rerun-until-failure 100
Change-Id: I3071af14bf78e23f9526d6a9c138ab6ae2e0e339
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
The CL applies fade-in/fade-out animations for BEHAVIOR_DEFAULT while
changing the system bar visibility.
Fix: 168913586
Test: WindowInsetsTests
Change-Id: I6e9887baf2ba40b51c01bf2239915d381ba891a6
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the display cutout is a type of insets and the display cutout can
be obtained from WindowInsets, it makes sense that InsetsState has the
display cutout instance. In this way, we can send the display cutout to
client via W#insetsChanged instead of W#resized.
This can be a step to remove the class of ClientWindowFrames, and can
also be a step to make client compute its window frame locally.
Fix: 175858810
Bug: 161810301
Test: atest WindowAddRemovePerfTest ImeInsetsSourceConsumerTest
InsetsControllerTest InsetsStateTest ViewRootImplTest
WindowInsetsControllerTests ActivityRecordTests
DisplayPolicyLayoutTests LaunchParamsControllerTests
TaskSnapshotSurfaceTest WindowMetricsActivityTests
WindowMetricsWindowContextTests WindowMetricsTest
WindowFrameTests WindowStateTests WmDisplayCutoutTest
Change-Id: I9a930b1d2f7df3cea2b29629b767a4a5f31bca17
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change moves from dumping information of all Input Method client
instances to dumping only the current client, which is the one in which
the triggering event happened.
Bug: 154348613
Test: flash a device
start IME tracing by calling "adb shell ime tracing start"
end IME tracing by calling "adb shell ime tracing stop"
pull generated trace files and visualize in Winscope
or start tracing directly through ADB Connect and visualize traces
Change-Id: I46460d3d08947c7d37a8969a2fed6539f35aaf91
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Optimized the tracing logic for the IME clients information. The
clients trigger a tracing dump through the new method triggerClientDump
exposed by the ImeTracing interface. This change was done
to be able to support custom dump for clients information and
custom dump from IMS.
This change only covers the clients information. The IMS and IMMS
information will be dumped in next changes.
Bug: 154348613
Test: start IME tracing by calling "adb shell ime tracing start"
end IME tracing by calling "adb shell ime tracing stop"
pull trace using "adb pull /data/misc/wmtrace/ime_trace_clients.pb ime_trace_clients.pb"
Change-Id: I499cb5f45a3e78912b09b9c6cedf1ce5443e797a
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
The content of a window with FLAG_LAYOUT_NO_LIMITS can extend into
system bar areas before android R, but not in R, which is not
compatible.
Fix: 166391803
Test: atest ImeInsetsSourceConsumerTest InsetsControllerTest
InsetsStateTest
Change-Id: I2470a4eeb9f0f291321e21d42bc6e9c52e7a8e9d
|
| |
|
|
|
|
|
|
|
|
| |
In the legacy layout world, if a window has FLAG_FULLSCREEN, then its
stable insets won't be affected by status bar. This CL makes the layout
logic compatible.
Fix: 160593171
Test: InsetsStateTest InsetsControllerTest ImeInsetsSourceConsumerTest
Change-Id: I59717e699470273e2462c1ad864e00bb9a126677
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When IME has zero insets, it doesn't map to any side and doesn't have
can't be animated.
IME can have zero insets in following cases:
1. Floating IME
2. Fullscreen IME (in landscape)
3. IME doesn't overlap with IME target window.
In order to animate a type, it must have insets. We can animate IME
from negative insets to zero and vice-versa. This makes zero insets IME a
special case of ISIDE_BOTTOM.
Deprecate SIDE_FLOATING because it shouldn't logically map to a side.
Fix: 153909316
Test: atest WindowInsetsAnimationImeTests#testZeroInsetsImeAnimates
Change-Id: I6d1d3430888db4632cb2f93e9042f692b35ebaeb
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Test: atest WindowInsetsAnimationControllerTests
Bug: 152617481
Change-Id: Ie002f2e605f841563d8c2669f949be3ddd666146
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure finish callback gets called when
applyChangeInsets gets called synchronously from
scheduleApplyChangeInsets
Bug: 152071027
Test: InsetsAnimationControlImplTest
Change-Id: I6808b3527f1d2e15de681c5260208d238dcf53e2
|
| |/
|
|
|
|
|
|
|
| |
- make sure we only dispatch the controller in onCancelled after the app has seen onReady
- return a linearly interpolated getFraction() if there is no interpolator instead of -1
Bug: 118118435
Test: atest WindowInsetsAnimationControllerTests
Change-Id: Iccd0b6246b4cdc250f3111409821c1dac53c694e
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Prevent unnecesary dispatchApplyInsets caused by legacy system
also requesting inset changes
- Make insetsModified oneway. It's safe to do so because we
absolutely don't care about interleaving with other WindowSession
methods.
- Do not trigger layout if nothing relevant has changed
- Only trigger requestFitSystemWindows if state actually changed
Test: Systrace. Automated perf test will be added
Bug: 151865131
Change-Id: I24944875e739e4a74606e3a02bbf14585c1c13db
|
| |/
|
|
|
|
|
|
| |
Floating IME now applies final visibility
Test: Manually using steps in bug
Fix: 151953095
Change-Id: Id611e4bac22e9663d04e260794ea0f621d7b7e29
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
To match spec as mentioned on the bug.
Bug: 151826721
Test: Visual
Change-Id: I1c2a70916e3a41195f5c003b9023c51ebd93eadb
|
| |/
|
|
|
|
|
|
|
| |
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 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
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Test: WindowInsetsActivity
Bug: 150852597
Change-Id: I352a7e6c81b5bface1fc92f8d30a36408cabb125
|
| |
|
|
|
|
|
|
|
|
|
| |
- Copy surface params builder to compat class
- Add calls to set background blur
- Make recents/app transition leashes effect layers so blur can be set
on them
Bug: 149792636
Test: Build with launcher with blurs enabled
Change-Id: I4cebcab090719c6a17f197a3cd4450d68e55b424
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Parameters were correctly flipped but usages weren't.
Test: Open IME
Bug: 118118435
Change-Id: Ib0c417216b8e586c633c4607a9eb979e83b50231
|
| |\| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Fix alpha
- Fix running animation book-keeping
- Fix max insets dispatched during onProgress
- Fix visibility of onProgress
- Fix cutout during onProgress
Bug: 118118435
Change-Id: Ibc0204280407ea6c981b86af6992ef24ff8fb41f
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
| |
If IME is already visible, requestShow() is immediate.
If animation is finishing and IME is hiding, notify IME process of the
visibility.
Bug: 111084606
Test: Use test app [1] and verify that swiping up and down multiple
times opens and closes the IME respectively.
[1] I4320871bdc8184fac38921616e1a1322f8dbc804
Change-Id: Icf202b56c0bc3833e86ee70c43fedd418e27b140
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This implements the transient insets animation. To have InsetsPolicy run
the animation, this patch:
1. Let InsetsPolicy implements InsetsAnimationControlCallbacks;
2. Make several properties, methods and subclasses in InsetsController
public, to let InsetsPolicy re-use them when possible.
3. Do everything necessary in InsetsPolicy to let the animation run
correctly.
Other misc changes in this CL includes:
1. Removed some un-necessary imports;
2. Implemented two toString method, for debug purpose.
Bug: 118118435
Test: Manual test with the new Insets API test app, everything works as
expected;
Test: go/wm-smoke
Test: atest InsetsPolicyTest
Change-Id: I6c45bd557573fcabb1a3f5aea3dcd58229280613
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When control is unavailable, but the client still wants to hide or
show something, we keep track of it and execute the animation as
soon as we get control.
Also fix an issue with a crash where control was lost before
animation was started.
Test: InsetsControllerTest, InsetsSourceConsumerTest
Change-Id: I31c5177d9281161b8a607b24ddf094dbba640da3
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
This fixes an issue where IME wasn't visible in landscape with a
cutout, because IME window didn't cover full edge.
Also fix an issue where floating IME didn't work because alpha
was calculated the wrong way.
Test: InsetsSourceTest
Bug: 111084606
Change-Id: I29b7a45cd590a52ecb03f2e539edde57aef4dba3
|
| |
|
|
|
|
|
|
|
| |
No longer needed since we either show or hide all the types when
finishing an animation.
Test: WindowInsetsActivity
Bug: 118118435
Change-Id: I2323403d375cdf781b34b4d2107d3151299eb995
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
WindowInsets.getSystemInsets returns the stable insets if the
window has set SYSTEM_UI_FLAG_STABLE set.
Furthermore, consuming stable will also consume system insets, and
consuming system insets will consume stable. However, DecorView
will not longer consume stable.
Bug: 118118435
Test: InsetsStateTest, WindowInsetsTest
Change-Id: I232e90a6ec34036e830a53437cf32a2b794c5257
|
| |
|
|
|
|
|
|
|
|
| |
We need to keep track of the animations, but also it's nature,
such that we can make an appropriate decision whether to cancel or
ignore in show/hide.
Test: InsetsControllerTest
Bug: 111084606
Change-Id: I9d13a22ce179c2949b889fea80d29094845260e7
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the leash of InsetsSourceControl and send it to the client while
the insets source window is moved.
This CL also guarantees that the array of InsetsSourceControl send to
the client side doesn't contain any null element.
Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
InsetsPolicyTest WindowStateTests CommandQueueTest
RegisterStatusBarResultTest InsetsFlagsTest
LightBarControllerTest RegisterStatusBarResultTest
ViewRootImplTest DisplayPolicyLayoutTests
DisplayPolicyInsetsTests DisplayPolicyTests
TaskSnapshotSurfaceTest NavigationBarColorTest
Test: Rotate Camera in the new insets mode
Change-Id: I96d7ac5c37abbb472dab4cd2c24644e136d23947
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently InsetsAnimationControlImpl is heavily rely on
InsetsSourceConsumer and InsetsController on the client side, which
caused difficulties to the server to re-use the code. Decoupling it to
make it re-usable.
This patch made the following changes:
1. Introduce a callback interface to let InsetsAnimationControlImpl talk
to InsetsController.
2. Use InsetsSourceControl instead of InsetsSourceConsumer in the
InsetsAnimationControlImpl.
3. Remove all the consumers in the InsetsAnimationControlImpl.
Test: atest InsetsAnimationControlImplTest
Test: manual test with the new insets API, it works as expected.
Test: go/wm-smoke
Test: atest FrameworksCoreTests:InsetsControllerTest
Change-Id: I30f5aa73ff31e07c0dd8d61edbb208f16c5a6775
|