Commit Graph

14121 Commits

Author SHA1 Message Date
Jorim Jaggi
ed3c321c9f Merge "Do not set early wakeup flag for inset animations" into rvc-dev 2020-03-10 12:12:09 +00:00
Yara Hassan
4a4e1e45d0 Merge "Added @IntDef for DATA_SHARE_ERROR_ constants" into rvc-dev 2020-03-10 11:04:12 +00:00
Charles Chen
2a77f43bee Merge "Generate WindowInsets with new insets API" into rvc-dev 2020-03-10 08:46:30 +00:00
Jacky Kao
4686370935 Merge "Improvement of IME Enter Action" into rvc-dev 2020-03-10 04:05:58 +00:00
TreeHugger Robot
bd8e715c01 Merge "Add localBounds in RemoteAnimationTarget" into rvc-dev 2020-03-10 03:14:08 +00:00
Dieter Hsu
04a579c6b7 Merge "Update API ExtraRenderingInfo by review feedback" into rvc-dev 2020-03-10 03:08:50 +00:00
Jorim Jaggi
33a35ef041 Do not set early wakeup flag for inset animations
Otherwise we shift entire SF schedule for nothing...

Test: Open IME, inspect systrace
Bug: 118118435
Change-Id: I1352860a8f04271cd5dc72366ffc317175db5e3a
2020-03-09 23:55:48 +00:00
Rob Carr
c2adc8d64c Merge "WindowManager: Avoid reparenting BLAST Surface in reparentChildren" into rvc-dev 2020-03-09 21:41:35 +00:00
Rob Carr
521e363a0f InsetController: Release leashes from RenderThread
We handle changes to the leashes from the UI thread, but use
the same SurfaceControl wrapper object from the RenderThread with
SyncRtSurfaceTransactionApplier. This means that at the time
we release a SurfaceControl from the UI thread we might have already
scheduled a SyncRtSurfaceTransactionApplier to use it, and actually
that could be in the process of running, leading to racy access and
crashes. To fix this we release the SurfaceControl from the RenderThread
so that it happens behind all existing operations.

Bug: 151086678
Test: Existing tests pass.
Change-Id: I2308d1c64f3f368c32587f99ddfb9e05955f821f
2020-03-09 11:44:08 -07:00
Yara Hassan
e41b29ec57 Added @IntDef for DATA_SHARE_ERROR_ constants
Bug: 150844071
Fix: 150844071
Test: NA
Change-Id: I853f10addf5b2f104ce04503aa033e7a8609d4b3
2020-03-09 18:35:59 +00:00
Rob Carr
698b684fdd WindowManager: Avoid reparenting BLAST Surface in reparentChildren
In cases where we are replacing the client surface transparently (e.g.
preserved surfaces), we call reparentChildren to move client added
Surfaces of the preserved Surface to the new Layer. However we are calling
this on the WSA layer, and so we end up reparenting the BLAST Surface
to the new layer. But since we always construct a new BLAST surface on the
WM side, we end up with 2! Rather than try and juggle about when we need
to or need not to construct a BLAST surface and reparenting them across
preservedSurfaces, it seemed either to just use the BLAST surface as the
root of the reparentChildren operation.

Bug: 150013915
Test: Enable BLAST, use split-screen
Change-Id: I1357200b41d183c2331b684ff636dd40a3b98168
2020-03-09 10:47:54 -07:00
lumark
2ec1912dfb Add localBounds in RemoteAnimationTarget
With Hierarchical animation, the animation layer will no longer
be a fixed fullscreen layer but animate on the parent container's surface.

In order to run a remote animation, the animation controller needs to
know bounds of the target relative to both its parent and the screen.

The CL includes:
1) RemoteAnimationTarget changes:
    - Add localBounds field for indicating the target bounds which
    the coodiates relatives to its parent.
    - Add screenScreenBounds field to replace souceContainerBounds
      to reflect the target bounds relatives to the screen.
    - Mark position & sourceContainerBounds as deprecated.
2) Modified related places to set correct localBounds information.

Test: build / run, make sure installing the old version of launcher on
      the this new platform change still compatible without crash.
Test: manual as follow steps:
  - Launching app from launcher to split-screen secondary stack
  - Swipe up to overview screen and drag TaskView to see if the TaskView
    surface is shfted, expected is not.
