Commit Graph

14376 Commits

Author SHA1 Message Date
Jorim Jaggi
42817272bc Merge "Revert "Defer updating InsetsSource.mFrame while animating"" into rvc-dev am: 684afc926d am: abe82f4bf7 am: 778ce49a3f am: ec1f135ce4
Change-Id: Ibfbe223961fda63568dfc7f6655ee5a4882ce446
2020-03-31 05:56:06 +00:00
Hongwei Wang
61602f74df Merge "Save reentry bounds from SysUI" into rvc-dev am: 6173317ad8 am: 59d4c1d241 am: 63b8e5404a am: e07546970a
Change-Id: If3340cf1163de39bf9ff54e6eba887e3893276d9
2020-03-31 05:35:47 +00:00
TreeHugger Robot
ec1c0d4a21 Merge "Fix flickers when changing control" into rvc-dev am: c322ed2173 am: 162040e358 am: b88c500fea am: 3cb2ddd649 am: 2e5799ae71
Change-Id: I19e3ca9cb45d5e9e058b318fc891d5a5c06859e7
2020-03-30 23:44:23 +00:00
Jorim Jaggi
684afc926d Merge "Revert "Defer updating InsetsSource.mFrame while animating"" into rvc-dev 2020-03-30 21:21:25 +00:00
Alex Spradlin
10700dceea Merge "Fix DecorView error about non-visual context" into rvc-dev
Automerger is stuck on this

Change-Id: Ia4cdfbb83787521e8eb32993dc6dd2cb2dbde96b
2020-03-30 20:57:09 +00:00
Adam He
1830552d39 Merge "Migrate android.view.inline to android.widget.inline" into rvc-dev am: 5a3a3f2239 am: c47f8abf1c am: c70f5e6254 am: 970ff93fa9 am: 321c7868fd
Change-Id: I5f2e3be463ce8a04e5475d4891acb2481ab831a6
2020-03-30 19:12:15 +00:00
Hongwei Wang
6173317ad8 Merge "Save reentry bounds from SysUI" into rvc-dev 2020-03-30 18:23:19 +00:00
Jorim Jaggi
8c56ac6b94 Revert "Defer updating InsetsSource.mFrame while animating"
This reverts commit 2751c29414.

Reason: Broken logic

Test: Open IME in Messages
Fixes: 152695319
Change-Id: I6a63f20c6342d4284a5da99e39e8f835028a5b6b
2020-03-30 19:22:37 +02:00
TreeHugger Robot
c322ed2173 Merge "Fix flickers when changing control" into rvc-dev 2020-03-30 11:45:54 +00:00
TreeHugger Robot
8927986f3b Merge "Fix DecorView error about non-visual context" into rvc-dev 2020-03-30 07:20:00 +00:00
Adam He
5a3a3f2239 Merge "Migrate android.view.inline to android.widget.inline" into rvc-dev 2020-03-30 06:53:35 +00:00
Charles Chen
828c498904 Fix DecorView error about non-visual context
This error showed because DecorContext uses application context
to get WindowManager. This CL changes to use context to do so.
Also rename fields in DecorContext because we actually can pass any
context in "activityContext."
Note that most cases of misuse WindowManager is covered by [1].
We can guarantee that WindowManager can be obtained by mContext.

[1]:I52aa0c4a02b7da018aa10f1473e1616564296e41

Bug: 150632074
Test: manual - enable strict mode and check the error log not shown.
Test: atest DecorContextTest
Change-Id: I558a2819e5928a802b897a130cfc3262115b9935
2020-03-30 11:24:48 +08:00
Adam He
f27433af0f Migrate android.view.inline to android.widget.inline
Old APIs are kept and marked as @hide + @removed to maintain
compatibility.

Bug: 151262653
Test: manual verification
Change-Id: Ia50a1f87c194211be5256e948d43fb54c1cbf941
2020-03-29 17:29:32 -07:00
Sergey Volnov
5532c77904 Store hard refences in a static context and pass through only weak
references during the Content Capture Sharing.

