Commit Graph

14226 Commits

Author SHA1 Message Date
TreeHugger Robot
a8d6a321d3 Merge "Allow autofill to request show soft IME through InputMethodManager" into rvc-dev 2020-03-28 03:46:40 +00:00
Feng Cao
43c2043e2d Allow autofill to request show soft IME through InputMethodManager
* So that autofill manager service can use it to control the IME
  visibility to better support the inline suggestion workflow

Test: m -j, also manually verify with local changes
Bug: 152082216

Change-Id: I5c4b236bedeced8ff714090effce46161ee1170a
2020-03-27 18:54:29 -07:00
Steven Thomas
b2e92b6a5a Merge "Clean up some formatting problems in the setFrameRate sdk docs" into rvc-dev 2020-03-27 23:00:22 +00:00
Chris Li
c64d21d47a Merge "Report incorrect context usage in ViewConfiguration" into rvc-dev 2020-03-27 20:19:15 +00:00
Galia Peycheva
66b1dfe6aa Merge "Change TYPE_DREAM logic to use ACTIVITY_TYPE_DREAM" into rvc-dev 2020-03-27 18:34:49 +00:00
TreeHugger Robot
d347c7acaf Merge "Moving the NO_SESSION_ID constant from ContentCaptureSession to ContentCaptureManager" into rvc-dev 2020-03-27 18:23:33 +00:00
Jorim Jaggi
ac30aafd29 Merge "Make caption a insets source" into rvc-dev 2020-03-27 17:27:01 +00:00
Mihir Patel
6f33b10ab5 Moving the NO_SESSION_ID constant from ContentCaptureSession to ContentCaptureManager
Bug: 150599209
Test: manual
Change-Id: I3e7b67cf92ddb6405829ec3c6ed2c491b4e77cab
2020-03-27 15:50:43 +00:00
Galia Peycheva
70b55719db Change TYPE_DREAM logic to use ACTIVITY_TYPE_DREAM
Bug: 151750434

Test: m && flash && check that dream starts normally

Merged-In: Ic4561cd0594d7a3465454221db256499dd06c145
Change-Id: I58a8795f2801b598be5c958b1a854e8f84f31940
2020-03-27 11:26:44 +00:00
Chris Li
bfe1b70fcd Report incorrect context usage in ViewConfiguration
Before, the documentation said that the passed context is an application context, which is incorrect to get the density, window metrics, and window manager. We should use visual context to get these instead.

Bug: 151474461
Test: StrictModeTest#testIncorrectContextUse_GetViewConfiguration
Change-Id: Iea28d727cafbb3ec8536742c6a0e594f73fe5a51
2020-03-26 22:09:28 -07:00
Steven Thomas
4528b333db Clean up some formatting problems in the setFrameRate sdk docs
Bug: 152413112
Test: Built the sdk docs locally, confirmed they look correct.
Change-Id: Ia7286958b582e6d0eb776c4ebeff6072dabc723e
2020-03-26 21:47:56 -07:00
Andrii Kulian
363edf449a Merge "Report bounds instead of size in WindowMetrics" into rvc-dev 2020-03-27 01:08:37 +00:00
Adam He
cc45f332a4 Merge "Fix single field highlighting for autofill." into rvc-dev 2020-03-26 18:46:29 +00:00
Yunfan Chen
fae0aeabe0 Make caption a insets source
This patch introduced setCaptionInsets, and set the Insets in
ViewRootImpl when dispatch the insets if there's a caption.

Modification is made in Window and DecorCaptionView to make caption
overlay with the app content, and pass the value to ViewRootImpl to
apply when dispatch. It is necessary to trigger a dispatch when caption
enabled status chanaged, otherwise sometimes it will not be updated.
Because caption is now updated locally on the client side.

Some old logic to deal with the overlay caption without insets are
removed, including the touch event dispatch override, the color
override.

Bug: 134531136
Test: go/wm-smoke
Test: Manually change the value in dispatchApplyInsets, can observe a
      blank content area when there's a caption bar.
Test: atest InsetsStateTest
Test: atest InsetsControllerTest
Change-Id: I356344a13c8569512d8f51f7ea19a5603f778252
2020-03-26 06:58:07 +00:00
Adam He
e2dbbce0dd Fix single field highlighting for autofill.
Bug: 150953184
Test: manual verification
Change-Id: I0519fe7c1d1d08cbee4c1703c1ad263a6eb7ef20
2020-03-25 13:30:24 -07:00
Rob Carr
f7de7b6811 Merge "SurfaceControlViewHost: Enable HARDWARE_ACCLERATION by default" into rvc-dev 2020-03-25 19:44:16 +00:00
Winson Chung
d4a9abd2de Ensure previous background color is reapplied when showing a SurfaceView
- This prevents a flash of black if we show the surfaceview again
  after it is hidden

Bug: 152134983
Test: Ensure no flash if previous background color was set and it is
      made visible again
