Commit Graph

17722 Commits

Author SHA1 Message Date
Leon Scroggins
96fc474abc Revert "Add/plumb SurfaceControl.DISPLAY_DECORATION"
Revert "Add eLayerIsDisplayDecoration flag"

Revert submission 16511727-wm_DISPLAY_DECORATION

Reason for revert: b/211835607
Reverted Changes:
I1da3199ba:Allow changing composition from DISPLAY_DECORATION...
I1fae74b36:Update documentation for DISPLAY_DECORATION
I1da03a88f:Add eLayerIsDisplayDecoration flag
I7f22dfd03:Add/plumb SurfaceControl.DISPLAY_DECORATION

Change-Id: Ieef6e12206aaab6d3bcd2819a139ae1f201b2f8d
2021-12-23 15:28:46 +00:00
Leon Scroggins III
b32fc55947 Add/plumb SurfaceControl.DISPLAY_DECORATION
When passed to native, this flag will tell a Layer that it should use
Composition.DISPLAY_DECORATION.

Bug: 193170859
Test: manual
Change-Id: I7f22dfd03d86786afee078a95f0af590be0bbdfd
2021-12-20 20:54:46 -05:00
Leon Scroggins
4d6ea2fb47 Merge "Revert "Enforce that RuntimeShader is only hardware accelerated"" 2021-12-20 13:47:12 +00:00
Mariia Sandrikova
d77c92a3f1 Merge changes from topic "camera-compat" into sc-v2-dev am: 3486eacda3 am: 02a17e7b1f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16468379

Change-Id: Ic9916a3883eef0148a86c86149aa2e883fc56d1b
2021-12-18 22:19:12 +00:00
Mariia Sandrikova
02a17e7b1f Merge changes from topic "camera-compat" into sc-v2-dev am: 3486eacda3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16468379

Change-Id: I1e56abcef9715a3dd6a00d70cb815c4d9260175a
2021-12-18 21:59:31 +00:00
Mariia Sandrikova
3486eacda3 Merge changes from topic "camera-compat" into sc-v2-dev
* changes:
  [3/n] Camera Compat UI: Add a camera compat control.
  [2/n] Camera Compat UI: Add interfaces for client-server communication.
2021-12-18 21:39:13 +00:00
Shubham Dubey
f95fdd9472 Revert "Enforce that RuntimeShader is only hardware accelerated"
Revert "Add tests to ensure hardware only for RuntimeShader API"

Revert submission 16475336-RuntimeShader_softwareOnly

Reason for revert: Breaking tests as system is dying
Error: Software rendering doesn't support RuntimeShader
Bug: b/211066630

Reverted Changes:
Id0ee4d1f0:Enforce that RuntimeShader is only hardware accele...
Ib4c2e54bd:Add tests to ensure hardware only for RuntimeShade...

Change-Id: Id7bbf2609a06c1cd69f6a457dab44f9478d95742
2021-12-17 05:43:49 +00:00
Joanne Chung
51214b3529 Merge "Initial layout of selection toolbar for render service part." 2021-12-17 02:04:22 +00:00
Mariia Sandrikova
24f4d8a952 [2/n] Camera Compat UI: Add interfaces for client-server communication.
Changes:
- Listens to changes from the client coming through IActivityClientController#requestCompatCameraControl to ActivityRecord#updateCameraCompatState
- ActivityRecord#updateCameraCompatState sends updated state via TaskInfo to WM Shell
- ITaskOrganizerController#updateCameraCompatControlState to dispatch the user interactions with the control from WM Shell triggers callback to ActivityRecord#updateCameraCompatStateFromUser
- ActivityRecord#updateCameraCompatStateFromUser remembers the user's choice and asks client to apply treatment through ICompatCameraControlCallback

Feature is guarded with config_isCameraCompatControlForStretchedIssuesEnabled

