Commit Graph

18601 Commits

Author SHA1 Message Date
TreeHugger Robot
2c8a3b7cc3 Merge "Adds perfetto tracing to ScrollCaptureConnection" into tm-dev am: f9ccda5c78 am: c06cd36243 am: 381f39e885 am: 31d99309dd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18070157

Change-Id: I649367d1e2dabeec8ae0e50f7a4d9770174dcd0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 12:05:33 +00:00
TreeHugger Robot
b48f79c04e Merge "Fix colorSpace lose during screen rotation." into tm-dev am: 0be3f09073 am: 71420321e1 am: cf4713e17e am: 31465c1b15
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18092563

Change-Id: I6c77634e5665ff5b27f8d70a12294d330bbe0509
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 11:50:54 +00:00
Taran Singh
1cdcc0239e Merge "Fix InputConnection creation callback" into tm-dev am: d5bb81348c am: 38d073d25f am: 2881d67cbb am: 091047b253
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17896003

Change-Id: I6ca2729a26321d2d6473feead745a05405cb0746
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 11:11:58 +00:00
Automerger Merge Worker
5f72dd8c1e Merge "Merge "Allow rapid request/release of pointer capture" into tm-dev am: 5b22099c1c am: b2d8333ae1" into tm-d1-dev-plus-aosp am: ea3c474a38 am: 52ff99acd8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17523884

Change-Id: Ic6d6e38bd65fee799f2baaf4e9ef4f8d31876d6e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 10:05:27 +00:00
Leon Scroggins
a273d84252 Merge "Propagate HDR information to screenshot animation." into tm-dev am: 866f67dc94 am: 44f36e6a28 am: 9f486a0c60 am: 8ceef30c1e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17992944

Change-Id: I75ffbe16e09590ee7100e2b9bdecec92415f3d24
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 10:00:13 +00:00
Ming-Shin Lu
07402d4d84 Merge changes I96b17c78,If4b09f5b into tm-dev am: e6a860a747 am: a5128e6b60 am: 45a8a9d7c7 am: 23cd441ced
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17943634

Change-Id: Ib9b58cf72414b248f14fb41d5c6cc4ff9083b05d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 09:57:36 +00:00
Naomi Musgrave
beb0d6d03d Merge "Only return ROTATION_0 for WM#getPossibleMaximumWindowMetrics" into tm-dev am: 439a7fe9a0 am: 413d98e9ba am: 40816de2c7 am: fbcfc438c4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17942483

Change-Id: Ic4fe2ca2e39fc2f75eedf89b5eefb81f9ba6c59e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 09:52:22 +00:00
Justin Ghan
0ddf706dd0 Merge "Scribe: Find candidate view in stylus down event" 2022-04-30 05:09:13 +00:00
TreeHugger Robot
31d99309dd Merge "Adds perfetto tracing to ScrollCaptureConnection" into tm-dev am: f9ccda5c78 am: c06cd36243 am: 381f39e885
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18070157

Change-Id: Ic338fbb6468d2b91a2fa0f4dcdd90000fe84c189
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-30 02:01:35 +00:00
TreeHugger Robot
f9ccda5c78 Merge "Adds perfetto tracing to ScrollCaptureConnection" into tm-dev 2022-04-30 00:57:52 +00:00
TreeHugger Robot
31465c1b15 Merge "Fix colorSpace lose during screen rotation." into tm-dev am: 0be3f09073 am: 71420321e1 am: cf4713e17e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18092563

Change-Id: If9c95d8f71b3cad5797747b97f34efd756ca25c7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-30 00:03:52 +00:00
TreeHugger Robot
0be3f09073 Merge "Fix colorSpace lose during screen rotation." into tm-dev 2022-04-29 23:17:53 +00:00
Taran Singh
091047b253 Merge "Fix InputConnection creation callback" into tm-dev am: d5bb81348c am: 38d073d25f am: 2881d67cbb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17896003

Change-Id: I3c12bd90f4a399784a1b9c87507720046c58b56b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 21:44:00 +00:00
Automerger Merge Worker
52ff99acd8 Merge "Merge "Allow rapid request/release of pointer capture" into tm-dev am: 5b22099c1c am: b2d8333ae1" into tm-d1-dev-plus-aosp am: ea3c474a38
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17523884

Change-Id: Ifd5128b5740f2dc7c13ea3f236604cab26ab019f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 21:05:02 +00:00
Rachel Lee
182c9a81e4 Merge "Remove getLatestVsyncEventData in Choreographer." into tm-dev am: fa426b9d49 am: f6bd8f5b0b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17969373

Change-Id: I55fc368af90347d4c99d0541c789c63fd28eb0cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 21:01:02 +00:00
Leon Scroggins
8ceef30c1e Merge "Propagate HDR information to screenshot animation." into tm-dev am: 866f67dc94 am: 44f36e6a28 am: 9f486a0c60
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17992944

