Commit Graph

16860 Commits

Author SHA1 Message Date
TreeHugger Robot
138f801a71 Merge "ViewRootImpl: Correct opaque flag usage" into sc-dev am: a731c9f3f9 am: 0c7c150922 am: 1b0b9a026d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14724164

Change-Id: Ifc7214df8aae02f7a367a8bb3be21e667476a314
2021-06-02 10:40:08 +00:00
TreeHugger Robot
1b0b9a026d Merge "ViewRootImpl: Correct opaque flag usage" into sc-dev am: a731c9f3f9 am: 0c7c150922
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14724164

Change-Id: Ic8df8d27c2d0d17a16b05cfc94bc080f8c773076
2021-06-02 10:23:31 +00:00
TreeHugger Robot
a731c9f3f9 Merge "ViewRootImpl: Correct opaque flag usage" into sc-dev 2021-06-02 09:28:33 +00:00
Evan Rosky
01465be4be Merge "Inform SurfaceFlinger about displays which receive input" into sc-v2-dev am: d4fcf3ac04 am: d616fbe94a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14669172

Change-Id: I4570fe1b786731f26b715883a46b3bd6f1931f2b
2021-06-01 21:41:11 +00:00
Evan Rosky
d616fbe94a Merge "Inform SurfaceFlinger about displays which receive input" into sc-v2-dev am: d4fcf3ac04
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14669172

Change-Id: Ie21a5a6dfb9ff66ee9eb349f166d1fcccd87dcbe
2021-06-01 21:40:00 +00:00
Winson Chung
196af8e47c Merge "Always copy provided gesture exclusion rects" into sc-dev am: 69660aaf86 am: 98e54ebdba am: 55f6179386
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14729093

Change-Id: I6b6aae12cdf43f79208de515e287573ec403c777
2021-06-01 21:00:10 +00:00
Winson Chung
55f6179386 Merge "Always copy provided gesture exclusion rects" into sc-dev am: 69660aaf86 am: 98e54ebdba
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14729093

Change-Id: Iab73d072ec2251a939fca5f3b8f4926a90ed1d6f
2021-06-01 20:41:27 +00:00
Evan Rosky
3c85ed5080 Inform SurfaceFlinger about displays which receive input
Right now, multiple display devices can share a layerstack.
This means that when constructing InputWindowInfo, its
impossible to know which display transform matches the
display viewport that inputflinger dispatches against. To
remedy this, have displaymanager inform surfaceflinger
which displays "receiveInput" using the same logic that
controls which display viewport it sends to inputflinger.

Bug: 179274888
Test: atest SetDisplayStateLockedTest
Change-Id: I85f1d0ac6fcf9c37a523eb80ed02afeff555c93d
2021-06-01 11:58:34 -07:00
Winson Chung
69660aaf86 Merge "Always copy provided gesture exclusion rects" into sc-dev 2021-06-01 18:49:41 +00:00
Tiger Huang
ff64ee23a2 Merge "Update the surface position of each control in insets animation" into sc-dev am: 178d98e23b am: 6b8f441dd5 am: 0af82e9a73
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14776096

Change-Id: Ifefe6b7e5a7e29f1805bd7bab79363039ef2bca5
2021-05-31 15:09:56 +00:00
Tiger Huang
0af82e9a73 Merge "Update the surface position of each control in insets animation" into sc-dev am: 178d98e23b am: 6b8f441dd5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14776096

Change-Id: I19d55269ee858ef024217f94fbd6f9e63d0a2e61
2021-05-31 14:48:04 +00:00
Tiger Huang
0959847e8e Merge "Update the surface position of each control in insets animation" into sc-dev am: 178d98e23b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14776096

Change-Id: Ia684edc90014e6037fda9ebe77e7325e18f3981d
2021-05-31 14:36:26 +00:00
Tiger Huang
fa6f73429d Update the surface position of each control in insets animation
If the surface position is changed during the insets animation,
the surface position of the controls in the animation should be updated.
Otherwise, the cached position in the animation will overwrite the
newly-updated leash position.

Fix: 177925500
Test: Steps in the bug.
Test: 1. Open Window Insets Tests -> Window Insets Controller.
      2. Click on the [IME INVISIBLE] button.
      3. Click on the [STATUS BARS VISIBLE] button during IME animation.
      See if the position of IME (Gborad) is correct.