Test: atest WMShellUnitTests:ShellTaskOrganizerTests, atest WmTests:ActivityRecordTests
Bug: 206602997
Change-Id: I083aa6718bd67456bedd9444e9b78740c041f870
2021-12-17 00:18:57 +00:00
TreeHugger Robot
db09652823 Merge "Enforce that RuntimeShader is only hardware accelerated" 2021-12-16 21:56:33 +00:00
TreeHugger Robot
ac68facca4 Merge "Scribe in IMF: Handwriting support API 1/N" 2021-12-16 21:36:32 +00:00
Prabir Pradhan
57b654fcaa Merge "Use SOURCE_CLASS_POINTER as the default source for MotionEvent" into sc-v2-dev am: 72e278d976 am: 0e229b7f33
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16432384

Change-Id: I8a3495d162b6957263febbc291265e9bd37fa0e5
2021-12-16 20:45:23 +00:00
TreeHugger Robot
52347713d1 Merge "SurfaceView: Synchronize initial destframe change from BBQ" into sc-v2-dev am: 852000568a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16468818

Change-Id: I133fc76f951540f36f7c6d116d0334638734d1a4
2021-12-16 20:44:33 +00:00
TreeHugger Robot
852000568a Merge "SurfaceView: Synchronize initial destframe change from BBQ" into sc-v2-dev 2021-12-16 20:31:12 +00:00
Prabir Pradhan
0e229b7f33 Merge "Use SOURCE_CLASS_POINTER as the default source for MotionEvent" into sc-v2-dev am: 72e278d976
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16432384

Change-Id: I7916149c7abb1e940558383155e2b4cca3a88f2e
2021-12-16 19:40:16 +00:00
Derek Sollenberger
c93d29cfab Enforce that RuntimeShader is only hardware accelerated
Throw an illegal argument exception any time a Paint with
a RuntimeShader is attempted to be drawn into a software
canvas. Also mark that a Picture that uses a RuntimeShader is
properly marked as requiring hardware acceleration.
These tests check that the use of RuntimeShaders trigger

Bug: 189102731
Bug: 201546136
Test: atest CtsUiRenderingTestCases:RuntimeShaderTests
Change-Id: Id0ee4d1f05e2975031121298b45f925ee74f6818
2021-12-16 19:36:46 +00:00
Taran Singh
6307641de3 Scribe in IMF: Handwriting support API 1/N
Introduce new API for declaring Scribe support in IMEs.

CTS-Coverage-Bug: 210917621
Bug: 203086136

Change-Id: Ie012d865d58e6d41fe6ab6de479dd6ed86e6106c
2021-12-16 17:39:37 +00:00
Joanne Chung
25c054d3a0 Initial layout of selection toolbar for render service part.
The initial selection toolbar render service part architecture. The
implementation will be done in the follow up changes.

Bug: 190030331
Bug: 205822301
Test: manual. Call API and can bind service successfully.
Ignore-AOSP-First: new feature for T.

Change-Id: I3a5d3802c2afca432f137742cfd6a1e0045ed975
2021-12-16 22:55:29 +08:00
Prabir Pradhan
b1d3e076af Use SOURCE_CLASS_POINTER as the default source for MotionEvent
This CL also adds a test to ensure that a pointer source is used by
default when obtaining a MotionEvent, and that offsets are only applied
to pointer sources.

Bug: 207251886
Test: atest MotionEventTests
Change-Id: Id40accc6d1238c940f139a18b26fa277dd6e11f9
2021-12-16 09:19:29 +00:00
Joanne Chung
fcf3a92a1d Merge "Initial layout of selection toolbar." 2021-12-16 05:56:41 +00:00
Joanne Chung
41c4a0ac71 Initial layout of selection toolbar.
The initial selection toolbar related architecture. Render service
part and the implementation will be revised in the follow up changes.

Bug: 190030331
Bug: 205822301
Test: manual. Can boot to home and get manager successfully.
Ignore-AOSP-First: new file for T

Change-Id: Iab5d5f2e5e48e6258a63fb0c479194c958ea61e8
2021-12-16 11:35:23 +08:00
Bernardo Rufino
3d10fb4b83 Merge "Migrate unsafe parcel APIs in framework-minus-apex" 2021-12-15 19:15:58 +00:00
Bernardo Rufino
90bb3709dc Migrate unsafe parcel APIs in framework-minus-apex
Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()

