Commit Graph

17108 Commits

Author SHA1 Message Date
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
Naomi Musgrave
c5bdc9bcb7 Merge "[DO NOT MERGE] Revert "[1/n] Introduce API for all available max WindowMetrics"" into sc-v2-dev 2021-12-01 09:57:24 +00:00
TreeHugger Robot
b46414f27b Merge "Update Contenet Capture API discription" into sc-v2-dev am: 8528d07450
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16345097

Change-Id: I80a03e94f49cb7c3b8c86081929e9f99ac275a70
2021-12-01 03:14:15 +00:00
TYM Tsai
7d888cbc2f Update Contenet Capture API discription
There are missing API description at getServiceComponentName in
ContentCaptureManager. Some errors may occur and an exception may be
thrown. So update the javadoc to remind user to handle.

Fixes: 203368373
Test: make
Change-Id: I979c81c74cda4e50627dc0c83ae7c33b333b9255
2021-12-01 09:12:14 +08:00
Naomi Musgrave
49381ee746 [DO NOT MERGE] Revert "[1/n] Introduce API for all available max WindowMetrics"
This reverts commit f70f8ecefc.

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

Change-Id: If5f38307dd9ce38316c3b918d692f8b921f40832
2021-11-30 17:19:46 +00:00
Naomi Musgrave
98f8b55975 [DO NOT MERGE] Revert "[2/n] Display stack provides DisplayInfos" am: 4dfa01a86e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16273545

Change-Id: Ide06de4f8466790e47fd7e99b29cb55ce70b2add
2021-11-30 16:54:01 +00:00
Adrian Roos
bf551fe111 ViewRootImpl: peek IME source instead of creating it
Fixes an issue where getting the IME source to check its
visibility unintentionally lazily created it.

Fixes: 208200189
Test: manual
Change-Id: Ib36082b393215fc59e299dea30d3315f3748ca02
2021-11-30 15:06:06 +01:00
Naomi Musgrave
4dfa01a86e [DO NOT MERGE] Revert "[2/n] Display stack provides DisplayInfos"
This reverts commit aca03a172c.

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

Change-Id: I1ce3c567eb1203edc7f22c568eeb15e85c643134
2021-11-30 13:32:08 +00:00
Naomi Musgrave
4d4c7bfafa [DO NOT MERGE] Revert "PossibleMaximumWindowMetrics reports physical display insets for each" am: f1012018bf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16273546

Change-Id: I37f3161473af8dcbc0ef98ae2c8c160a36a30f45
2021-11-29 21:45:42 +00:00
Naomi Musgrave
dce6b41a0f Merge "[DO NOT MERGE] Revert "PossibleMaximumWindowMetrics reports physical display insets for each"" into sc-v2-dev 2021-11-29 21:15:46 +00:00
Rob Carr
a3b02ba67e Merge "Rework blast sync callback model" into sc-v2-dev am: f7fc07271f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15685699

Change-Id: I61c6fb2a966a334b9c3dfa1b0e151b7667d8ea4d
2021-11-29 18:55:56 +00:00
Rob Carr
f7fc07271f Merge "Rework blast sync callback model" into sc-v2-dev 2021-11-29 18:43:00 +00:00
Tiger Huang
44a025aa73 Merge "Prevent resize animation from changing the requested visibilities" into sc-v2-dev am: 2aba350b3f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16303384

Change-Id: Ie4ebc27b9cfbaa9b9c887b09ec6be1b62ff9e791
2021-11-29 15:32:30 +00:00
Tiger Huang
2aba350b3f Merge "Prevent resize animation from changing the requested visibilities" into sc-v2-dev 2021-11-29 15:17:38 +00:00
Naomi Musgrave
f1012018bf [DO NOT MERGE] Revert "PossibleMaximumWindowMetrics reports physical display insets for each"
This reverts commit a77d7425a4.

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

Change-Id: I461e6cec8ff2a14a57cf019861da2babd82d0a2a
2021-11-29 14:10:05 +00:00
Ming-Shin Lu
b0404606ed Merge "Revert hide logic in ImeInsetsSourceConsumer#setControl" into sc-v2-dev am: cf9560a43b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16334306

Change-Id: I9b0dd9d77181794e93e3d5eb4d8e9c606b27d7ca
2021-11-25 02:36:07 +00:00
chaviw
e97e296c81 Rework blast sync callback model
The previous code waited for a frame complete callback from hwui before
notifying WMS that a draw had occurred. However, frame complete callback
was not guaranteed to get called since it only invokes a callback if a
draw actually occured. VRI really needs a signal that RT has completed,
since it just needs to know that a draw was possible so it can notify
WMS that the RT completed its pass.

Instead, rename frameCompleteCallback to frameCommitCallback since that
API is exposed to a public API when a frame was actually drawn.
Create a new callback, frameCompleteCallback, that is invoked when the
draw has completed, regardless if a frame was actually drawn.

