Commit Graph

15974 Commits

Author SHA1 Message Date
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
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
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
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
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
TreeHugger Robot
116ad8d147 Merge "SyncRtSurfaceTransactionApplier: Use BLASTSync" into sc-dev 2021-01-28 23:58:12 +00:00
Vishnu Nair
cc0297c2b2 Add enable backpressure layer flag
Test: presubmit
Bug: 176967609
Change-Id: I1875f1d4098154fac55d48e1f68babc3eed5a8ff
2021-01-28 11:50:29 -08:00
Tiger Huang
a049b3853c Merge "Remove references to hidden APIs from public Javadoc" into sc-dev 2021-01-28 17:05:31 +00:00
Tiger Huang
a67dff0d7b Merge "Revert "Add logs to indicate why a surface is invalid"" into sc-dev 2021-01-28 17:00:23 +00:00
Bernardo Rufino
03ec50d528 Open IM.getMaximumObscuringOpacityForTouch() and update docs.
Bug: 158002302
Test: atest WindowUntrustedTouchTest
Change-Id: I735169e0508678e07431704f184a938ffada53cc
Exempt-From-Owner-Approval: Approved on main branch
2021-01-28 15:30:54 +00:00
Santos Cordon
9fb0bb91c6 Merge "Add DisplayGroup ID to DisplayInfo" into sc-dev 2021-01-28 14:52:02 +00:00
shawnlin
f7ff55217c Create an API to get a cutout path
- Added a new API to get the cutout paths.
- Create a @hide class CutoutPathParserInfo
  - Used to store the needed info to create the cutout paths.
  - Will be used when DisplayCutout.getCutoutPath() is called to
    create the cutout paths.

Bug: 172646505
Test: atest DisplayCutoutTest DisplayContentTests WmDisplayCutoutTest
Change-Id: Ief92ce4466f6bffb2a9375388b71de43049b4eef
2021-01-28 19:12:54 +08:00
Tiger Huang
9b07b38688 Revert "Add logs to indicate why a surface is invalid"
This reverts commit 596e4fd4f7.
Because the root cause has been identified.

Bug: 175954493
Test: presubmit
Change-Id: Idcde497ffee1f10a4289520e154aa8b39eed1f78
2021-01-28 15:49:26 +08:00
Tiger Huang
c054c43815 Remove references to hidden APIs from public Javadoc
Otherwise, there will be inaccessible links which may confuse the
document reader.

Fix: 174863732
Test: presubmit
Change-Id: I4d6763e1cc1171f7ae657886f24e27576f856180
2021-01-28 15:19:14 +08:00
TreeHugger Robot
e95f58c7bd Merge "Implement the behavior after receiving auto translation request." into sc-dev 2021-01-28 06:28:49 +00:00
Yunfan Chen
5b401d84d9 Merge "Revert "Keep runtime insets types during layout"" into sc-dev 2021-01-28 05:27:25 +00:00
Ady Abraham
83043c0c9c Merge "Use setFrameRate for high refresh rate deny list" into sc-dev 2021-01-28 02:17:43 +00:00
Robert Carr
2b0b88aa53 SyncRtSurfaceTransactionApplier: Use BLASTSync
Helps us down the path of deprecating deferred transaction. BLASTSync
should also be easier to debug and produce less overhead on the server.

Bug: 168505645
Test: Existing tests pass
Change-Id: I7447b54d93ee8db0c5b6307372ee91e08c489af4
2021-01-27 23:52:54 +00:00
Sean Stout
50f6173c52 Add DisplayGroup ID to DisplayInfo
This allows for DisplayGroup to be used outside of the Display and Power
subsystems.

Bug: 175919470
test: make
Change-Id: I4346196202b3fff8ac42b0a52a395d6fe61d8ea8
2021-01-27 23:46:38 +00:00
Ady Abraham
aa47a68239 Use setFrameRate for high refresh rate deny list
Add visibility to SurfaceFlinger into the high refresh rate deny list
and let SurfaceFlinger handle it. Previously WM was setting the
preferredDisplayModeId on the denied app's window. The old way prevented
SurfaceFlinger to use the frame rate override feature as it didn't
know that a specific app is causing the refresh rate spec to be limited.

With this change, SurfaceFlinger will limit the display refresh rate
based on the high refresh rate deny list, and if possible, will use the
frame rate override feature to change the display rate to a multiple,
allowing other animations to be smooth while the denied app remains in
the low refresh rate.

Bug: 170502573
Test: manual
Change-Id: Ib75a3c229cea298b65aa56dc1c1b20ca016059c4
Merged-In: Ib75a3c229cea298b65aa56dc1c1b20ca016059c4
2021-01-27 23:02:38 +00:00
Joanne Chung
7f9a46a3d3 Implement the behavior after receiving auto translation request.
Send the TranslationRequest which collected from the UI toolkit to
the TranslationService. And apply the result to the UI toolkit to
show the translated text.

Bug: 172969740
Bug: 177887860
Test: Verified by using a sample app and made sure the full flow work
and the text was replaced with translated text.

Change-Id: I1db4d1eabe5bc65d8785f13f760af54f74e46c97
2021-01-27 15:36:40 +00:00
Yunfan Chen
168bfd8e91 Revert "Keep runtime insets types during layout"
This reverts commit b863e6e44b.

Reason for revert: Made G3Compat layout related tests flaky. See b/177911751

Bug: b/177911751
Test: Treehugger

Change-Id: I7e295beedc6581c01328a82b426a6d13feac2249
2021-01-27 21:14:30 +09:00
Wilson Wu
c4663ba6a9 Make IInputMethodManager to oneway (10/N)
1. Comply following methods to IVoidResultCallback to
emulate current behavior.

-. setAdditionalInputMethodSubtypes
-. removeImeSurface
-. removeImeSurfaceFromWindow

2. Add "oneway" to all methods which we already apply them
to result-callback model.

Bug: 163453493
Test: Manual test with keyboard
Test: atest CtsInputMethodTestCases
Test: atest DisplayImeControllerTest
Change-Id: Icb396ae5d74060af69c4ecb16723b2e37b9f2067
2021-01-27 09:12:47 +00:00
Chavi Weingarten
4fa4dd1056 Merge "Remove detachChildren" 2021-01-26 17:13:19 +00:00