Change-Id: I2a4837e77758b5cbc9db1c8bc60d954ee03b9ef2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 20:46:54 +00:00
Ming-Shin Lu
23cd441ced Merge changes I96b17c78,If4b09f5b into tm-dev am: e6a860a747 am: a5128e6b60 am: 45a8a9d7c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17943634

Change-Id: I9eb2ecf92a61a706f2a7b369cc3855d59985bfd9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 20:45:15 +00:00
Naomi Musgrave
fbcfc438c4 Merge "Only return ROTATION_0 for WM#getPossibleMaximumWindowMetrics" into tm-dev am: 439a7fe9a0 am: 413d98e9ba am: 40816de2c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17942483

Change-Id: I9b10cb3b5b37a9fc51ef2b2abfcf72f11108295b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 20:42:06 +00:00
Sally Qi
195ff67523 Fix colorSpace lose during screen rotation.
- setColorSpace only supports Display_p3 and sRGB

Bug: 229735367
Test: test picture rotation and check log
Change-Id: If2d6ab965be28d35a3adf330e7050e16e40f9620
2022-04-29 13:19:37 -07:00
Mark Renouf
2088e50967 Adds perfetto tracing to ScrollCaptureConnection
Change-Id: I7d018fa7c4e4eb3261a75165713303756b271520
2022-04-29 16:11:27 -04:00
Josh Tsuji
24335f1e1c [conflict] Merge changes Iee97d469,Ica1b552a into tm-dev am: 50f19f212e am: b16ae20c70
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17892807

Change-Id: Idfdc818cc52b62e73a84dde091c25ea7834040fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 19:23:57 +00:00
Rachel Lee
a916b4d115 Merge "Remove getLatestVsyncEventData in Choreographer." into tm-dev am: fa426b9d49 am: 1b3b5cb738 am: 6789acb7dd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17969373

Change-Id: I3f01b40b6c5634e61775cb9de6500892e1aba9b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 19:12:21 +00:00
Taran Singh
d5bb81348c Merge "Fix InputConnection creation callback" into tm-dev 2022-04-29 18:58:36 +00:00
Shawn Lin
e90c3ce2af Merge "Fixed cts failure of WindowInsetsControllerTests" into tm-dev am: 8f1320d8a9 am: f567f0cd44
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17951708

Change-Id: I4fc08c04f15b9c6f05822a85407fafbdaba5a95e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:51:11 +00:00
Josh Tsuji
1f4c9256a6 Merge changes Iee97d469,Ica1b552a into tm-dev am: 50f19f212e am: b646165870 am: aec5cef87a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17892807

Change-Id: I0a9f664c4066bed6e8f72927b4a21923283d2e12
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:42:16 +00:00
TreeHugger Robot
5b22099c1c Merge "Allow rapid request/release of pointer capture" into tm-dev 2022-04-29 16:58:10 +00:00
Justin Ghan
d49d0fe228 Merge "Move setHandwritingArea call to View#sizeChanged" 2022-04-29 15:42:08 +00:00
Leon Scroggins
866f67dc94 Merge "Propagate HDR information to screenshot animation." into tm-dev 2022-04-29 15:16:21 +00:00
Ming-Shin Lu
e6a860a747 Merge changes I96b17c78,If4b09f5b into tm-dev
* changes:
  Make DialogThemedActivity main window is not focusable
  Make IME visiblity stable without unexpected hidden when setControl
2022-04-29 14:19:28 +00:00
Naomi Musgrave
86e40f73a0 Only return ROTATION_0 for WM#getPossibleMaximumWindowMetrics
Do not return every rotation for window metrics.

Bug: 228288352
Test: atest WmTests:PossibleDisplayInfoMapperTests
Change-Id: I756b079bfce09cf618500f3d07547ec94ac60694
2022-04-29 09:02:20 +00:00
Naomi Musgrave
266d64967a Merge "Revised API docs of overloaded getGlobalVisibleRect methods and getLocalVisibleRect method. Fixed punctuation of "x and y coordinates" in getLocationOnScreen, getLocationInWindow, and getLocationInSurface." 2022-04-29 08:46:27 +00:00
Haoyu Zhang
abbb1d9969 Merge "Scribe: Introduce setHandwritingBoundsOffset API" 2022-04-28 22:04:41 +00:00
Rachel Lee
fa426b9d49 Merge "Remove getLatestVsyncEventData in Choreographer." into tm-dev 2022-04-28 21:29:54 +00:00
Josh Tsuji
50f19f212e Merge changes Iee97d469,Ica1b552a into tm-dev
* changes:
  fadeInSurfaceBehind() when the remote animation starts.
  Clear task snapshot when we showSurfaceBehindKeyguard.
