SurfaceControl resources may be heavy weight, and so we explicitly
release them when finished. Specifically, we need to fix this to
keep the CloseGuard from complaining in strict-mode.
Bug: 150805473
Test: Existing tests pass
Change-Id: Ie3c609f79a953374a4d336465676cdc312679f93
- 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
Forcibly-shown system bars are usually transient. Prevent them from
causing insets can reduce the UI shakiness, and can be compatible with
the behavior in the legacy insets mode.
Fix: 150582388
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
InsetsPolicyTest
Change-Id: I3c0fa4fb7555b2f63e1c4849db7b169489ab64e4
Both showSoftInputUnchecked() and closeCurrenInput() rely on rootView to
obtain window token. If view root is null, window has already gone away
and IME control had been revoked. Trying to show or hide at this time
would be a no-op.
Bug: 149900693
Test: Manually using the steps mentioned in bug and verify that there is
no NPE.
Change-Id: I294bb2ec5395d7502a855bafbac672af069e9b4a
Merged-In: I294bb2ec5395d7502a855bafbac672af069e9b4a
(cherry picked from commit ba9b716a70)
Provide a recording insets controller before the window gets
created, and replay the commands once a view gets attached. This
allows the client to use the controller in Activity.onCreate.
Test: WindowInsetsControllerTests
Bug: 118118435
Change-Id: I1a825ecc4367c02b27f2d08cd5442325315d4f89
* autofill will cache the inline suggestions response until it receives
a start input view event from IME
* the data flow from IMS point of view is:
IMS#startViews and IMS#doStartInput (before calling onStartInputView)
->
[async] InlineSuggestionsRequestCallback#onInputMethodStartInputView()
--- process boundary ---
->
IMMS.InlineSuggestionsRequestCallbackDecorator
#onInputMethodStartInputView()
->
InlineSuggestionSession.InlineSuggestionsRequestCallbackImpl
#onInputMethodStartInputView()
* similar data flow for IMS#finishViews()
* this CL should not block IME's UI thread because it's only issuing a
new async IPC from IMS start/finish input view call that's running on
the UI thread.
* there should not be performance impact on IMEs if autofill inline
integration is not active
Test: manual verification, atest EditorInfoTest
Test: atest android.autofillservice.cts.inline, with two failing cases:
InlineAugmentedLoginActivityTest#testAugmentedAutoFill_twoDatasetThenFilledSecond
and InlineAugmentedLoginActivityTest#testAugmentedAutoFill_oneDatasetThenFilled
due to the test itself being broken, I'll fix the test in a separate patch
Bug: 149522488
Bug: 149442582
Change-Id: I2faa3577b9f95a122f26a6d7fa7822a769a51e34
The InlineContentView uses the SurfacePackage instead of the SurfaceControl
for accessibility and UiAutomation supporting.
Bug: 149194105
Test: manual
Change-Id: Ib10f37a58dde7dc09d0ea16d1a121088dab4738e
By the compatible logic in DisplayPolicy.layoutWidnowLw(), if a regular
window (non-TYPE_STATUS_BAR_PANEL, non-TYPE_TOAST, and
non-TYPE_SYSTEM_ALERT) doesn't extend into any of system bars, it should
fit IME.
The logic was implemented by pf.set(displayFrames.mContent) in the
legacy insets mode, where mContent would be adjusted after processing
IME.
Fix: 149838078
Test: Steps in the target issue
Test: atest ViewRootImplTest
Change-Id: I6eb685fa1e3ad9789621e5647fc490300054db8b
With this CL, the public developers can interact with display cutout via
insets APIs.
Bug: 118118435
Test: build
Change-Id: If5ccacddb079bc5513ccb5820ea1c371e95fe562
This CL creates InsetsType and InternalInsetsType for display cutout.
With this CL, WindowInsets.getSystemWindowInsets() can be compatible
with the legacy insets mode.
Fix: 149932355
Test: Open an app which has LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS
and hides navigation bar on the display which has double display
cutout. And check if the app can get the correct result from
WindowInsets.getSystemWindowInsets().
Change-Id: I381a083d8c30e1678c835eaf5341e941139aa0d7
Accessibility framework default enable prefetching accessibility
nodes in application, when an accessibility service is trying to
query a node on the screen. These nodes are stored in the
AccessibilityCache which is in the accessibility service to save
the IPC between accessibility service and application on screen.
This mechanism does not help performance in some scenarios. For
example, an application with thousand nodes on screen and user
needs to scroll the content frequently. In this case, the
AccessibilityCache will be cleared frequently, and the prefetching
behavior also happens frequently. It becomes an extra effort and
drop the performance.
In this patch, we stop prefetching for a little time while a
scrolling event is detected. This can mitigate performance drop
symptom while user is scrolling.
Bug: 143730839
Test: Manual
Change-Id: I336ee2907ba63c32c6e53259589817dfd14b99e1
Merged-in: I336ee2907ba63c32c6e53259589817dfd14b99e1
(cherry picked from commit 1be8809974)
* So it can be checked against the autofillId from autofill manager
service
* Currently not checking due to race condition, will find a fix in
follow up CL
Test: manual verification
Bug: 149522488
Change-Id: I49457e33c7a1acb028023cb70f248805a96c5346
Currently there are two bugs in the close-guard behavior:
Bug 1:
a. Create surface control from parcel, close guard opens
b. Import new parcel, last object release close guard closed
c. Close guard not reopened, now we have a resource but no close guard
Bug 2:
a. Construct "new SurfaceControl()" but don't do anything with it
b. Now we have a close guard but no native resources
This CL ensures the state of the close guard matches the ownership of
native resources.
Bug: 150128124
Test: Existing tests pass
Change-Id: I0155854213ac64be3ac9a5d264815dbd43018fca
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