Commit Graph

16015 Commits

Author SHA1 Message Date
Chavi Weingarten
e22b827b05 Merge "Remove preserve surfaces" into sc-dev 2021-02-05 22:37:01 +00:00
chaviw
32f2817bbd Remove preserve surfaces
When using blast, there's no need to call preserve surfaces since the
client can synchronize layer changes with the incoming buffer in the
new size. If the client uses the WindowOrganizer.applySync call they can
ensure they only update the layer geometry in the same transaction that
the new buffer is submitted in.

When removing preserveSurfaces, we can also remove reparentChildren
since that was the only caller of reparentChildren

Test: Split with SurfaceView
Bug: 177557720
Change-Id: I4574ac0d3b8a63b13ac44846e729b73ca0f88f23
2021-02-05 22:36:25 +00:00
Taran Singh
0ced23c739 Merge "Handle cancelled Insets animation" into rvc-qpr-dev am: e272df9338 am: 99813602c0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12735138

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I556713d0fa14ab0f794eab49ac6c16b5354ed647
2021-02-05 18:19:30 +00:00
Taran Singh
99813602c0 Merge "Handle cancelled Insets animation" into rvc-qpr-dev am: e272df9338
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12735138

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ice0c897bce976dbf3ab46fad7de41ed0e8fd0006
2021-02-05 18:00:53 +00:00
Winson Chung
92e9fb341d Merge "Revert "Sandbox letterbox and size compat apps"" into sc-dev 2021-02-05 17:52:07 +00:00
Taran Singh
e272df9338 Merge "Handle cancelled Insets animation" into rvc-qpr-dev 2021-02-05 17:38:50 +00:00
Taran Singh
e2307d9a48 Handle cancelled Insets animation
If an Insets animation was cancelled before it could complete,
handle it gracefully.

Fix: 154381667
Test: Run monkey runner that on any window that has edit text
      atest InsetsControllerTests
Change-Id: I052a0455f536a1c839a2782e54f19143295ba6c6
2021-02-05 17:38:31 +00:00
Mark Renouf
26737223a1 Merge "Corrects Javadoc method reference" into sc-dev 2021-02-05 16:42:25 +00:00
Issei Suzuki
5c3c5ea216 Merge "Make keyguard exit animation to remote animation." into sc-dev 2021-02-05 15:01:44 +00:00
TreeHugger Robot
6beb5e87c4 Merge "Remove special logic for top/bottom gesture insets" into sc-dev 2021-02-05 06:26:41 +00:00
Charles Chen
582247eef0 Merge changes from topic "window_context_2.0" into sc-dev
* changes:
  Apply WindowContext 2.0 for InputMethodMenuController
  Migrate WindowContext to WindowContextListener mechanism
2021-02-05 04:53:09 +00:00
Winson Chung
0ba6185639 Revert "Sandbox letterbox and size compat apps"
This reverts commit 4d3f1c5681.

Reason for revert: b/179308296

Change-Id: Idccf97038d5aa92268a13bacc512215878e8aefa
2021-02-04 21:57:57 +00:00
Mark Renouf
845ff65910 Corrects Javadoc method reference
Change-Id: If12bf0b8fb771f55f1a41637ab12fd94a217be26
2021-02-04 16:43:05 -05:00
Treehugger Robot
4f574f1422 Merge "Avoid ellipsis character in documentation." am: ac598696b4 am: 3aa7c4ed7b am: b0d13011f9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1573409

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iad1be5ffe2988ff3b763741c4e0513c9c697522a
2021-02-04 20:19:59 +00:00
Treehugger Robot
b0d13011f9 Merge "Avoid ellipsis character in documentation." am: ac598696b4 am: 3aa7c4ed7b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1573409

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I853899221e201121796a56768a8a65c73e78e80b
2021-02-04 19:53:38 +00:00
Issei Suzuki
08f0716df6 Make keyguard exit animation to remote animation.
The change is disabled by default. To enable remote animation, one needs
to set a property and to restart the WMS.

% adb root
% adb shell setprop persist.wm.enable_remote_keyguard_animation 1
% adb reboot

