Commit Graph

14214 Commits

Author SHA1 Message Date
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
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
Yuncheol Heo
e88d949e0a Merge "Create a general mapping between window types and inset types." into rvc-dev 2020-03-17 18:01:47 +00:00
Rob Carr
7e06b011a0 Merge "Explicitly exclude IME from Task Snapshots" into rvc-dev 2020-03-17 17:56:55 +00:00
Winson Chung
a8a123c1ea Merge "Add WCT call to set container hidden state" into rvc-dev 2020-03-17 16:35:58 +00:00
Tony Mak
a10f2b981a Merge "Remove local text classifier and related tests." into rvc-dev 2020-03-17 11:50:58 +00:00
Joanne Chung
099faf74e6 Fix broken tests in TextClassifierServiceTest.
We introduce SystemTCMetadata in ag/10605740 which centrializes the
needed information for the TCMS to process the requests. Because we
change the getPackageName() logic to return the calling package name
of SystemTCMetadata and the SystemTCMetadata is only created if the
event is from the SystemTC not other TCs. The tests fail because the
SelectionEvent.packageName is not populated.

This cl contains the following changes:
- Return the package name that the SelectionEvent or
TextClassificationContext originated from
- Fix incorrect javadoc of TextClassificationContext.getPackageName
- Always verify the calling package name for onSelectionEvent and
onTextClassifierEvent

Bug: 151614815
Test: atest TextClassifierServiceTest
Test: atest FrameworksCoreTests:android.view.textclassifier
Test: atest FrameworksCoreTests:android.widget.TextViewActivityTest
Test: atest CtsTextClassifierTestCases
Change-Id: Iabe1691d63e3ec6ac834984cf79b60faf9c0e765
2020-03-17 19:20:14 +08:00
Arthur Hung
423346e7e2 Pass source to dispatchBatchedInputEventPending (1/2)
The API requestUnbufferedDispatch allow View could receive the event in
unbuffered way. But doing processUnbufferedRequest in onInputEvent is
too late for the first event. Instead, we should pass the source of
the input event up to onBatchedInputEventPending, and then we can
use that to determine whether we could consume event immediately or not.

Bug: 149715123
Test: atest ViewUnbufferedTest
Change-Id: I4344a99de77d3758cc7d1df155394c89fa828f2e
2020-03-17 07:28:59 +00:00
TreeHugger Robot
f931471bf4 Merge "Run codegen v15 on inline suggestion data classes" into rvc-dev 2020-03-17 03:13:25 +00:00
Feng Cao
1ee5afacb9 Run codegen v15 on inline suggestion data classes
Test: atest InlineSuggestionsRequestTest
Bug: 151265975

Change-Id: I2e7ce699cc212e6b4e3dd2a7901d5695227990a4
2020-03-16 17:44:56 -07:00
Tony Mak
293bdf360a Remove local text classifier and related tests.
1. libtextclassifier and libtextclassifier-java are no longer built
   into framework/base.
2. Removed local text classifier code
3. Removed local text classifier test code.
   All of them should be already moved to libtextclassifier/tcs side.
4. Unify all the TC related log tags to "androidtc".

BUG: 147412216

Test: mts-tradefed run mts-extservices
Test: atest frameworks/base/core/java/android/view/textclassifier
Test: Sanity test: Smart selection

Change-Id: Icb1076153f51d5674c8a6c58681ffed5aa772149
2020-03-16 20:16:17 +00:00
Adrian Roos
146db0e46b Merge "Revert "Revert "WindowInsetsController: Address API feedback""" into rvc-dev 2020-03-16 17:03:31 +00:00
Yuncheol Heo
13a6eb6f7b Create a general mapping between window types and inset types.
Bug: 145242835
Test: atest WmTests:DisplayPolicyLayoutTests
Change-Id: I2f3a34cfb9f1ed9e2e205ea5a0917f75414bfcff
2020-03-16 15:45:26 +00:00
TreeHugger Robot
1660402a5c Merge "SurfaceControlViewHost: Respond to API feedback" into rvc-dev 2020-03-16 02:24:49 +00:00