This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).

A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.

Bug: 195622897
Test: TH passes
Change-Id: I11a27b9bdab7959ee86e90aa1e1cbebd7aaf883c
2021-12-15 18:21:38 +00:00
Treehugger Robot
9e9eb416f7 Merge "Fix an off-by-one bug in EditableInputConnection#endBatchEdit() return value" am: e908851af5 am: 0c024d11ed am: d9c2da8152
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1923058

Change-Id: I3ed9484befd715965561bd80d0de6498a5b2735e
2021-12-15 18:19:34 +00:00
Jon Eckenrode
253d2e84b7 Merge "Revised the OnDragListener and onDragEvent API documentation." am: 629810015f am: b38f3d7744 am: 8ad9969307 am: b085975620
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1907031

Change-Id: I79153a7d2f595919b14a602fe984e55a7d160728
2021-12-15 18:17:06 +00:00
Treehugger Robot
d9c2da8152 Merge "Fix an off-by-one bug in EditableInputConnection#endBatchEdit() return value" am: e908851af5 am: 0c024d11ed
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1923058

Change-Id: Icaa621b17c72031f0a767aaece8c96a92221fc82
2021-12-15 17:54:19 +00:00
Jon Eckenrode
b085975620 Merge "Revised the OnDragListener and onDragEvent API documentation." am: 629810015f am: b38f3d7744 am: 8ad9969307
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1907031

Change-Id: I10d1576b26e8c4eebfc78eb292e07ab2ccf5d813
2021-12-15 17:36:23 +00:00
Treehugger Robot
e908851af5 Merge "Fix an off-by-one bug in EditableInputConnection#endBatchEdit() return value" 2021-12-15 17:00:15 +00:00
Jon Eckenrode
8ad9969307 Merge "Revised the OnDragListener and onDragEvent API documentation." am: 629810015f am: b38f3d7744
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1907031

Change-Id: Ic1790e4270db0e0da99c33cc0911a33bbf4727c9
2021-12-15 16:59:14 +00:00
Jon Eckenrode
629810015f Merge "Revised the OnDragListener and onDragEvent API documentation." 2021-12-15 15:22:55 +00:00
Jacky Kao
087d988261 Merge "Adds Builder for CollectionItemInfo class" 2021-12-14 23:24:15 +00:00
Yohei Yukawa
1fdc14b8a9 Fix an off-by-one bug in EditableInputConnection#endBatchEdit() return value
This is a follow up CL to our previous CL [1], which had an off-by-one
bug when determining the return value of

   EditableInputConnection#endBatchEdit().

According to the API document of InputConnection#endBatchEdit(), the
following test should pass.

   EditText editText = new EditText(context);
   EditorInfo editorInfo = new EditorInfo();
   InputConnection editableInputConnection =
           editText.onCreateInputConnection(editorInfo);
   assertThat(editableInputConnection.beginBatchEdit()).isTrue();
   assertThat(editableInputConnection.beginBatchEdit()).isTrue();
   assertThat(editableInputConnection.endBatchEdit()).isTrue();
   assertThat(editableInputConnection.endBatchEdit()).isFalse(); // (*)
   assertThat(editableInputConnection.endBatchEdit()).isFalse();

However, the last assertion marked with (*) actually fails due to an
off-by-one bug.  This CL finally fixes it.

The risk of app compat breakages because of fixing this long standing
bug is supposed to be low, mainly because:

 * the system has not relied on this return value yet.
 * Widgets like WebView have correctly implemented this API.
 * IME has always received true no matter what the app returned, which
   is the same behavior as other async InputConnection APIs.

This CL adds several notes to InputConnection#endBatchEdit() document
to help developers correctly implement and use this API.

 [1]: I1ec5518fdc16fb0551fbce9d13f5d92eb4bc78c0
      c478c171e9