Test: Existing tests pass.
Bug: 175686676
Bug: 179122467
Change-Id: I65f36232df715616cfcadcf5d389b72e0894fddd
2021-02-04 18:38:44 +01:00
Adrian Roos
d68bee2746 API: Suppress existing NullableCollections lints am: 6a6aa5e23d am: 4da67dd2f6 am: 98eb82a6d3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1566096

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I314b97d2677f26b0a9c09a52918df49096450aea
2021-02-04 17:09:38 +00:00
Donald Chai
b4d25b8547 Avoid ellipsis character in documentation.
Renders as "?" on https://developer.android.com/reference/android/view/FrameMetrics, as if someone was unsure?

Change-Id: I4de9b99282480f1107bd8c3e387781775de9326c
2021-02-04 17:05:44 +00:00
Adrian Roos
98eb82a6d3 API: Suppress existing NullableCollections lints am: 6a6aa5e23d am: 4da67dd2f6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1566096

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I931b4ec091173789f480ecc761044a27944c4b85
2021-02-04 16:49:00 +00:00
Adrian Roos
4da67dd2f6 API: Suppress existing NullableCollections lints am: 6a6aa5e23d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1566096

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2d47151b7e26e82706f2d94a13c4067fe71fc168
2021-02-04 16:19:34 +00:00
Adrian Roos
60f3d5cee4 Merge changes from topic "nullablecollection"
* changes:
  API: Suppress existing NullableCollections lints (TaskOrganizer)
  API: Suppress existing NullableCollections lints
2021-02-04 15:53:34 +00:00
Charles Chen
4af9f4fc2c Apply WindowContext 2.0 for InputMethodMenuController
Before WindowContext 2.0, WM creates WindowToken for each
WindowContext. After that, it only creates WindowToken when
WindowContext adss the first view.

Therefore, if InputMethodMenuController invokes getSettingsContext
with different display id before showing the IME switch dialog,
moveWindowTokenToDisplay is no-op because WindowToken with
token switchDialogToken hasn't yet existed. We should re-register
to the different display to receive ImeContainer config changes for
this scenario.

Bug: 159767464
Bug: 153369119
Test: InputMethodMenuControllerTest
Change-Id: Ib9d94a275e1b686535ab3edd7c0c3ce957efd8cd
2021-02-04 23:27:04 +08:00
TreeHugger Robot
4abb5596a2 Merge "Fix and refine works in UiTranslationController" into sc-dev 2021-02-04 14:41:17 +00:00
Joanne Chung
aeb92182c1 Fix and refine works in UiTranslationController
1. Fix wrong state while calling runForEachView(). Make a copy of
mView and operate these views on ui thread.
2. Don't throw Exception in Activity side if the views paramether is
empty. The parameters is aleady checked in API call level.
3. Simpify call methods with lamda

Bug: 172969740
Test: call UiTranslation APIs and make sure methods are called as expected

Change-Id: Ic319939ec72a11608c64db876c57780339b75fd3
2021-02-04 19:49:02 +08:00
Galia Peycheva
bf21f495df Merge "Make window blur behind public API" into sc-dev 2021-02-04 08:31:45 +00:00
Tiger Huang
cf1138d479 Merge "Remove outFrame from the parameters of addWindow" into sc-dev 2021-02-04 05:46:17 +00:00
Treehugger Robot
3ae343dfd8 Merge "OWNERS for InlineSuggestion* in view/inputmethod" am: 2745c788a0 am: a42ad625ac am: a13d5a3cba
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1562186

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3a018097be211007dc599da7eaee41250f4b58b9
2021-02-04 01:11:37 +00:00
Chris Ye
a539c9da30 Merge "Remove @UnsupportedAppUsage annotation from InputDevice constroctor" into sc-dev 2021-02-04 01:10:10 +00:00
Treehugger Robot
a13d5a3cba Merge "OWNERS for InlineSuggestion* in view/inputmethod" am: 2745c788a0 am: a42ad625ac
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1562186

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2c009ee37657466cc94974af0331d922aa413279
2021-02-04 00:40:33 +00:00
Rob Carr
9e2a817443 Merge "SurfaceView: Release BBQ where we release Surface" into sc-dev 2021-02-03 22:09:55 +00:00
Chavi Weingarten
3191bf6c0f Merge "Rename ImpressionAttestation to ScreenshotHash" into sc-dev 2021-02-03 17:31:54 +00:00
Galia Peycheva
8e30771f55 Make window blur behind public API
This CL makes the blur behind functionality a public API. As part of
this change, we change its previous name (windowBackgroundBlurRadius) to
windowBlurBehindRadius. This avoids a name clash with the Window
background blur, which only blurs the area of the window. Blur behind
blurs everything behind the window (similar behaviour to the dim).