2022-04-28 17:52:10 +00:00
Justin Ghan
08a94de0de Scribe: Find candidate view in stylus down event
In the initial implementation, HandwritingInitiator looks for a
handwriting candidate view when a stylus motion has exceeded the touch
slop distance.

This updates the implementation to look for the handwriting candidate
view in the stylus down event. The overall resulting behaviour is
unchanged.

This is needed for an upcoming change to stop dispatching MotionEvents
to the view tree if they are for a stylus movement on a handwriting
candidate view, in order to prevent scrolling before handwriting is
initiated.

Bug: 228210945
Test: atest CtsInputMethodTestCases:android.view.inputmethod.cts.StylusHandwritingTest
Change-Id: I395c2ec4b16a3fd3cb56308da872ec959e93943e
2022-04-28 10:09:49 -07:00
Taran Singh
fc6d5e91b7 Fix InputConnection creation callback
As noted in the linked bug, in certain scenarios IC established callback
is not always called. As a fix, we make sure we don't return early when
MSG_BIND callback is received from IME

Fix: 228105257
Bug: 217971553

Test: atest StylusHandwritingTest#testHandwritingEndToEnd

Change-Id: I780327003f7145c4f9b9df4dc5243227d7e67d92
2022-04-28 15:26:00 +00:00
joneckenrode
742fc6a9e2 Revised API docs of overloaded getGlobalVisibleRect methods and getLocalVisibleRect method. Fixed punctuation of "x and y coordinates" in getLocationOnScreen, getLocationInWindow, and getLocationInSurface.
Test: Built API docs
Bug: 172571756
Signed-off-by: joneckenrode <joneckenrode@google.com>
Change-Id: I45f21521350accba4227f6d328e53c52ffcce80a
(cherry picked from commit 37f8a92e4d)
2022-04-28 14:21:34 +00:00
Shawn Lin
e1a5210f61 Merge "Fixed cts failure of WindowInsetsControllerTests" into tm-dev am: 8f1320d8a9 am: 3e4f0b787b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17951708

Change-Id: Ib8fdfc04a2ba9b337f48872f9d400a513f6fe5cc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-28 13:51:08 +00:00
Shawn Lin
8f1320d8a9 Merge "Fixed cts failure of WindowInsetsControllerTests" into tm-dev 2022-04-28 13:11:10 +00:00
shawnlin
6db481e079 Fixed cts failure of WindowInsetsControllerTests
If the device is a tablet, the navigation bar will be taskbar, and it
will draw fake rounded corners above itself when it's shown and
unstashed. When apps request to hide taskbar from such state, it will
cause an extra window insets change from server side.

Move the calculation of rounded corner inset to client side so that we
can make the window insets change come only once.

Bug: 229825307
Test: atest WindowInsetsControllerTests ActivityRecordTests
Change-Id: I081142facbe0fe676b89c8883fa690ba5ae13d79
2022-04-28 17:25:49 +08:00
Haoyu Zhang
8b4aacab1e Scribe: Introduce setHandwritingBoundsOffset API
Introduced View#setHandwritingBoundsOffset and xml attributes to
enlarge the view's stylus handwriting bounds. With this API, it's
possible to make handwriting bounds larger than the view's visible
bounds, and makes handwriting easier to trigger.

Bug: 211764956
Test: atest android.view.stylus.HandwritingInitiatorTest
Test: atest android.view.cts.HandwritingBoundsOffsetTest
Change-Id: I7a3749f78df82eee08ad29761cd52d7452114873
2022-04-27 17:11:04 -07:00
TreeHugger Robot
a90dda92e8 Merge "Revised API docs of overloaded getGlobalVisibleRect methods and getLocalVisibleRect method. Fixed punctuation of "x and y coordinates" in getLocationOnScreen, getLocationInWindow, and getLocationInSurface." into tm-dev am: 1fc50caf0e am: 46c9ce6866
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17936356

Change-Id: Ib143932b4e3891c50143694033b4a069bcaa6fad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-28 00:08:07 +00:00
TreeHugger Robot
1fc50caf0e Merge "Revised API docs of overloaded getGlobalVisibleRect methods and getLocalVisibleRect method. Fixed punctuation of "x and y coordinates" in getLocationOnScreen, getLocationInWindow, and getLocationInSurface." into tm-dev 2022-04-27 23:25:00 +00:00
Alec Mouri
3d03ed3626 Propagate HDR information to screenshot animation.
The screenshot animation must know whether the screenshot contains HDR
layers so that it can correctly inform SurfaceFlinger whether its layer
can be dimmed.