Change-Id: I7441426a41019996651220e86ca90dd416ef9498
2021-05-31 18:08:31 +08:00
Hongming Jin
37efce9ef6 Merge "Add features to allow filtering logging based on interfaces." into sc-v2-dev am: d6cc13a99c am: 99613fbfa6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14703957

Change-Id: I0505a2eb382950fbb06a0cc0a2ad998b71be8b9c
2021-05-28 16:45:18 +00:00
Hongming Jin
99613fbfa6 Merge "Add features to allow filtering logging based on interfaces." into sc-v2-dev am: d6cc13a99c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14703957

Change-Id: Ie4ee53a44fd26de19867252d81c222e1654f9db1
2021-05-28 16:11:36 +00:00
Ahaan Ugale
d6f1da05ce Merge changes from topic "tr-anim" into sc-dev am: 27008c1123 am: 565c15a8d6 am: 2af2705bed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14661091

Change-Id: I396b6f349e72410c10890e1814866805bc239933
2021-05-28 03:30:19 +00:00
Ahaan Ugale
ad0cc558fb Translate: Ignore duplicate translations. am: 02fe90bb42 am: 1f26c6eac8 am: 86163fc07c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14661090

Change-Id: I244fb274cd1e6f9ce9ea4dd5170d4543dd1300eb
2021-05-28 03:30:15 +00:00
TreeHugger Robot
f9f5d9b1b8 Merge "TranslationResponseValue: Override equals() behaviour for Extras." into sc-dev am: e5f65a20f1 am: 7ce63c3ad7 am: 754708957f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14722064

Change-Id: I35a2a9f32eda0230a0a5e18d661cd854ac4f5d49
2021-05-28 03:21:19 +00:00
Ahaan Ugale
2af2705bed Merge changes from topic "tr-anim" into sc-dev am: 27008c1123 am: 565c15a8d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14661091

Change-Id: Ibcfc48257be24c2c7e7ea287a01c5a3bae3ced19
2021-05-28 03:16:52 +00:00
Ahaan Ugale
86163fc07c Translate: Ignore duplicate translations. am: 02fe90bb42 am: 1f26c6eac8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14661090

Change-Id: Ie9ec698d0e7d1df4421dffa783bc83b0465a5cc1
2021-05-28 03:16:50 +00:00
TreeHugger Robot
754708957f Merge "TranslationResponseValue: Override equals() behaviour for Extras." into sc-dev am: e5f65a20f1 am: 7ce63c3ad7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14722064

Change-Id: Ic20af1c125d94f83bb2f61dc1c1e98a0321972b7
2021-05-28 03:08:08 +00:00
Ahaan Ugale
1e8894e42b Merge "Force to notify ContentCapture event even view is not laid out" into sc-dev am: 75d63c116c am: 9c8598f451 am: d423928e99
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14683430

Change-Id: I64a00a1c359127ec455ee1e1573d068bad5d374b
2021-05-28 03:00:21 +00:00
Ahaan Ugale
d423928e99 Merge "Force to notify ContentCapture event even view is not laid out" into sc-dev am: 75d63c116c am: 9c8598f451
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14683430

Change-Id: Ied5fe2684e8997d9fa65f6e273704f4213846876
2021-05-28 02:50:03 +00:00
Ahaan Ugale
7993e317bf Merge changes from topic "tr-anim" into sc-dev am: 27008c1123
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14661091

Change-Id: I09652536d90edf3c5f378159ccd89db6bca28909
2021-05-28 02:11:10 +00:00
TreeHugger Robot
6ba0a39b7b Merge "TranslationResponseValue: Override equals() behaviour for Extras." into sc-dev am: e5f65a20f1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14722064

Change-Id: I5ca80ff409ebaa5ba00c2c7e2b2a0bf6007fe1ea
2021-05-27 22:31:05 +00:00
Hongming Jin
d6cc13a99c Merge "Add features to allow filtering logging based on interfaces." into sc-v2-dev 2021-05-27 19:34:09 +00:00
Ahaan Ugale
df75689d4d Translate: Text alpha animation on toggling translated state.
Apply a simple text alpha animation when toggling between original and
translated text. The text is fully faded out, then swapped to the new
text, then the fading is reversed.

Quick toggles are handled by ending the previous animation (which resets
the alpha value) when starting a new one. If the toggle is extremely
fast (<250ms for the currently defined animation duration), the text
stays in it's original state instead of swapping back-and-forth. This is
arguably not ideal, but anyway not worth the complexity for fixing.