This CL exposes WM.LP.blurBehindRadius and, in addition, undeprecates an
old flag - FLAG_BLUR_BEHIND. FLAG_BLUR_BEHIND enables the blur behind
and blurBehindRadius specifies how dense the blur will be.

In addition, we expose two xml attributes on the Window -
windowBlurBehindEnable and windowBlurBehindRadius. The usage is similar
to the dim api.

Bug: 167166562
Bug: 177524486
Test: m && test app
Change-Id: If2fcde644c5bcca112495ca99ee66bae909877db
Merged-In: If2fcde644c5bcca112495ca99ee66bae909877db
2021-02-03 16:25:49 +00:00
Tiger Huang
46252a4134 Remove outFrame from the parameters of addWindow
This CL moves computeWindowBounds to the client side. The client can use
it to compute the frame hint on its own.

This can be a step to make client compute its window frame locally.

Bug: 161810301
BUg: 175858823
Test: atest WindowAddRemovePerfTest ActivityRecordTests
            DisplayPolicyLayoutTests TaskSnapshotSurfaceTest
Change-Id: Ia5af1919b8e0e973646a63d1a4c3bf7ea7e2d1f6
2021-02-03 22:50:41 +08:00
Shawn Lin
7de88bceb9 Merge "Provides apps the rounded corners info" into sc-dev 2021-02-03 11:20:17 +00:00
Naomi Musgrave
4d3f1c5681 Sandbox letterbox and size compat apps
Sandbox Display#getRealSize and WindowManager
bounds when letterbox or size compat mode are
applied to the configuration. Display uses
this field to provide the sandboxed display
size.

Test: atest WindowConfigurationTests
Test: atest FrameworksMockingCoreTests:android.view.DisplayTests
Test: atest WmTests:SizeCompatTests
Bug: 171386167
Change-Id: I6f78edcd9214b52ab0708e3892bc86ee05bb5b9a
2021-02-03 10:03:20 +00:00
Galia Peycheva
e6ae6e325a Merge changes from topic "revert-13350963-blur_system_api-AFRJFBKNBA-sc-dev" into sc-dev
* changes:
  Revert "Add permission for blur SystemApi"
  Revert "Make window background blurs SystemApi"
  Revert "Make BackgroundBlurDrawable a SystemApi"
2021-02-03 05:49:41 +00:00
Lucy Chang
ce003478e6 Merge "Clear data after calling ViewGroup#buildOrderedChildList" into sc-dev 2021-02-03 03:02:11 +00:00
Yunfan Chen
d88a27991a Remove special logic for top/bottom gesture insets
With the removal, only the insets with mandatory gesture types provides
mandatory gesture insets. Previously we treat the top and bottom gesture
insets differently.

Modified to addWindowLw to let the bars provide correct insets type
corresponding to the change.

Bug: 161689946
Test: DisplayPolicyTests DisplayPolicyLayoutTests
Change-Id: I91f19d4b50d06a8afcac8355d08e1634973127f1
2021-02-03 10:52:59 +09:00
Robert Carr
57c853f230 SurfaceView: Release BBQ where we release Surface
This more closesly mirrors the timing of pre-BLAST behavior. There
are also some concerns that we may not reach releaseSurfaces if our
first call to tryReleaseSurface came through ViewRoot#doDie.

Bug: 176691195
Test: Existing tests pass
Change-Id: I211a3e80eab1e847a4d6ade47ff19cf131de8f39
2021-02-02 15:54:28 -08:00
chaviw
060b66f867 Rename ImpressionAttestation to ScreenshotHash
Rename to reflect what the code is actually doing

Test: Builds
Bug: 155825630
Change-Id: I7cef8f10d9cc6e6a6a69c5ae6d79e5794b288d96
2021-02-02 14:30:40 -08:00
Galia Peycheva
3804d61f2a Revert "Make window background blurs SystemApi"
Revert "Add permission check for blurs in SurfaceFlinger"

Revert "Remove public usages of FLAG_BLUR_BEHIND"

Revert "Add pid and uid to SF::setClientStateLocked"

Revert "Add USE_BACKGROUND_BLUR to cts expected permissions"

Revert submission 13350963-blur_system_api