This is due to the interplay of the following:
1. Devices are now able to configure DisplayManager to send
   significantly lower SDR white points relative to display brightness
   to SurfaceFlinger when HDR is simultaneously on-screen.
2. AIDL composer is required to support per-layer dimming, so that SDR
   layers may be dimmed to preserve the relative luminance of HDR video
   content.
3. Because the screenshot does not contain an HDR transfer function,
   SurfaceFlinger will treat the layer as SDR, and attempt to dim it.
4. Screen rotations containing HDR layers must request SurfaceFlinger to
   present the rotated screenshot at display brightness, to override
   (3) above. Otherwise, HDR content captured in the screenshot will
   suddenly dim during the rotation animation.
5. Also due to (3), DisplayManager no longer thinks that there is HDR
   content on screen, so a prior patch treated layers that requested to
   to be dimmed to be reported as HDR
   (I1d1b0dcaf230300ca34b84ea407d0817feb2c664). Otherwise, the display
   brightness will decrease during the animation and ramp back up
   afterwards.
6. But because of (5), screenshots that only contained SDR layers were
   incorrectly treated as HDR, which caused the display brightness to
   ramp up during the animation.

This patch fixes (6) by allowing for the screenshot animation to learn
whether the screenshot contains HDR layers, and request dimming
capabilities accordingly.

Bug: 230068567
Test: screen rotation
Change-Id: I6bbb2433f976e368bfe2c04e084e110cfb551c15
2022-04-27 21:43:48 +00:00
Josh Tsuji
927a236a80 Clear task snapshot when we showSurfaceBehindKeyguard.
To prevent extra blocking calls to ActivityManager,
rather than calling
ActivityManagerWrapper#invalidateHomeTaskSnapshot,
add a transit flag to have ActivityTaskManager
handle this as part of the goingAway call.

Bug: 229890190
Test: atest SystemUITests
Change-Id: Ica1b552a332d0c946d6008965c1a2881b646e365
2022-04-27 16:12:17 -04:00
Ming-Shin Lu
28b9201e18 Make IME visiblity stable without unexpected hidden when setControl
2 reasons that may unexpectly calls hideMySoftInput from IME:

1) When requesting show IME on the activity, before receiving the
   control from server side, the null control might received from the
   relayoutWindow, if initially in consumer side didn't get the control
   yet, we should not hide the IME immediately to broke the on-going
   show request.

2) When ImeInsetsSourceConsumer#onWindowFocusGained, if we don't set
   mIsRequestedVisibleAwaitingControl as true if it has requested IME
   visible but not yet get control, it also could possble mistakenly
   hide IME when ImeInsetsSourceConsumer#setControl.

As the result, we should prevent both case with

1) add returned value for InsetsSourceConsumer#setControl to see whether
   the control has changed from the server, if the control didn't
   change like receiving a duplicated null control callback,
   then in ImeInsetsConsumer didn't have to do anything.
2) set mIsRequestedVisibleAwaitingControl as true when receiving
   onWindowFocusGained and the host is waiting the control to make
   IME visibility reliable.

Bug: 227142436
Bug: 204524304
Test: atest FlickerTests:LaunchAppShowImeAndDialogThemeAppTest
        --rerun-until-failure 10

Change-Id: If4b09f5b52bc96cf3429aaa912961f3ac4e326f2
2022-04-27 15:59:35 +00:00
Rachel Lee
ab7a63680a Remove getLatestVsyncEventData in Choreographer.
Manually "revert" ag/17188552 due to jank caused by
getLatestVsyncEventData as new blocking binder call on the main thread.

Test: manual open and close app to/from home.
Test: perfetto trace
Test: atest ChoreographerTest
Bug: 229987086
Change-Id: Idcab776f3f249cc9fd609a6438e29a50a1edaaf2
2022-04-26 16:26:44 -07:00
Justin Ghan
dd482fe91e Move setHandwritingArea call to View#sizeChanged
This enables handwriting to be started before the input connection is created for custom text editor views which are not EditTexts.

Fix: 218907674
Test: atest CtsInputMethodTestCases:android.view.inputmethod.cts.StylusHandwritingTest
Change-Id: I1ff3b0ffd609e1ec9f1efc477d00fee998ac9966
2022-04-26 13:22:01 -07:00
Tiger Huang
4468551159 Merge "Don't set animation pending when gaining fake control" into tm-dev am: c15af2cb87 am: 7da223138b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17822750

Change-Id: Id05e430c42bddb952307e8f6ba0833fdfacdfcce
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-26 13:35:57 +00:00
Tiger Huang
894754f73e Merge "Don't set animation pending when gaining fake control" into tm-dev am: c15af2cb87 am: 6cc2d9b670
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17822750

Change-Id: Idd822dc0aa63275d70314c2b6aa9f1a6499a137e
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-26 13:35:37 +00:00