Commit Graph

17148 Commits

Author SHA1 Message Date
Shawn Lin
8e3584edd0 Merge "Update the sdk doc of Default & ShortEdge cutout mode" am: bd8fb4581e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1989886

Change-Id: If933e5839e4e4005d0a424c29a57e74f66279771
2022-02-22 07:01:47 +00:00
shawnlin
78cf7c826d Update the sdk doc of Default & ShortEdge cutout mode
We now allow OEMs to extend the window to cutout area in below cutout
mode, only if the cutout overlaps at most 16dp with the app windows.
 - LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFUALT
 - LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES

Bug: 218603390
Test: make
Change-Id: I8c83cde40f321de2a301b5865445ff765c824d43
Merged-In: I8c83cde40f321de2a301b5865445ff765c824d43
2022-02-22 06:34:31 +00:00
Joanne Chung
114d0c7773 Merge "Update team OWNERS file." am: e96070ac89
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1982066

Change-Id: I50a93d3e190ba2a4988e0777be2c5e571f2a2760
2022-02-16 04:42:57 +00:00
Joanne Chung
e96070ac89 Merge "Update team OWNERS file." 2022-02-16 02:03:49 +00:00
Xin Li
a6a261b1be Merge "Merge sc-v2-dev-plus-aosp-without-vendor@8084891" into stage-aosp-master 2022-02-14 17:30:12 +00:00
Joanne Chung
b00f0d6c95 Update team OWNERS file.
Bug: 177641730
Test: n/a
Change-Id: If4ecc7326dc229d8807e1497c5e3e2ef0637680f
2022-02-14 14:51:12 +08:00
Ahaan Ugale
8301da241b OWNERS for ViewStructure
Change-Id: I135bfa1a5e15d3b9658028b4e430c847280d7654
Test: n/a
Fix: 218966221
2022-02-11 05:49:36 +00:00
Mariia Sandrikova
a274e1a7d4 DO NOT MERGE Revert "[2/n] Camera Compat UI: Add interfaces for client-server..." am: 7617679a61
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16571392

Change-Id: I0adf2bf45c5f7d7349e9c0f180aea9d10f70645d
2022-01-13 22:55:51 +00:00
Mariia Sandrikova
7617679a61 DO NOT MERGE Revert "[2/n] Camera Compat UI: Add interfaces for client-server..."
Revert submission 16468379

Reason for revert: Feature development is moving to T.

Reverted Changes:
Id9b9a8930:[3/n] Camera Compat UI: Add a camera compat contro...
Id6be4a954:Enable a camera app compat control on Large screen...
I083aa6718:[2/n] Camera Compat UI: Add interfaces for client-...

Bug: 206602997

Change-Id: I9ad876043fd61f708a8f468fffd1ef371bfa0866
2022-01-13 15:21:38 +00:00
Vishnu Nair
7e71240c2a Merge "SurfaceView: Synchronize visibility changes with VRI frame" into sc-v2-dev am: f3a504e3d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16577758

Change-Id: Id6057e44ba0a23a85827675b96ce3ea196345867
2022-01-11 17:05:11 +00:00
Vishnu Nair
f3a504e3d6 Merge "SurfaceView: Synchronize visibility changes with VRI frame" into sc-v2-dev 2022-01-11 16:51:28 +00:00
Vishnu Nair
7fbc3903aa Merge "SurfaceView: Fix unsafe transaction accesses" into sc-v2-dev am: 830bf8bd34
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16548823

Change-Id: I83169eaa386d4a4620b838832852bec4b14d7489
2022-01-10 23:58:32 +00:00
Vishnu Nair
830bf8bd34 Merge "SurfaceView: Fix unsafe transaction accesses" into sc-v2-dev 2022-01-10 23:43:41 +00:00
Arthur Hung
5a301480c8 Merge "Update OWNERS for input relevant files" am: faf6041b60 am: a3204a2631 am: c724dc5050
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1938444

Change-Id: Iad762e2d826420da5da0b5d184864a0ba627330b
2022-01-10 13:27:39 +00:00
Arthur Hung
faf6041b60 Merge "Update OWNERS for input relevant files" 2022-01-10 12:30:33 +00:00
TreeHugger Robot
cfa5c420e3 Merge "Fix flaky test WindowInputTestsi#testTrustedOverlapWindow" into sc-v2-dev am: 651343388f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16544958

Change-Id: I4001fabda75da2bfc2da66eb7692cc021078e549
2022-01-07 15:02:02 +00:00
Arthur Hung
6c1c224661 Update OWNERS for input relevant files
Bug: 189241600
Change-Id: I3f6ab682578d379d576682de632374882f66d761
2022-01-07 14:24:22 +00:00
Bill Yi
6042a19c72 Merge sc-qpr1 to aosp-master - DO NOT MERGE
Merged-In: I90ca5ccbf686a975f479c2488ff34f82af12946a
Merged-In: I128f5ed6c1bad350ea449bba5da21123de3ea31b
Change-Id: Ib18c8042f735dceeee5e6ab9f1c963cf630913a6
2022-01-06 18:38:32 -08:00
Arthur Hung
7ed2d03fdb Fix flaky test WindowInputTestsi#testTrustedOverlapWindow
When disabling batching input, we should post the action to consume
batched events to prevent it would be handled before current event.

