When we tried CL[1] to fix Gboard Translation UI dialog dismissed that
keeping the served view when focused to the next window,
although we can skip starting new input when the window focused back as
the behavior of Q,
However, we overlooked in R, IME insets will rely on IMS#reportStartInput
to get the updated IME input target, which will out of sync for the above
case.
To fix this regression, we report the next window focus gain
to IMMS with WINDOW_FOCUS_GAIN_REPORT_ONLY when the next focused view is
same as current served view and the served input connection remains.
so that in IMMS side won't get StartInputFlags.INITIAL_CONNECTION flags
to set restarting as false when calling IInputMethod#startInput to IMS,
and in IMS side will still call reportStartInput to WMS for updating
IME input target without additional onFinishInputView callback to
client.
[1]: I8d4fff94ba9313b773bc27fcbd019cc88580d3e9
Fix: 152373385
Bug: 155781821
Test: atest CtsInputMethodTestCases
Test: manual, make sure Bug 155781821 comment #10 works:
1) Launch video call in Hangouts.
2) End call.
3) Click on the text box.
4) Expect Soft-Keyboard shown
Test: make sure not break Bug 148489857 and Bug 148788569, following
auto / manual test to verify:
- Auto: atest FocusHandlingTest#testKeyboardStateAfterImeFocusableFlagChanged
- Manual:
1) Build / install EditTextVariations
2) Select menu -> Direct-Reply, make sure Notification comes up.
3) Tap EditText on Notification, verify soft-keyboard is visible.
Change-Id: I45a9814d812ad906f417c24200fd4219959e2423
* The NPE is due to in the InlineContentView we try to reparent the
surface view which is no longer attached to the window, this can
happen if the InlineContentView is attached to window and then
immediately detached from the window, before the surface package
is returned from the remote view process.
* Release the surface package immediately in this case, so the
remote view can be released.
Test: atest android.autofillservice.cts.inline
Bug: 158139090
Change-Id: I9efdf8ba182a1d66334362edcfb6ba58fcdc222a
Fixes an issue where the mPendingFrame was not properly cleared
if we re-applied the current frame.
Fixes: 156762386
Test: InsetsSourceConsumerTest
Change-Id: I9f0ebfafac44e1b4b87ea9d3408e64ba34bca2ec
1. Mentioned the layout size could also be WRAP_CONTENT or MATCH_PARENT.
2. These API docs should be more generic that not mention the test tool.
Bug: 156961226
Test: none
Change-Id: I689bf4caf41bfe1fc09024777a87183d7211be05
This reverts commit a0a20dc23b.
Reason for revert: This is causing a number of fatal crashes in SystemUI. See b/158081578, b/158057055, b/158060735, and b/158061923.
Fixes: 158081578
Fixes: 158057055
Fixes: 158060735
Fixes: 158061923
Change-Id: If7e6cd4ade3df540ba7d97d9265564132a235292
Since mDeferredDestroySurfaceControl is the same underlying
object as mSurfaceControl we also need to hold the mSurfaceControlLock
when writing to it.
Bug: 157657896
Test: Existing tests pass
Change-Id: Ie0da3ed5d94c7aae2593423fa2767dbc902da4c8
When AutofillManagerService try to trigger AugmentedAutofill, it uses
AutofillId.withoutSession() to get the AutollId without session. It
will return invalid "parentId:NO_ID" if the virtual AutofillId is
created with FLAG_IS_VIRTUAL_INT. The virtual AutofillId flag should
be FLAG_IS_VIRTUAL_INT or FLAG_IS_VIRTUAL_LONG, we should get
mVirtualIntId for FLAG_IS_VIRTUAL_INT or mVirtualLongId for
FLAG_IS_VIRTUAL_LONG.
Bug: 156408900
Test: atest android.autofillservice.cts.augmented
Test: atest android.view.autofill.AutofillIdTest#\
testVirtual_Long_withoutSession
Test: atest android.view.autofill.AutofillIdTest#\
testVirtual_Int_withoutSession
Test: Manual. Write a simple cts test for webview and check the
focused AutofillId is correct while switching between the field.
Change-Id: I7ebb4d7cfb6d6f383724b798dae69269ae3a27be
Throw an IllegalStateException if recevie touch move without down,
that could give an explicit feedback about GestureDetector may not
receive the full touch stream.
Bug: 149578486
Test: manual
Change-Id: I644ec1bebbca66dd0f0c219b63a6478b1290d1e1
Uses applySyncTransaction to synchronize all the surface
updates during split-screen enter/exit.
In Divider, all syncTransactions are serialized and runnables
can be posted to operate on the returned transactions so
they happen all at once.
This also required adding a "merge" functionality on
WindowContainerTransactions to handle racing between rotation
and other in-flight sync transactions (because they are
serialized, sometimes they got delayed).
Bug: 153579514
Test: Enter/exit split-screen and observe no flickers
Change-Id: I57df13489247f3c4fb3ca59efa26867a872e447f
The leash needs to be visible on creation otherwise when reparenting
the leash, the leashed layer may be hidden for a moment. This is because
Transaction#show can be deferred but Transaction#reparent cannot.
This change adds a layer flag to allow creating effect layers without
a color fill so we can avoid an additional sf transaction.
Fixes: 157646690
Test: go/wm-smoke
Test: atest SurfaceFlinger_test
Change-Id: I3d8a4f4820d7b8fb05daab697c25cff8def612c1
The finish() method is used to clear hard references after
the data copy has ended. This fixes a bug where the references are cleared before onError() is attempted to be called.
Test: CTS tests in followup CL
Bug: 157136368
Fixes: 157136368
Change-Id: If924fe388762831af90579e6b00bdf223230e203
This is missing notifications on the suggestions being hidden/shown
while filtering, but that is a bit harder to solve as we have to pipe
this state back from AutofillInlineSessionController. (although, I'm not
certain we even want this behavior, however it is inconsistent with the
dropdown behavior for now)
See bugs linked for what is fixed for filtering (some are not marked as
fixed as they still might need cts tests).
The main change is to make the privacy protection mechanism a bit
smarter - it now only applies to text-matching based logic.
Fix: 157763435
Fix: 156930859
Bug: 155517211
Bug: 157762527
Test: atest CtsAutoFillServiceTestCases:DatasetFilteringInlineTest \
CtsAutoFillServiceTestCases:InlineFilteringTest \
CtsAutoFillServiceTestCases:DatasetFilteringDropdownTest
Test: atest android.autofillservice.cts.inline
Change-Id: Icf94e21ba0df3b15a32454038772967cc1f6da79
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
By previous memory patch, the divider will always call update when
enter split when means it always add divider view when showing. So
we can reduce some update call to avoid any unnecessary surface
memory allocate.
Fix: 150190730
Test: Check split mode rotate normally and dump SF to check divider
memory status
Change-Id: Ibccd0b998d299968ee6d68127c801fae656d2127
This can be used to support a 3rd kind of system bar to inset the
applicaiton space.
Bug: 152763889
Test: manual
Change-Id: I3ba75886e94a9fe80a0d1a920749d152dda64031
When the IME restarts input, it re-requests to show itself. If the app is
already animating, we should maintain that animation instead of cancelling
it.
Fixes: 155962435
Test: atest WindowInsetsAnimationControllerTests
Change-Id: I57618e43b2cddc55e5dfc32111abbbd82cc6ed48
Fixes a few issues around cancelling insets animations:
- dispatch the onEnd callback when the animation gets cancelled
- When using the CancellationSignal, we need to properly cancel the
animation, and not just the controller - otherwise we never actually
remove it from mRunningAnimations.
- Now that cancellation dispatches to apps, make sure they do not
restart a different animation of the same type we just cancelled
Bug: 156740834
Test: atest WindowInsetsAnimationControllerTests
Change-Id: I4c36470a816ff8e3b92cd03090b8e947a2234f13