Fix: 209958658
Fix: 210165648
Test: atest -c CtsInputMethodTestCases:EditTextImeSupportTest
Change-Id: Ibc40072fa11a4d6e3c24b8d7860c914ccdbcbc8a
Merged-In: Ibc40072fa11a4d6e3c24b8d7860c914ccdbcbc8a
(cherry picked from commit beda2b7f76)
2021-12-14 15:15:54 -08:00
Vishnu Nair
fce5b2bece SurfaceView: Synchronize initial destframe change from BBQ
Fixes a case where the SurfaceView is stuck with a wrong
scale.

Destination frame scales the buffer to the SurfaceView
fixed size. Currently the initial destination frame is
applied when the first buffer is acquired by BBQ. The
transaction is sent via the BBQ apply token.

Meanwhile if the client updates the SurfaceView fixed
size, the SurfaceView will apply the transaction via
the SCC apply token.

This can cause destframe changes to be applied out of
order causing the app to be stuck with the wrong
scale.

Bug: 195443440
Test: atest BLASTBufferQueueTest
Test: repro steps from bug

Change-Id: Ibf53a0efdebb87291d081e48633c373a98d347b1
Merged-In: Ibf53a0efdebb87291d081e48633c373a98d347b1
2021-12-14 19:34:02 +00:00
joneckenrode
74390f89b2 Revised the OnDragListener and onDragEvent API documentation.
Test: Javadoc build
Signed-off-by: joneckenrode <joneckenrode@google.com>
Change-Id: I807143412b249787526c6e3f7e8a27cc7f77bf89
2021-12-14 19:00:22 +00:00
TreeHugger Robot
238f9d577d Merge "Fix an off-by-one bug in EditableInputConnection#endBatchEdit() return value" 2021-12-14 01:33:51 +00:00
John Reck
20d7333d6d Merge "Reduce SurfaceControl feature gap to NDK API" 2021-12-13 20:00:50 +00:00
Joanne Chung
3a6037d159 Merge "Fix translation animation flash for the same translation" into sc-v2-dev am: 1ff5a29afd am: 5c32e894cb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16432382

Change-Id: Ifb0b11a3afe6591d0651d4ea2949ed691b1bc756
2021-12-13 03:11:29 +00:00
Joanne Chung
5c32e894cb Merge "Fix translation animation flash for the same translation" into sc-v2-dev am: 1ff5a29afd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16432382

Change-Id: I6cb7a365fb9bfb6e719227d2292aa08a5609396b
2021-12-13 02:54:00 +00:00
Yohei Yukawa
beda2b7f76 Fix an off-by-one bug in EditableInputConnection#endBatchEdit() return value
This is a follow up CL to our previous CL [1], which had an off-by-one
bug when determining the return value of

   EditableInputConnection#endBatchEdit().

According to the API document of InputConnection#endBatchEdit(), the
following test should pass.

   EditText editText = new EditText(context);
   EditorInfo editorInfo = new EditorInfo();
   InputConnection editableInputConnection =
           editText.onCreateInputConnection(editorInfo);
   assertThat(editableInputConnection.beginBatchEdit()).isTrue();
   assertThat(editableInputConnection.beginBatchEdit()).isTrue();
   assertThat(editableInputConnection.endBatchEdit()).isTrue();
   assertThat(editableInputConnection.endBatchEdit()).isFalse(); // (*)
   assertThat(editableInputConnection.endBatchEdit()).isFalse();

However, the last assertion marked with (*) actually fails due to an
off-by-one bug.  This CL finally fixes it.

The risk of app compat breakages because of fixing this long standing
bug is supposed to be low, mainly because:

 * the system has not relied on this return value yet.
 * Widgets like WebView have correctly implemented this API.
 * IME has always received true no matter what the app returned, which
   is the same behavior as other async InputConnection APIs.

This CL adds several notes to InputConnection#endBatchEdit() document
to help developers correctly implement and use this API.

 [1]: I1ec5518fdc16fb0551fbce9d13f5d92eb4bc78c0
      c478c171e9