Change-Id: I04d0222521c902da6d29e99ccdbd0aa8ad49917e
2020-03-25 06:42:05 +00:00
TreeHugger Robot
d3a0b89571 Merge "Defer updating InsetsSource.mFrame while animating" into rvc-dev 2020-03-24 22:16:09 +00:00
Jorim Jaggi
2751c29414 Defer updating InsetsSource.mFrame while animating
...otherwise developer will get onApplyWindowInsets which don't
match end value of animation. Super confusing

Test: InsetsControllerTest
Bug: 152071027
Change-Id: Ic1819512a5ce78843433bf7c231d062e12de0e7b
2020-03-24 21:25:46 +01:00
Robert Carr
4d5e630349 SurfaceControlViewHost: Enable HARDWARE_ACCLERATION by default
Normally we rely on the Activity stack to set this for us. Many use
cases require acceleration to be usable, we don't want
to expose the layout params in the public API so instead we just make
HARDWARE_ACCELERATION the default.

Bug: 152103238
Test: SurfaceControlViewHostTests
Change-Id: I767d351b0e5278642ae61074b47f01d185c026c8
2020-03-24 10:12:32 -07:00
Jorim Jaggi
367257cfc4 Merge "Performance optimizations for new insets" into rvc-dev 2020-03-24 14:25:47 +00:00
Andrii Kulian
0be1d67b68 Report bounds instead of size in WindowMetrics
Use case: Jetpack WM will use them to get the location of windows on
screen and compute the display feature positions in window coordinate
space.

Bug: 150908045
Test: atest FrameworksCoreTests:WindowMetricsTest
Test: atest CtsWindowManagerDeviceTestCases:WindowMetricsTests
Change-Id: Ia08950cd5df35971408e8b17bb27d97d29d0ab9b
Exempt-From-Owner-Approval: API change
2020-03-24 17:05:50 +08:00
TreeHugger Robot
aec6f5f6fa Merge "Pass source to dispatchBatchedInputEventPending (1/2)" into rvc-dev 2020-03-24 07:56:25 +00:00
Taran Singh
292da01e06 Merge "Fix floating IME visibility" into rvc-dev 2020-03-24 03:59:05 +00:00
TreeHugger Robot
a42c95cd64 Merge "Refine performance for calling into ContentCapture" into rvc-dev 2020-03-24 03:31:20 +00:00
Vishnu Nair
84d1c3c618 Merge "Revert "Revert "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows""" into rvc-dev 2020-03-23 23:25:21 +00:00
Taran Singh
0485041305 Fix floating IME visibility
Floating IME now applies final visibility

Test: Manually using steps in bug
Fix: 151953095
Change-Id: Id611e4bac22e9663d04e260794ea0f621d7b7e29
2020-03-23 15:58:39 -07:00
Jorim Jaggi
22488d31bb Performance optimizations for new insets
- 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
2020-03-23 22:31:52 +01:00
Svetoslav Ganov
09b9570862 Merge "Add APIs to move suggestions below/above window" into rvc-dev 2020-03-23 19:10:03 +00:00
Wale Ogunwale
f09fdecd55 Merge "Move some window related files to android.window package" into rvc-dev 2020-03-23 13:48:30 +00:00
TYM Tsai
b8690fba14 Refine performance for calling into ContentCapture
Bug: 149561198
Test: manual
Change-Id: I554dc2e6e940ba77d6842714e0efac372c27fe95
2020-03-23 17:46:19 +08:00
Wale Ogunwale
5794658be0 Move some window related files to android.window package
Window management files on the client side have normally been dumped in
either android.view or android.app package. This CL starts to
centralized them in android.window package so there is better
separation.

Test: they pass
Bug: 147406652
Bug: 152113464
Bug: 152117221
Change-Id: I4d64bd256e9b3581af0ccf9396f7dd2454132719
2020-03-22 09:47:43 -07:00
Siarhei Vishniakou
f26b795c04 resolve merge conflicts of 7e0769b219 to rvc-dev
Bug: 148311342
Change-Id: I99d6296b8947ba85573a11fc5d07583326dd15da
2020-03-21 06:08:47 +00:00
Siarhei Vishniakou
ab9efea935 Disable deep press when long press is long
If long press timeout is not 'short', we disable deep press.

Also InputManagerService.java will now be responsible for keeping track
of the feature state.

In ViewConfiguration, we update the default value to 400 to match the
value in the settings (b/30159825)

Bug: 148311342
Bug: 30159825
Test: see the description in the frameworks/native change
Change-Id: I88b933e9e863d40e383afdc990e09b848e23192e
Merged-In: I88b933e9e863d40e383afdc990e09b848e23192e
2020-03-20 23:25:03 +00:00
TreeHugger Robot
6b49d62306 Merge "Let insets sources can produce insets on 0-width or 0-height windows" into rvc-dev 2020-03-20 22:30:12 +00:00
Vishnu Nair
ac0dfc1096 Revert "Revert "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows""
This reverts commit 4f6b8ec056.