Bug: 189241600
Test: atest WindowInputTests --rerun-until-failure
Change-Id: I87aaa2574a27368f88df1aba3f2eb769a8e8f36b
(cherry picked from commit a0ef47223c)
2022-01-07 02:22:28 +00:00
Vishnu Nair
1b068c44b3 SurfaceView: Synchronize visibility changes with VRI frame
There is a flicker in wallpaper picker due to a recent change where
SurfaceView creation changes were synchronized with VRI frame. This
breaks wallpaper picker because wallpaper picker doesn't actually
draw into the SV surface, instead they attach a surface package.

The current implementation meant the SurfacePackage would be visible
before it was scaled correctly.

This fix applies the visibility changes along with the scaling changes.

Test: steps in b/211945947
Fixes: 211945947
Change-Id: I4e5107ac2caf634429e1bec3201fdcaa8f5f92bc
(cherry picked from commit 230677e7b3)
2022-01-06 23:08:32 +00:00
Vishnu Nair
c10beab1e2 SurfaceView: Fix unsafe transaction accesses
PositionUpdateListener callbacks maybe replaced before they
are applied. We need to merge with the existing transaction
so we don't drop any destination frame updates. But accessing
the previous callback transaction is unsafe since we might fight
with render thread.

Fix this by locking access to the transaction object.

This also fixes a potential SurfaceControl access issue where
we may release the SurfaceControl that is used by render thread
in the UI thread.

Fixes: 211090247
Test: atest SurfaceViewSyncTest
Change-Id: I28ed344754601169c6cefd919668e76ef5a467c3
(cherry picked from commit 894fa8809a)
2021-12-28 17:53:44 +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
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
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
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
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
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
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
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
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
Chris Li
2f7bdbc104 Merge "Do not use prefixOrderIndex for animation layer" into sc-v2-dev am: af715328d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16379907

Change-Id: I0d219b0d1eda1a258d08c60fe603eaccba0470cc
2021-12-04 05:20:18 +00:00
Treehugger Robot
0b897fd62f Merge "ANDROID: Fix EventLog string class problem in ViewRootImpl#enqueueInputEvent()" am: 808e0a5e7a am: d3b9a7f1b2 am: bb269bc6e4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1909899

Change-Id: I718e10a27a823cd46c6c6751acca5bbe7b701290
2021-12-03 22:42:10 +00:00
Treehugger Robot
bb269bc6e4 Merge "ANDROID: Fix EventLog string class problem in ViewRootImpl#enqueueInputEvent()" am: 808e0a5e7a am: d3b9a7f1b2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1909899

Change-Id: I112425b087412ffd10ba7ab8bd38a0477c5d1388
2021-12-03 22:27:51 +00:00
Treehugger Robot
d3b9a7f1b2 Merge "ANDROID: Fix EventLog string class problem in ViewRootImpl#enqueueInputEvent()" am: 808e0a5e7a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1909899

Change-Id: I1bc36b94f27ec90d484df3a468c1984d1ece8277
2021-12-03 22:21:12 +00:00
Chris Li
91010a79de Do not use prefixOrderIndex for animation layer
We may set a z-order different from the prefix order, for example
TaskDisplayArea#adjustRootTaskLayer. As a result, we should no longer
set animation leash layer based on the prefix order.

Fix: 208793409
Test: manually test launching activity over another
Change-Id: If8d545ca7a9ac42162262ad3a8f95b4ac9f65585
2021-12-03 20:50:00 +08:00
chenchaoli
beb8f3f4b3 ANDROID: Fix EventLog string class problem in ViewRootImpl#enqueueInputEvent()
EventLog function can handle string,integer class and long class. (in android_util_EventLog.cpp)
    If menu title string are used bold tag(like <b>test</b>), it'll be android.text.SpannedString.
    therefore any android activity using tag menu string(like <b></b>) can be crashed by IllegalArgumentException.

    Bug: 208862322

Change-Id: I2432b0cd28c8f5fcb07cdf3e29560bf6b6c0f7b6
Signed-off-by: chenchaoli <chenchaoli@xiaomi.com>
2021-12-03 05:52:33 +00:00
Adrian Roos
712c609507 Merge "ViewRootImpl: peek IME source instead of creating it" into sc-v2-dev am: 3f7eca5695
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16358839

Change-Id: Ib6990fc82d4d68b1d6a650249a9735ce79970515
2021-12-01 15:25:12 +00:00
Adrian Roos
3f7eca5695 Merge "ViewRootImpl: peek IME source instead of creating it" into sc-v2-dev 2021-12-01 15:09:27 +00:00
Naomi Musgrave
4987d076b0 [DO NOT MERGE] Revert "Temporary flag for Launcher to debug their usage of sandboxed display APIs" am: 608a679783
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16273554

Change-Id: I44d5d6796ebefb4f6920a8f98296f2d52f865869
2021-12-01 14:15:40 +00:00
Naomi Musgrave
a9a8c94b5f [DO NOT MERGE] Revert "[1/n] Introduce API for all available max WindowMetrics" am: 49381ee746
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16273544

Change-Id: Ide372fdcfdfd7f2d25e74e18c4ab5f182a61373d
2021-12-01 10:06:21 +00:00
Naomi Musgrave
608a679783 [DO NOT MERGE] Revert "Temporary flag for Launcher to debug their usage of sandboxed display APIs"
This reverts commit 253696fea3.

Reason for revert: remove from sc-v2
Bug: 206649452

Change-Id: I013f08dfba89eb89e7713dddc1f4f894e335df62
2021-12-01 09:57:48 +00:00