When the frameCompleteCallback is invoked, VRI can check to see if a new
frame actually drew. VRI can call into BBQ to see if the frame acquired
matches the frame that was attempted to draw. If so, VRI can wait on a
transaction callback. If not, it can allow VRI to continue. In either case,
it will notify WMS that the draw has finished.

Test: Split over and over
Bug: 195262673
Bug: 193634619
Change-Id: I24dd19ab2746be3fc33e597761abf8c5249f8b5b
Merged-In: I24dd19ab2746be3fc33e597761abf8c5249f8b5b
2021-11-24 23:38:34 +00:00
Ming-Shin Lu
6ba7432173 Revert hide logic in ImeInsetsSourceConsumer#setControl
CL[1] using isRequestedVisibleAwaitingControl() in
ImeInsetsSourceconsumer#setControl to hide IME surface when it returned
false without waiting control or requesting visible to deal with the
unexpecting hide IME cases during the testing.

However, when calling IMM#toggleSoftInput to reqest showing keyboard
on the dialog implicitly that will set requrested visible on both the
caller window and the dialog window, since toggleSoftInput didn't
explicit set the target window but just using the caller window as
requester implicitly.

It causes a regression that can't hide the IME surface when dismissing
the dialog to back to the caller window that the IME insets source
control is null but isRequestedVisibleAwaitingControl still returned
true because isRequestedVisible has been set true for the
toggerSoftInput caller window.

Revert logic in setControl to use mIsRequestedVisibleAwaitingControl
in case the IME surface won't be removed when backing to the implicit
caller window of toggleSoftInput.

[1]: I3071af14bf78e23f9526d6a9c138ab6ae2e0e339

Bug: 207092186
Bug: 204524304

Test: manual
Test: atest CtsInputMethodTestCases
Test: atest WindowInsetsAnimationControllerTests
Change-Id: Ic5265a6c3f2eba77d43832d23309998bf3cb1671
2021-11-24 12:12:13 +00:00
Tony Huang
acb5bc569f Merge "Fix pip surface under divider" into sc-v2-dev am: c06aeea5fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16284008

Change-Id: I2986beba24124675a57cce3c8205b0af1c51f350
2021-11-24 03:34:51 +00:00
Tony Huang
c06aeea5fd Merge "Fix pip surface under divider" into sc-v2-dev 2021-11-24 03:09:59 +00:00
Vishnu Nair
be8227dbe2 Merge "WM: Use task bounds for modal window touchable region" into sc-v2-dev am: d57f990567
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16080856

Change-Id: I3feeb9fc9bb3d96a5ef402e4bbfc37c009a5191a
2021-11-23 22:43:53 +00:00
Vishnu Nair
d57f990567 Merge "WM: Use task bounds for modal window touchable region" into sc-v2-dev 2021-11-23 22:27:10 +00:00
Tony Huang
141bac2a08 Fix pip surface under divider
Make sure always on top tasks layer is above split divider layer.

Fix: 194359996
Test: manual
Test: pass exising tests
Test: atest ZOrderingTests
Change-Id: I211a3e1a92f86b0c802d2a9a259026ee2fad0383
2021-11-23 15:08:48 +08:00
Jon Eckenrode
75954281b3 Merge "Reconciled description of WindowManager with description of Context#createDisplayContext()." am: 92a4b54de5 am: 98951a99f4 am: abce82bc5d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1882528

Change-Id: Ib93e924bc133945c119e1bdac7c6ecb643b80a7e
2021-11-22 17:07:17 +00:00
Jon Eckenrode
abce82bc5d Merge "Reconciled description of WindowManager with description of Context#createDisplayContext()." am: 92a4b54de5 am: 98951a99f4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1882528

Change-Id: Icb9a08416599e1dcad31e146a2b8f82bb1ef8281
2021-11-22 16:50:58 +00:00
Jon Eckenrode
98951a99f4 Merge "Reconciled description of WindowManager with description of Context#createDisplayContext()." am: 92a4b54de5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1882528

Change-Id: I894941a064dc61c68722036081f0617c47804c83
2021-11-22 16:38:54 +00:00
Jon Eckenrode
92a4b54de5 Merge "Reconciled description of WindowManager with description of Context#createDisplayContext()." 2021-11-22 16:21:19 +00:00
Charles Chen
cb89941f83 [RESTRICT AUTOMERGE] Associate SystemUiContext with DisplayContent am: 082403816a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16259164

Change-Id: I5f4fa53bdd66b01d491a7c1ac6dbac1e8ce2bc9e
2021-11-22 06:42:43 +00:00
Tiger Huang
65ba861856 Prevent resize animation from changing the requested visibilities
The insets resize animation is used to produce the callbacks of the
animation progress to the app. It shouldn't change the state of the
insets controller.

