Commit Graph

15993 Commits

Author SHA1 Message Date
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
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
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
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
Charles Chen
bdd07c2982 Promote mWindowContextToken to TestApi
... to test it on WindowManager_LayoutParamsTest

Test: atest WindowManager_LayoutParamsTest
Bug: 159767464
Bug: 153369119
Change-Id: Ibec7ce213ca614c4c40bdb4ce8b7cad9b2ca958e
2021-02-02 09:52:41 +08:00
Yunfan Chen
2a1aab36e3 Merge "Reland "Keep runtime insets types during layout"" into sc-dev 2021-02-02 01:32:31 +00:00
TreeHugger Robot
31741788ab Merge "Add SOURCE_SENSOR to InputDevice API." into sc-dev 2021-02-02 01:02:37 +00:00
Chris Ye
f00293f68e Remove @UnsupportedAppUsage annotation from InputDevice constroctor
As the constuctor signature has changed, remove the @UnsupportedAppUsage
for InputDevice.

Bug: 176338712
Test: atest FrameworksCoreTests
Change-Id: I244f265fd5123471f3920b5e9ddcff54194abcb0
2021-02-01 22:29:33 +00:00
Kim Low
922ed181fe New API methods to access external battery info
Created new API methods that allow apps to access external battery info
of devices such as bluetooth connected gamepads.

Bug: 161633432
Test: atest android.hardware.input.cts.tests.SonyDualshock4BluetoothTest
      atest android.hardware.input.cts.tests.SonyDualshock3UsbTest

Change-Id: Iba59fc9a259818b03c24ee8c2c49601952ed65a3
Merged-In: Iba59fc9a259818b03c24ee8c2c49601952ed65a3
2021-02-01 22:16:44 +00:00
Chris Ye
4aea1b05f4 Add SOURCE_SENSOR to InputDevice API.
Add input device source type SOURCE_SENSOR to InputDevice API.
SOURCE_SENSOR is not used to identify KeyEvent or MotionEvent but it can
be used to classifiy an input device is sensor capable.

Bug: 170131554
Test: atest InputDeviceSensorManagerTest
Change-Id: Iae93a771e69dda1f7bb8577632ea48ca79189b30
Merged-In: Iae93a771e69dda1f7bb8577632ea48ca79189b30
2021-02-01 22:13:10 +00:00
Chavi Weingarten
1999828918 Merge "Added new arguments for screenshot request" into sc-dev 2021-02-01 21:57:29 +00:00
John Reck
5cb290bf54 Add stretch plumbing
Bug: 179047472
Test: builds & boots

Change-Id: I30b5d6683160af598f98555f61af1cf5a7639bbe
2021-02-01 14:41:07 -05:00
Adrian Roos
d7f33cd648 API: Suppress existing NullableCollections lints (S edition)
Bug: 152525509
Test: make checkapi
Change-Id: Idf96709bf93ef49ca5ad3cdd1f14d06e0d9e09d7
Exempt-From-Owner-Approval: API lint large scale change
2021-02-01 14:54:34 +00:00
Adrian Roos
6a6aa5e23d API: Suppress existing NullableCollections lints
Bug: 152525509
Bug: 154763999
Test: make checkapi
Change-Id: Iecd0927e6be5496b2fbd1a49396db5439257ffe4
2021-02-01 15:04:10 +01:00
Mariia Sandrikova
bc1f09bdb3 Merge "Allow status and navigation bars to be semi-transparent in letterbox mode." into sc-dev 2021-02-01 12:38:12 +00:00
Bernardo Rufino
bf1903d277 Merge "Open IM.getMaximumObscuringOpacityForTouch() and update docs." into sc-dev 2021-02-01 09:55:38 +00:00
Chenxi Ni
821234c8dd Fix InputConnection#performSpellCheck logic:
- Change to trigger full content spell check when calling InputConnection#performSpellCheck.
 - When calling InputConnection#performSpellCheck, forces to do spell check even user is editing the word.

Bug: 177947314
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Test: Manually test the add to dictionary case with Gboard
Change-Id: I4f7c2e638e517fe91776ef0a285ee20e4cdc9a92
2021-02-01 17:49:16 +08:00
Yunfan Chen
6b0fd3669d Reland "Keep runtime insets types during layout"
This reverts commit 168bfd8e91.

Suspicious regression is not reproducible. Will keep communicate with
the POC and try to resolve them later.

Test: Treehugger
Test: testHideIme_WMS
Bug: 161689946
Change-Id: I029f94efb6b7054215888c6491e0d72cccf2ce09
2021-02-01 18:02:48 +09:00
Hongwei Wang
87528b5f9e Merge "Revert "SyncRtSurfaceTransactionApplier: Use BLASTSync"" into sc-dev 2021-01-30 00:15:49 +00:00
chaviw
98afaa6e1c Added new arguments for screenshot request
Added frameScaleX and frameScaleY to replace frameScale to allow callers
to specify an X and Y scale separately.

Added grayscale flag to allow the caller to take the screenshot
in grayscale.

Test: Screenshot in grayscale
Bug: 155825630
Change-Id: I00521c2fbc1a847586bde9c23beafa343115d4f5
2021-01-29 13:49:23 -08:00
TreeHugger Robot
ec5e4e5727 Merge "Add enable backpressure layer flag" into sc-dev 2021-01-29 17:52:52 +00:00
Mariia Sandrikova
3b9da58ab5 Allow status and navigation bars to be semi-transparent in letterbox mode.
Before this change, opaque bars were drawn over letterboxed activities to prevent showing a transparent bar over them because that can make notification icons or navigation buttons unreadable due to contrast between letterbox background and an activity. For instance, this happens when letterbox background is solid black while activity is white. To imporve UI in this case, semi-transparent bars are now allowed to be drawn over letterboxed activities.

Test: atest SystemUITests + manual letterbox testing
Fix: 175482966
Fix: 170216100
Change-Id: I35e35d01df7d25a5d77eb64af4e6b800f5020487
2021-01-29 17:28:15 +00:00
Hongwei Wang
de64ae1792 Revert "SyncRtSurfaceTransactionApplier: Use BLASTSync"
This reverts commit 2b0b88aa53.

Reason for revert: Regression, see b/178770656

Bug: 178770656
Test: Enter PiP from Play Movies
Change-Id: I2cf5bd035520676091f02ba977c671fcfbe60bf7
2021-01-29 17:27:56 +00:00
Shawn Lin
7ee87037f5 Merge "Create an API to get a cutout path" into sc-dev 2021-01-29 12:42:48 +00:00