Motivation: if the remote app is killed, we don't want a possibility of
system server holding a stroing reference (through a reference chain)
to large objects in that app. Therefore what's send in the binder has to
be a weak reference. And we will store a hard reference to those objects
in the client app's static context.

Storing hard references to objects in system_servier is less critical, because that is not going to be killed.

Bug: 148265162
Test: covered by CTS tests
Change-Id: Ie561aab6019d191cf8659fb350e045089e7781ed
(cherry picked from commit 13f65b2974)
2020-03-29 12:50:41 +00:00
Automerger Merge Worker
d296db37df Merge "Merge "Allow autofill to request show soft IME through InputMethodManager" into rvc-dev am: a8d6a321d3 am: d6f3258272" into rvc-d1-dev-plus-aosp am: 5b12f3932f am: d57facd5da
Change-Id: Ib2b3a14d20238e5726e99685be307101f65c82cb
2020-03-28 04:37:12 +00:00
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
e451831e05 Merge "Clean up some formatting problems in the setFrameRate sdk docs" into rvc-dev am: b2e92b6a5a am: 7e5e1dc230 am: 7844cc3024 am: 009296cafc
Change-Id: I3683f1474e07fe033324141d4f5a3574f69884bd
2020-03-27 23:43:47 +00: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
TreeHugger Robot
e5bd4999c5 Merge "Store hard refences in a static context and pass through only weak references during the Content Capture Sharing." 2020-03-27 23:00:21 +00:00
Chris Li
f5e484ea7a Merge "Report incorrect context usage in ViewConfiguration" into rvc-dev am: c64d21d47a am: 5d0046ee46 am: bcbe1c853b am: bd88785e86
Change-Id: I51e744faf91439f7ed454c67906f7396f97f8c24
2020-03-27 22:16:16 +00:00
Chris Li
c64d21d47a Merge "Report incorrect context usage in ViewConfiguration" into rvc-dev 2020-03-27 20:19:15 +00:00
Automerger Merge Worker
5d8c7cd302 Merge "Merge "Moving the NO_SESSION_ID constant from ContentCaptureSession to ContentCaptureManager" into rvc-dev am: d347c7acaf am: 25bdce7fcf am: aa4391ae70" into rvc-qpr-dev-plus-aosp am: 415d437fc2
Change-Id: Ide81ce96c1eb37860ed44ff724bb48ec215fbc1c
2020-03-27 19:31:00 +00:00
Jorim Jaggi
49b9f6c67c Fix flickers when changing control
- Do not reset system bar visibility when changing control target
- Do not apply hide transaction when gaining control, because that
may result in a single-frame flicker because it will conflict with
the animation
- Check requestedVisible instead of InsetsState.isVisible in
DecorView to avoid drawing the bar backgrounds transiently
- Abort transient mode when focused win changes.

Bug: 150195782
Bug: 152014877
Change-Id: I8bc9cdc89ce7364984ade8146e12a706ad5e8edb
2020-03-27 20:11:31 +01: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
Hongwei Wang
221fe3d905 Save reentry bounds from SysUI
On the other hand, since we won't be able to get the callback from
TaskOrganizer when an activity (used to be in PiP mode) is removed,
reset of the reentry bounds is kept in WM.

Bug: 152549281
Test: manually enter/exit PiP
Change-Id: I8b4b7f87c4a7601d8bdf32af8105a68450012a87
2020-03-27 11:10:12 -07:00
Jorim Jaggi
ac30aafd29 Merge "Make caption a insets source" into rvc-dev 2020-03-27 17:27:01 +00:00
Galia Peycheva
7c901e8488 Merge "Change TYPE_DREAM logic to use ACTIVITY_TYPE_DREAM" 2020-03-27 16:34:56 +00:00
Sergey Volnov
13f65b2974 Store hard refences in a static context and pass through only weak
references during the Content Capture Sharing.

Motivation: if the remote app is killed, we don't want a possibility of
system server holding a stroing reference (through a reference chain)
to large objects in that app. Therefore what's send in the binder has to
be a weak reference. And we will store a hard reference to those objects
in the client app's static context.

Storing hard references to objects in system_servier is less critical, because that is not going to be killed.