Reason for revert: This topic made blurs a system api. API council voted against that and we will instead aim to make it public for S. None of these changes are relevant in that case.

Reverted Changes:
I3683db296:Remove public usages of FLAG_BLUR_BEHIND
I23b21b603:Add USE_BACKGROUND_BLUR to cts expected permission...
Id21f03793:Add pid and uid to SF::setClientStateLocked
If5d8344a5:Add permission for blur SystemApi
I70d1e1715:Add permission check for blurs in SurfaceFlinger
Icf98c3607:Make window background blurs SystemApi
I0b881ec6e:Make BackgroundBlurDrawable a SystemApi

Bug: 177523043
Test: m
Change-Id: I0f7bcf34db2986d8d5e08b115a611e8e07db5917
Merged-In: I0f7bcf34db2986d8d5e08b115a611e8e07db5917
2021-02-02 23:08:29 +01:00
Galia Peycheva
f83b52cc13 Revert "Make BackgroundBlurDrawable a SystemApi"
Revert "Add permission check for blurs in SurfaceFlinger"

Revert "Remove public usages of FLAG_BLUR_BEHIND"

Revert "Add pid and uid to SF::setClientStateLocked"

Revert "Add USE_BACKGROUND_BLUR to cts expected permissions"

Revert submission 13350963-blur_system_api

Reason for revert: This topic made blurs a system api. API council voted against that and we will instead aim to make it public for S. None of these changes are relevant in that case.

Reverted Changes:
I3683db296:Remove public usages of FLAG_BLUR_BEHIND
I23b21b603:Add USE_BACKGROUND_BLUR to cts expected permission...
Id21f03793:Add pid and uid to SF::setClientStateLocked
If5d8344a5:Add permission for blur SystemApi
I70d1e1715:Add permission check for blurs in SurfaceFlinger
Icf98c3607:Make window background blurs SystemApi
I0b881ec6e:Make BackgroundBlurDrawable a SystemApi

Bug: 177523043
Test: m
Change-Id: Iee4b89b06508c7dc3b7266452bb0b987f8670fac
Merged-In: Iee4b89b06508c7dc3b7266452bb0b987f8670fac
2021-02-02 23:02:05 +01:00
Ahaan Ugale
4aa50a2f0f OWNERS for InlineSuggestion* in view/inputmethod
Change-Id: I4eec1c36afeb563ff050e0d0ee570cdeea80916f
2021-02-02 18:38:42 +00:00
TreeHugger Robot
dc22edcddb Merge "Promote mWindowContextToken to TestApi" into sc-dev 2021-02-02 15:55:35 +00:00
John Reck
7cf75f0b15 Merge "Add stretch plumbing" into sc-dev 2021-02-02 14:49:42 +00:00
Adrian Roos
84199909eb Merge changes from topic "nullablecollection" into sc-dev
* changes:
  API: Suppress existing NullableCollections lints (TaskOrganizer)
  API: Suppress existing NullableCollections lints (S edition)
2021-02-02 09:24:38 +00:00
shawnlin
5ab588a48b Provides apps the rounded corners info
- Created a new @hide class RoundedCorners
  - The class is used to create and manager all the rounded corners.
- Created a new public class RoundedCorner
  - Represent each rounded corner.
- Created a new public API in Display to get the original rounded
  corners.
- Created a new public API in WindowInsets to get the rounded corners
  relative to the window bounds.

Bug: 161808676
Test: atest RoundedCornerTest RoundedCornersTest
      DisplayPolicyLayoutTests DisplayPolicyTests
      WallpaperControllerTests
Change-Id: I58c671b0e9a077cdf26764c6302537c72db0f667
2021-02-02 16:33:34 +08:00
Chenxi Ni
f5c2cf83e9 Merge "Fix InputConnection#performSpellCheck logic:" into sc-dev 2021-02-02 07:35:29 +00:00
Chris Ye
2b686e85f1 Merge "New API methods to access external battery info" into sc-dev 2021-02-02 06:42:37 +00:00
lucychang
73590c7751 Clear data after calling ViewGroup#buildOrderedChildList
It needs to clear the reference views after calling
ViewGroup#buildOrderedChildList to prevent memory leak.

Bug: 178029590
Test: manually test
Change-Id: I770c8deab00496f9361ab30837a31f44c7367a46
2021-02-02 03:45:26 +00:00