There is an unhandled edge case where if the color is changed by the app
during the animation, the app's change would get overridden. It should
be rare and doesn't seem very important to fix.

Bug: 178651829
Test: atest CtsTranslationTestCases
Test: manual - across several apps, while scrolling, concurrently
 interacting with the app, concurrently closing the app, selecting text
 during the animation (with animation speed slowed down to see the
 effect).
Change-Id: I08a26de2253bb345f01186a6748b2d0ff6c2a419
2021-05-27 09:34:18 -07:00
Ahaan Ugale
02fe90bb42 Translate: Ignore duplicate translations.
This can happen if UiTranslationManager#startTranslation is called more
than once for the same view. If the same TranslationResponse is
returned, it can simply be ignored.

This is preferable to ignoring duplicate ViewTranslationRequests, since
the Response is already cached. The TranslationService can cache
translations, so duplicate requests isn't an issue.

Ideally, the platform intelligence shouldn't issue multiple requests for
the same view.

Bug: 144292180
Test: atest CtsTranslationTestCases
Change-Id: I0bba4a19284a61a9c7a5b79c71b4f42ddffe4e32
2021-05-27 09:33:49 -07:00
Ahaan Ugale
4df6d70e4c TranslationResponseValue: Override equals() behaviour for Extras.
Bundle doesn't override equals(). In TranslationResponseValue, the
Extras is used as a simple value type, so contents can be compared.

Bundle.kindofEquals probably works here, but this change just makes it
work for empty bundles for now, to fix a bug in animation.

Bug: 144292180
Test: atest CtsTranslationTestCases
Change-Id: I68daac8cafceb1aa446ee89ba1405595b22e6213
2021-05-27 09:31:58 -07:00
Ahaan Ugale
39631823d8 Merge "Force to notify ContentCapture event even view is not laid out" into sc-dev am: 75d63c116c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14683430

Change-Id: I2f7a064416c1f82de756084cc87758f2de77432c
2021-05-27 00:51:19 +00:00
Ahaan Ugale
75d63c116c Merge "Force to notify ContentCapture event even view is not laid out" into sc-dev 2021-05-27 00:35:19 +00:00
Hongming Jin
a0f9d36647 Add features to allow filtering logging based
on interfaces.

Bug: 157601519
Test: adb shell cmd accessibility start-trace -t IAccessibilityServiceConnection IAccessibilityServiceClient IAccessibilityManager
      adb shell cmd accessibility stop-trace
Change-Id: Iab5ec5ae3d77c893a646cf1ae106ff5fa50d9281
2021-05-26 13:36:55 -07:00
Winson Chung
36f8ff7f85 Always copy provided gesture exclusion rects
- Disallow callers from concurrently modifying the exclusion rects
  list after it's set by making a copy.

Bug: 166594759
Test: atest android.view.cts.SystemGestureExclusionRectsTest
Change-Id: I80183cf85d16ac669320cfda9ec9deed9e348e33
2021-05-26 16:57:49 +00:00
TYM Tsai
1d0ad76872 Force to notify ContentCapture event even view is not laid out
Some recycled views cached its layout and a relayout is unnecessary.
In this case,  system still needs to notify content capture the view
appeared.

Bug: 177687849
Test: atest CtsContentCaptureServiceTestCases
Test: atest ContentCapturePerfTests
Change-Id: I480436c4fc3508b9eed485421a1cc778d55d5dde
2021-05-27 00:52:50 +08:00
Joanne Chung
b7ac7c50ec Merge "Added documentation for TResponseValue bundle on how to use and example structure." into sc-dev am: ba76d446ee am: c9a1329a73 am: 767b79af8a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14669189

Change-Id: I77c2ce7f6d16a1e396752c5b26199ae95a2998d0
2021-05-26 07:02:19 +00:00
Joanne Chung
c9a1329a73 Merge "Added documentation for TResponseValue bundle on how to use and example structure." into sc-dev am: ba76d446ee
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14669189

Change-Id: I3f405fa834ce18a1de9dda3e5f957cd884216268
2021-05-26 06:33:49 +00:00
Joanne Chung
ba76d446ee Merge "Added documentation for TResponseValue bundle on how to use and example structure." into sc-dev 2021-05-26 06:18:49 +00:00
Ahaan Ugale
ec95ec054f Merge "Manual overwrite @removed for genereated builder apis." into sc-dev am: c449e23d4d am: ab5c58b56d am: 598fe13232
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14722632