Bug: 148265162
Test: covered by CTS tests
Change-Id: Ie561aab6019d191cf8659fb350e045089e7781ed
2020-03-27 16:11:24 +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
Galia Peycheva
e059cd3714 Change TYPE_DREAM logic to use ACTIVITY_TYPE_DREAM
Bug: 151750434

Test: m && flash && check that dream starts normally
Change-Id: Ic4561cd0594d7a3465454221db256499dd06c145
2020-03-27 12:19:52 +01:00
TreeHugger Robot
6551128716 Merge "Make caption a insets source" 2020-03-27 07:39:45 +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
6a62eaac3f Merge "Report bounds instead of size in WindowMetrics" into rvc-dev am: 363edf449a am: f8bb4fef74 am: 7e9a4c2f34 am: f68ab26611
Change-Id: I37268426928fa1da47ddb3ba68f080e1824dfedd
2020-03-27 01:46:40 +00:00
TreeHugger Robot
8281d06375 Merge "Add a new API to support click events on disabled views." 2020-03-27 01:24:25 +00: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
a50466e2c6 Merge "Fix single field highlighting for autofill." into rvc-dev am: cc45f332a4 am: 8c9f394c33 am: 380d789877 am: a1298f8e09
Change-Id: I9f089fd5225eaf9e9c93ab4b41532da23b68cbe6
2020-03-26 19:43:54 +00:00
Priyank Singh
248b6192c4 Add a new API to support click events on disabled views.
Bug: 151975097
Test: Manual
Change-Id: I05eee1334b3bc3e106b0ef7ec0dc7ec17d2f01f8
2020-03-26 12:33:20 -07:00
Adam He
cc45f332a4 Merge "Fix single field highlighting for autofill." into rvc-dev 2020-03-26 18:46:29 +00:00
Leon Scroggins
2a1b63c7df Merge "Convert ScreenshotGraphicBuffer to ScreenshotHardwareBuffer" 2020-03-26 17:29:14 +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
Yunfan Chen
4f7ebe3bce 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 15:56:25 +09:00
Rob Carr
db9036f5b6 Merge "SurfaceControlViewHost: Enable HARDWARE_ACCLERATION by default" into rvc-dev am: f7de7b6811 am: a18b62ff8e am: 2083bb4feb am: 569e6db2ee
Change-Id: I365152ee8db3584a91c1bbbb48013db3d79f96b4
2020-03-25 20:45:46 +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
Leon Scroggins III
46c927ed33 Convert ScreenshotGraphicBuffer to ScreenshotHardwareBuffer
Bug: 150395371
Test: make && flashall

Bitmap is replacing methods that use a hidden GraphicBuffer with ones
that use the public HardwareBuffer. ScreenshotGraphicBuffer is just a
holder for GraphicBuffer and some metadata; switch it to hold a
HardwareBuffer (and rename to match).

Remove GraphicBuffer#createFromExisting, which was only called by
ScreenshotGraphicBuffer#createFromNative. Also remove JNI references to
that method, which were no longer in use.

Switch uses of GraphicBuffer that retrieve it from a
ScreenshotGraphicBuffer to HardwareBuffer.

Changes are almost entirely mechanical:
- (Screenshot)GraphicBuffer -> (Screenshot)HardwareBuffer
- GraphicBuffer#destroy -> HardwareBuffer#close
- getGraphicBuffer -> getHardwareBuffer

When creating a Snapshot in SurfaceFreezer, use the ColorSpace of the
ScreenshotHardwareBuffer.

Remove GraphicBuffer#createFromExisting. This is no longer necessary,
and although it was marked UnsupportedAppUsage, go/nonsdk-dash shows no
usage.

Change-Id: I41cb03fb65432d208820a428783de82a9f152035
2020-03-25 13:45:12 -04:00
Winson Chung
de4c8caca5 Merge "Ensure previous background color is reapplied when showing a SurfaceView" into rvc-dev am: 7da77f4141 am: b18c003146 am: 6b1169b66a am: c2a41d4ffc
Change-Id: Iea5e0208cd78eed8a2375e19005530e1fd77b13b
2020-03-25 16:49:39 +00:00