Bug: 148780840
Change-Id: Id9dbf6de193ab73fe94bc24ef6a27edc93380a14
2020-03-09 22:24:17 +08:00
Dieter Hsu
809a286aef Update API ExtraRenderingInfo by review feedback
Bug: 150685398
Test: m update-api docs
Change-Id: Id21dbde8d15dc936fbbe157b1b50e19564dcd051
Merged-In: Id21dbde8d15dc936fbbe157b1b50e19564dcd051
(cherry picked from commit 327bb81a78)
2020-03-06 05:15:41 +00:00
Evan Rosky
05ec88668e Fix config change on secondary split adjustment
This adds some more config controls to containerTransaction so that
sysui divider can "freeze" the configuration w/h while it is
offset for IME.

Bug: 133381284
Bug: 149952263
Bug: 150400846
Test: Just after boot, open split with settings in secondary and
      open the search activity. This should show IME and not
      randomly hide it when background apps are started.
      Also added a wmtest.
Change-Id: I731378f625079f8a1413469f71455650d9e59a50
2020-03-06 00:45:46 +00:00
Rob Carr
ed48db3d87 InsetSourceConsumer: Ensure we release Leash when finished.
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
2020-03-05 22:05:59 +00:00
Jorim Jaggi
b8138a2835 Merge "Fix alpha when applying insets" into rvc-dev 2020-03-05 18:38:23 +00:00
Galia Peycheva
fc1430a39e Merge "Make ActivityInfo.preferMinimalPostProcessing a flag" into rvc-dev 2020-03-05 15:45:06 +00:00
Jorim Jaggi
1df5bd2672 Fix alpha when applying insets
Test: WindowInsetsActivity
Bug: 150852597
Change-Id: I352a7e6c81b5bface1fc92f8d30a36408cabb125
2020-03-05 15:52:21 +01:00
Jorim Jaggi
0fb8fb2caa Address API feedback
Test: n/a
Bug: 149216359
Change-Id: I52019474b244816a5909fac4437d888cae81219f
2020-03-05 10:25:04 +00:00
Charles Chen
b8070fb66e Generate WindowInsets with new insets API
In previous CL[1], WindowMetrics#WindowInsets is provided
with legacy insets, which are stable insets and system
window insets. With the new insets mode enabled, we
should provide insets with new insets API.

[1]: f65e022caa

Bug: 150095967
Test: atest WindowMetricsTests
Change-Id: I251313b4b8c033dbad8b54e58cd166e2e1665d37
2020-03-05 15:25:19 +08:00
Jacky Kao
e09f66e71d Improvement of IME Enter Action
1. Remove the internal using argument, ACTION_ARGUMENT_IME_ACTION_ID_INT.
2. Add more descriptions about this accessibility action, ACTION_IME_ENTER

Bug: 150831470
Test: atest AccessibilityTextActionTest
Change-Id: Icfebdf280e3441bf7b2b6f55c3febbe3a1d98de6
2020-03-05 15:21:09 +08:00
Tiger Huang
b979998eb4 Merge "Prevent causing insets if the system bar is shown forcibly" into rvc-dev 2020-03-05 07:06:15 +00:00
Jackal Guo
2d627ec8f3 Merge "Update Javadoc" into rvc-dev 2020-03-05 01:11:23 +00:00
Winson Chung
896f664c77 Merge "Update sync rt applier for background blur" into rvc-dev 2020-03-04 20:09:22 +00:00
Dominik Laskowski
15842bc4cb Merge "Blacklist Display#getAddress" into rvc-dev 2020-03-04 18:28:04 +00:00
Heemin Seog
d1bbc14732 Merge "Replace TYPE_STATUS_BAR_PANEL with TYPE_STATUS_BAR_ADDITIONAL" into rvc-dev 2020-03-04 17:06:50 +00:00
Winson Chung
7e895da152 Update sync rt applier for background blur
- 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
2020-03-04 08:45:12 -08:00
Tony Mak
36beec8030 Merge "Rename TextClassificationSessionId.flattenToString() to getValue()" into rvc-dev 2020-03-04 16:08:03 +00:00
Tiger Huang
b9510efabd Prevent causing insets if the system bar is shown forcibly
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
2020-03-04 16:06:19 +08:00
Jackal Guo
fd2eab0067 Update Javadoc
Note the limitation on embedded hierarchy.