Fix: 205082601
Test: 1. Open a sticky-immersive app on a device which has taskbar.
      2. Make sure taskbar is minimized on apps.
      3. Swipe from bottom twice to go to home screen.
      4. Open the same app again and see if task bar is hidden.
Merged-In: I5d9213d7b3e32eccbf3a51335654f5f53899e6ae
Change-Id: I5d9213d7b3e32eccbf3a51335654f5f53899e6ae
(cherry picked from commit cb11735c85)
2021-11-19 09:18:21 +00:00
Xin Li
10d9972786 Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I13199bc39e9445929195f3d15579cbffe94e92b0
Change-Id: I35fa3c6c2abf679c51033f1395a08d511ed8739f
2021-11-18 17:00:37 +00:00
Charles Chen
082403816a [RESTRICT AUTOMERGE] Associate SystemUiContext with DisplayContent
Before this CL, SystemUiContexts were fixed to the Display metrics
when the SystemUiContexts were created. It is the same mechanism
as DisplayContext but applies to SystemUiContexts unexpectedly.
This CL makes SystemUiContexts associate with DisplayContent with
the corresponding display ID. In this way, SystemUiContext would
receive updates when there is a Display property change.

Bug: 194262507
Bug: 191064581
Bug: 205859784
Test: atest InputMethodMenuControllerTest WindowContextControllerTest
Test: atest NexusLauncherTests

Change-Id: I64a1614f32d097785915f6105b1813a929e0fe32
2021-11-18 22:44:59 +08:00
Chavi Weingarten
2d20900b33 Merge "Immediately apply transaction when hw rendering is disabled" into sc-v2-dev am: 6ee187a370
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16274131

Change-Id: I147e5ccc971c5e8a7005cbe7ed3e5b324f400f05
2021-11-16 20:57:49 +00:00
chaviw
ad9c0d7a55 Immediately apply transaction when hw rendering is disabled
When hw rendering is disabled, we can't merge the transaction with the
next frame because the frame drawing callback won't be invoked. Instead,
just apply the transaction immediately

Test: HW Rendering app can remove SV
Fixes: 205924676
Change-Id: Ia6adb6dbad0238c4d815c72efc9b73bf4ea9c84a
2021-11-16 10:54:34 -06:00
Wei Sheng Shih
9fe9e19d8c Merge "Only register listeners if setView was success." into sc-qpr1-dev am: f16f863023
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16091135

Change-Id: I74a7c0dc68c26310bb8dcbda1418fa5a1af5c7b5
2021-11-15 01:38:21 +00:00
wilsonshih
d69deffd35 Only register listeners if setView was success.
Found a memory leak on ViewRootImpl. If the view wasn't been set
to the VRI successfully, there would keep the registed listeners to the
AccessibilityManager and DisplayManager forever because there didn't
need to deatch anything from window.
Another reasonable way is to register all listeners after setView
success.

Bug: 200843755
Test: manual, hard code to force addWindow fail and monitor no more
ViewRootImpl object leaked to AccessibilityManager and DisplayManager.

Change-Id: I3c9cc52d0ca4595c74c1dc3c51d286d9e6e3897f
Merged-In: I3c9cc52d0ca4595c74c1dc3c51d286d9e6e3897f
2021-11-12 03:14:07 +00:00
Treehugger Robot
6a6c56372c Merge "Add direct keys to launch applications." am: d76da0b633 am: 94a9a94b5e am: ffb112900d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1825196

Change-Id: I4f96cc47466cb0fc533353a4876fd1626511f62b
2021-11-11 20:58:58 +00:00
Treehugger Robot
ffb112900d Merge "Add direct keys to launch applications." am: d76da0b633 am: 94a9a94b5e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1825196

Change-Id: I91694ad76b6e6319503a7e7ac62121933e4bdfda
2021-11-11 20:53:56 +00:00
Treehugger Robot
d76da0b633 Merge "Add direct keys to launch applications." 2021-11-11 20:15:37 +00:00
Vishnu Nair
7f84221a10 Merge "WM: Handle primary display orientation when calculating the transform hint" am: 5fb9f63795 am: b83ee72e64
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1887653

Change-Id: I4a99911c7dbe8f69e35dd107e0d15b09f657bec0
2021-11-11 19:13:36 +00:00
Kyeongkab.Nam
11e61ab1fd Add direct keys to launch applications.
Many TV remotes have direct keys to launch the specific
application such as Netflix. KEYCODE_APP_X are
intended to be used for such a purpose and to be handled
by GlobalKeyManager.
Categorized like below.
 - KEYCODE_VIDEO_APP_X
 - KEYCODE_FEATURED_APP_X
 - KEYCODE_DEMO_APP_X

Prevent KEYCODE_APP_X from being sent to the apps.

Bug: 182532772
Test: atest KeyEventInterceptTest
Change-Id: I13c469c92da97014be5c76c230806331f0602b54
Merged-In: I13c469c92da97014be5c76c230806331f0602b54
2021-11-11 18:11:29 +00:00