Reason for revert: Can not repro memory regression in R, b/134695730

Test: atest google/perf/memory/memory-test
Bug: b/119839070, b/73813813
Change-Id: Ibe560942949d3b37cd6d43ab49148cbf401e0e39
2020-03-20 20:16:47 +00:00
Svet Ganov
a57dadde24 Add APIs to move suggestions below/above window
Based on feedback from developers (GBoard) there are cases
where they want the app UI to cover the suggestions during
animations (keypress popup should cover the suggestion area).

This change adds a dedicated InlineContentView that is
returned when a suggestion is inflated. This view has APIs
to dynamically move its surface above/below the host window.
Also the new InlineContentView has no public constructors
as these are always created by the system via other APIs.
Finally, the InlineContentView only exposes the surface
control of the inlined UI which is useful for reparenting
to achieve clipping of multiple such views in a given area
on the screen.

When the content surface is below the app window it is not
be interactive and all touches go to the hosting app. In this
state the app can draw on top of the suggestions. When the
content surface is above the app window it is interactive
and the hosting app cannot render on top of it.

While at this this also fixes the case where a surface can
cover the suggestion surface even if it was on top of the
app window. Now if the embedded content surface is covered,
even partially, by another one the embedded UI is not
interactive.

bug:15140337

Test: atest AutofillTestCases

Change-Id: If1db185506ae6916b9d655ab647dd59b626cf61e
2020-03-20 12:29:07 -07:00
Jorim Jaggi
08a45d2445 Merge "Fine tune animation parameters for IME animations" into rvc-dev 2020-03-20 11:11:04 +00:00
Jorim Jaggi
5875cca667 Fine tune animation parameters for IME animations
To match spec as mentioned on the bug.

Bug: 151826721
Test: Visual
Change-Id: I1c2a70916e3a41195f5c003b9023c51ebd93eadb
2020-03-19 23:35:24 +01:00
Menghan Li
b42dfe722c Merge "Refines the javadoc of the ReplacementSpan.getContentDescription" into rvc-dev 2020-03-19 00:06:34 +00:00
Robert Carr
bb7964d645 SurfaceControlViewHost: Call die instead of dispatchDetached
Seems more appropriate as this more mirrors the normal release path.
I think everything gets release eventually either way.

Bug: 149591513
Test: Existing tests pass
Change-Id: I6f21d2723e06dbae4e09421efc352c179115bc40
2020-03-18 14:24:38 -07:00
Robert Carr
5af7d62e27 SurfaceView: Release SurfacePackage when done
We release the SurfaceControl assosciated with a Surface package
when accepting a new SurfacePackage, or at time of detached-from-window
this way we don't rely on the finalize method.

Bug: 149591513
Test: Existing tests pass
Change-Id: Ic0f7259394836ee094ed49db73b5986b778b450f
2020-03-18 12:53:28 -07:00
Rob Carr
4841efcfcd Merge "SurfacePackage: Add release method" into rvc-dev 2020-03-18 17:13:32 +00:00
Adrian Roos
269b162622 Merge "WindowInsetsAnimationController: Add state callback and getters" into rvc-dev 2020-03-18 16:43:10 +00:00
Adrian Roos
5d557edb44 WindowInsetsAnimationController: Add state callback and getters
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
2020-03-18 12:17:19 +01:00
menghanli
a7d97f7ec5 Refines the javadoc of the ReplacementSpan.getContentDescription
- inconsistent for the doc & API implementation.

Bug: 150472098
Test: Manual test
Change-Id: Idb1e35245487ac161225f1e53c6308541694b481
2020-03-18 18:06:36 +08:00
Wei Wang
540c37bae3 Merge "Send DEVICE_IDLE and DISPLAY_INACTIVE hint from framework" into rvc-dev 2020-03-18 03:57:41 +00:00
Joanne Chung
6d6ddf4502 Merge "Fix broken tests in TextClassifierServiceTest." into rvc-dev 2020-03-18 02:27:40 +00:00
Wei Wang
80d224621f Send DEVICE_IDLE and DISPLAY_INACTIVE hint from framework
Bug: 140148621
Test: boot device
Change-Id: I34971fde28a80056c51d3c1501467f975c7e82a2
2020-03-17 16:11:42 -07:00
Robert Carr
d9c9c0cc75 SurfacePackage: Add release method
Oversight, the SurfacePackage holds a reference to the SurfaceControl
which is protected by a close-guard. We need a way to close it
explicitly. Going to follow up with a patch to have SurfaceView
manage the lifetime when the SurfacePackage is consumed, but want
to make sure this explicit release gets in ASAP.

Bug: 149591513
Test: Existing tests pass
Change-Id: I7276a2440c38cc6d859b79b4c3ee57bc122ce2a6
2020-03-17 14:12:53 -07:00