Bug: 149199973
Test: build pass (m -j docs)
Change-Id: I2be24ecb79f35a7ded913e37d8e8c32511f760f3
2020-03-04 11:51:47 +08:00
Ryan Lin
4401b0db11 Merge "Revise the javadoc and rename the constant" into rvc-dev 2020-03-04 01:49:37 +00:00
Tarandeep Singh
7bbce8ee6b Ignore unchecked IME show/hide when no root
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)
2020-03-03 23:43:37 +00:00
Feng Cao
c9611acb62 Merge "Notify autofill with the IME start/finish input view events" into rvc-dev 2020-03-03 18:36:11 +00:00
Galia Peycheva
bdd66e30f8 Make ActivityInfo.preferMinimalPostProcessing a flag
Bug: 149420259

Test: atest CtsWindowManagerDeviceTestCases:MinimalPostProcessingTest

Change-Id: I250669158a532316bebed8fa8c17e009b9293ecb
2020-03-03 16:59:26 +01:00
Jorim Jaggi
57157ac5d8 Fix WindowInsetsController lifecycle
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
2020-03-03 15:12:15 +01:00
ryanlwlin
ef02aa431f Revise the javadoc and rename the constant
Bug: 147804256
Test: The API Builds, there is no executable code here.
Change-Id: I452f8bcbedb7422878a1cfc7245c33f6e38b57e3
2020-03-03 18:01:17 +08:00
Feng Cao
7c85eb79a7 Notify autofill with the IME start/finish input view events
* 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
2020-03-02 21:18:16 -08:00
TreeHugger Robot
78160dc4c0 Merge "Uses SurfacePackage instead of SurfaceControl on inline suggestion" into rvc-dev 2020-03-03 02:56:24 +00:00
TreeHugger Robot
e858e30c46 Merge "Fix broken inset anims" into rvc-dev 2020-03-03 01:34:12 +00:00
TreeHugger Robot
bf2697bfda Merge "Restrict DisplayInfo dumping for app process" into rvc-dev 2020-03-03 00:58:22 +00:00
Jorim Jaggi
b71e6892f1 Fix broken inset anims
Parameters were correctly flipped but usages weren't.

Test: Open IME
Bug: 118118435
Change-Id: Ib0c417216b8e586c633c4607a9eb979e83b50231
2020-03-03 00:38:47 +01:00
Rob Carr
26351d7c4d Merge "SurfaceControl: Bind close-guard lifetime to native-object lifetime." into rvc-dev 2020-03-02 20:40:17 +00:00
Jorim Jaggi
96cc10c2de Merge "Various inset fixes" into rvc-dev 2020-03-02 20:22:34 +00:00
Jorim Jaggi
432e0c7440 Merge "Fix unnecssary traversal for starting windows" into rvc-dev 2020-03-02 20:20:52 +00:00
Dominik Laskowski
c8f52f6e79 Blacklist Display#getAddress
Bug: 138677816
Test: Call via reflection in app.
Change-Id: Idb022b32a61ce137db7a4718ef4c52c61481eed0
2020-03-02 12:11:45 -08:00
Jorim Jaggi
555a54a900 Merge "Unhide WindowInsets#inset with insets argument" into rvc-dev 2020-03-02 20:09:35 +00:00
Dominik Laskowski
1039ea50f3 Restrict DisplayInfo dumping for app process
Bug: 138677816
Bug: 150290985
Test: Log Display#toString in app.
Test: dumpsys display
Change-Id: I0d992b6662cde7e295916a7a144c68061dd1f4b3
2020-03-02 10:53:43 -08:00
Jorim Jaggi
aa6235d894 Fix unnecssary traversal for starting windows
Test: AppTransitionTests#testColdLaunchFromLauncher
Bug: 148985084
Change-Id: I526ad6d55c16b7b621229d142c1102dfd1cac1ad
2020-03-02 18:36:20 +01:00
Jorim Jaggi
3381108be2 Unhide WindowInsets#inset with insets argument
Test: WindowInsetsAnimationTests
Bug: 118118435
Change-Id: I359ac49403bfc63120d4e9565e4fa7801a840333
2020-03-02 18:13:29 +01:00
Jorim Jaggi
580aef5a82 Various inset fixes
- 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
2020-03-02 17:37:01 +01:00