Fix: 209958658
Fix: 210165648
Test: atest -c CtsInputMethodTestCases:EditTextImeSupportTest
Change-Id: Ibc40072fa11a4d6e3c24b8d7860c914ccdbcbc8a
2021-12-10 16:38:49 -08:00
Christine Franks
c74e2e0ee7 Merge "Remote input interfaces, events, and injection" 2021-12-10 23:38:02 +00:00
Christine Franks
c4cf03b162 Remote input interfaces, events, and injection
Bug: 204081582
CTS-Coverage-Bug: 208247880
Test: atest FrameworksServicesTests:VirtualDeviceManagerServiceTest
and atest FrameworksCoreTests:android.hardware.input

Change-Id: Ic10e62b0d95d563aed59ed9bb8caba6d506176b7
2021-12-10 10:17:31 -08:00
Leon Scroggins
f96aa9e82b Merge changes from topics "GL_screen_decor", "VK_screen_decor"
* changes:
  Plumb support for rendering A8 in Vulkan
  Plumb through A8 for GL/EGL
  Add COLOR_MODE_A8/ColorMode::A8
  Treat AHARDWAREBUFFER_FORMAT_R8_UNORM as kAlpha_8_SkAlphaType
2021-12-10 13:49:39 +00:00
Joanne Chung
4e43e66a9b Merge "Fix NPE if no AutofillId when traversing the view tree." 2021-12-10 09:33:07 +00:00
Joanne Chung
a5d4f094e8 Fix translation animation flash for the same translation
The system received the same multiple translation responses in a very
short time. We use a isShowingTranslation flag to determine if the
duplicated responses to call onShowTranslation. However the
isShowingTransation flag is set in a post runnable, this may cause the
system  allow the duplicate responses can call onShowTranslation
because the isShowingTransaltion isn't set true yet.

Use multiple flags isShowingTranslation and a new isRunningAnimation
to check if the same translation response should skip to call
onShowTranslation.

Bug: 207457172
Test: manual
Test: atest CtsTranslationTestCases
Change-Id: I7003b7f49fc0a8ce2e909228bcb89acedee6d3d0
2021-12-10 05:00:00 +00:00
John Reck
7f55b13182 Reduce SurfaceControl feature gap to NDK API
Bug: 200697201
Test: atest android.view.cts.SurfaceControlTest

Change-Id: I1d0cff355714acb5668952b3d7f6fc0c15952523
2021-12-09 17:15:11 -05:00
Chavi Weingarten
157d6623d3 Merge "Fix some blast sync issues in VRI" 2021-12-09 18:29:39 +00:00
Leon Scroggins III
cbdbb66d8f Add COLOR_MODE_A8/ColorMode::A8
Currently unused. This will allow rending into A8 with HWUI

Bug: 193170859
Test: TODO
Change-Id: Ic1e1cb94dfa3dc08cbb174f0a38345d724570372
2021-12-09 12:12:26 -05:00
chaviw
10c60e45e8 Fix some blast sync issues in VRI
1. If a relayout requested blast sync but we canceled the draw and
schedule it for later, the next draw won't use blast sync. This change
makes sure we use blast sync on the next performTraversal

2. Remove mReportDrawToWm and always send transaction to WMS to apply.
This is because there could be multiple report draws in a row and we'd
unset the flag after the first and not send the other transactions to
WMS

Test: Screen rotation no flicker with rounded corners
Change-Id: I8bf3881dfcdd2e54f0ec78f9fb695c76385f4228
2021-12-09 09:52:14 -06:00
Joanne Chung
7ebd5f7c3b Fix NPE if no AutofillId when traversing the view tree.
Bug: 415172066
Test: atest CtsTranslationTestCases
Change-Id: Ic4d7fac7348199d4752c622036d6b57c186816e5
2021-12-09 14:12:59 +08:00
Jacky Kao
0ae6637d5f Adds Builder for CollectionItemInfo class
Eight constructor parameters is a lot for a public Java constructor.
So adding a Builder for this class to reduce the likelihood of
mistaking one int for another.

Bug: 207683571
Test: a11y CTS & unit tests
Change-Id: I9d779228ee4c21728451195541f629c08ae275c4
2021-12-09 12:57:05 +08:00