Change-Id: I4bd202929763009ebf656bacc5323b1aedb74870
2021-05-26 02:02:57 +00:00
Ahaan Ugale
ab5c58b56d Merge "Manual overwrite @removed for genereated builder apis." into sc-dev am: c449e23d4d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14722632

Change-Id: I3e83169d1915cd98ce88572619ee0b9d23b8f11c
2021-05-26 01:08:11 +00:00
Robert Carr
776dd9e556 ViewRootImpl: Correct opaque flag usage
In performTraversals, "params" may be null. In this case we were
not passing params to the WM indicating no changes (an obscure
artifact of the protocol).  In R the WM would simply ignore this
however our updateOpacity logic in S is treating null as "translucent"
it seems easiest to just pass mWindowAttributes directly avoiding
the null case. While the opacity was broken, it seems an animation
was added to StartingSurfaceDrawer which depends on having a translucent
window. We also update this code to request a transparent pixel format
as would have been required in the R API.

Bug: 186555833
Test: Existing tests pass
Change-Id: I180bf1796bbb4b7049ae9811f674f31014c2a400
2021-05-25 17:14:26 -07:00
Adam He
a8ad787594 Manual overwrite @removed for genereated builder apis.
Fixes: 186475868
Test: atest CtsTranslationTestCases
Change-Id: Ie56e57ac0afb2a3b1c99eb489d38d557fd1e2124
2021-05-25 13:07:12 -07:00
Tiger Huang
d797a827ac Merge "Flush the animation if it is canceled" into sc-dev am: ea428b55e7 am: 91b4b7bd05 am: a15a08955e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14640272

Change-Id: I31496632cf97d2c156a6939a2c9bf34006dd764c
2021-05-25 18:03:22 +00:00
Tiger Huang
91b4b7bd05 Merge "Flush the animation if it is canceled" into sc-dev am: ea428b55e7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14640272

Change-Id: I06940f0be00a298776f05fe22be17e4cbf8bc201
2021-05-25 17:26:39 +00:00
Tiger Huang
ea428b55e7 Merge "Flush the animation if it is canceled" into sc-dev 2021-05-25 17:12:16 +00:00
Vadim Caen
b42455b969 Merge changes from topic "splashscreen-surface" into sc-dev am: fc1efcb428 am: be2ac213fe am: edf6bbea58
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14186656

Change-Id: If12039cd518709d54df21eeabdaedf2dc30bbbcf
2021-05-25 15:58:41 +00:00
Vadim Caen
be2ac213fe Merge changes from topic "splashscreen-surface" into sc-dev am: fc1efcb428
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14186656

Change-Id: Ie0e17006e404de22c20cce84cf7a43fdf0eb85e7
2021-05-25 15:24:45 +00:00
Vadim Caen
fc1efcb428 Merge changes from topic "splashscreen-surface" into sc-dev
* changes:
  Do not reparent the SC when package is already realeased
  Display Splashscreen AVD in a SurfaceView
2021-05-25 15:24:08 +00:00
Tiger Huang
1ce223481a Flush the animation if it is canceled
The issue was that: if navigation bar is requested to show while a
controller is playing an animation of hiding both status bar and
navigation bar, the animation will be canceled and will stay in an
intermediate state, and then, another controller will play an animation
of showing navigation bar. At the end, status bar will stay visible but
it should be invisible.

This CL fast-forwards the insets animation to the end state if it is
canceled.

Fix: 185459811
Test: Steps in the bug.
Change-Id: Id6ae321b6c153ed1d7155afd6111b193ac9c045c
2021-05-25 13:39:49 +00:00
Galia Peycheva
a41c076d91 Merge "Add TunnelModeStateListener in java+jni" into sc-dev am: ee1219ac1d am: cb824953ce am: 809f09f491
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14340805

Change-Id: Id60914cf0bc4a8df8e5f4e55f3292b05488fed09
2021-05-25 13:25:06 +00:00
Galia Peycheva
cb824953ce Merge "Add TunnelModeStateListener in java+jni" into sc-dev am: ee1219ac1d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14340805

Change-Id: Ie5b40d5be1fea10aafbffaf3c377ac25d8d2b20c
2021-05-25 12:08:32 +00:00