Commit Graph

15292 Commits

Author SHA1 Message Date
Siarhei Vishniakou
0c2a482edb Add dump of InputConsumer to ViewRootImpl
To further debug ANR issues, add dump of InputConsumer-related objects
to ViewRootImpl

Example dump:

      android.view.ViewRootImpl$WindowInputEventReceiver
       mInputChannel: 25697fd com.google.android.pixel.setupwizard/com.google.android.pixel.setupwizard.user.WelcomeActivity (client)
       mSeqMap: {}
       mReceiverPtr:
        mInputConsumer:
          mResampleTouch = true
          mChannel = 25697fd com.google.android.pixel.setupwizard/com.google.android.pixel.setupwizard.user.WelcomeActivity (client)
          mMsgDeferred: false
          Batches:
              <empty>
          mSeqChains:
              <empty>

        mBatchedInputEventPending: false
        mFinishQueue:
          <empty>

    Choreographer:
      mFrameScheduled=false
      mLastFrameTime=1625545 (8 ms ago)

Bug: 160561987
Test: adb shell dumpsys activity -v all | grep -i input -C 50
Test: adb shell dumpsys activity service SystemUIService | grep -i EventReceiver -C 20
Change-Id: I99807c264ced8eb939b90a30e2ff91775fbdec40
2020-08-21 14:37:04 -05:00
Mark Renouf
9b93699911 Merge "Fix missing null check in collectRootScrollCaptureTargets" 2020-08-20 12:26:38 +00:00
Mark Renouf
1252d0bc3c Fix missing null check in collectRootScrollCaptureTargets
If no window-level handlers have been added, the list is null
(lazily init).

Test: atest com.android.systemui.screenshot.ScrollCaptureTest

Change-Id: I39d4295cebb091fa89f65c5917ba08bc2396ed37
2020-08-20 00:55:29 +00:00
John Reck
432e984e34 Merge "Add missing @FloatRange" 2020-08-19 20:39:15 +00:00
John Reck
ac6fc83063 Add missing @FloatRange
Test: none
Fixes: 121220209
Change-Id: Ifcc090414cd885817dfc88d9c059a1a70c305fe1
2020-08-19 11:13:22 -07:00
Vishnu Nair
cfd825ef5c Merge "Rename InputWindowHandle hasFocus to focusable" 2020-08-19 15:34:01 +00:00
Tiger Huang
c9c73f0ef5 Merge "Refine system bar position restoring" 2020-08-19 00:49:55 +00:00
Tiger Huang
4632b888bf Merge "Update requested state after applying pending frames" into rvc-qpr-dev am: 943589cf45 am: dab8b9b114
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12371142

Change-Id: I623a75bb564ed77b92f22bf463bdf4ff5c41a4dc
2020-08-19 00:48:32 +00:00
Tiger Huang
dab8b9b114 Merge "Update requested state after applying pending frames" into rvc-qpr-dev am: 943589cf45
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12371142

Change-Id: Ia3b2ca6b9118da1c2af064033e67d98c6d2835df
2020-08-19 00:37:33 +00:00
Tiger Huang
943589cf45 Merge "Update requested state after applying pending frames" into rvc-qpr-dev 2020-08-19 00:25:22 +00:00
Vishnu Nair
4541a3234c Rename InputWindowHandle hasFocus to focusable
A window with hasFocus set to true, means the window can be focusable.
The current name is confusing when mutliple windows set the field to
true. Rename this to focusable and also remove canRecieveKeys field which
is not used.

Test: presubmit
Test: drag freeform windows

Bug: 151179149
Change-Id: I1b2354da0dc241d5e887e599e43f0426671289b8
2020-08-18 11:15:07 -07:00
Tiger Huang
a15c844335 Refine system bar position restoring
The previous logic restores the system bar as long as its insets source
is visible. There can be a timing issue that if the user swipes to show
transient bars while an immersive app just becomes the control target
but the hide-bar info haven't sent to WM yet, WM will re-show the bar
incorrectly.

This CL uses the requested visibility and the behavior to decide if we
should restore the postion and the visibility.

This CL also refines and caches the arguments of showTransient. In this
way, we don't have to create the array every time while invoking that
method.

Fix: 161247175
Test: atest InsetsPolicyTest
Change-Id: Idef314dfe6625399b88b3dacb4c74c7071453497
2020-08-18 20:23:59 +08:00
Treehugger Robot
8625074588 Merge "Update InputMethodInfo to comply with Android's inclusive language guidance" am: 2e1b52b1d1 am: 453023d999 am: cb5c7ad1fa am: bd9e396d1c am: d013c0ac14
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1401337

Change-Id: Ie12a0a5aa20362cef67622bd7a2d2348d4395129
2020-08-18 04:10:32 +00:00
Treehugger Robot
d013c0ac14 Merge "Update InputMethodInfo to comply with Android's inclusive language guidance" am: 2e1b52b1d1 am: 453023d999 am: cb5c7ad1fa am: bd9e396d1c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1401337

Change-Id: Ie40b2f4241e4ed952f95fe41590e93243999aff6
2020-08-18 03:51:02 +00:00
Treehugger Robot
bd9e396d1c Merge "Update InputMethodInfo to comply with Android's inclusive language guidance" am: 2e1b52b1d1 am: 453023d999 am: cb5c7ad1fa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1401337

Change-Id: Ia225a60079ace7062e7082be0e7f768dde5f908f
2020-08-18 03:38:49 +00:00
Treehugger Robot
cb5c7ad1fa Merge "Update InputMethodInfo to comply with Android's inclusive language guidance" am: 2e1b52b1d1 am: 453023d999
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1401337

Change-Id: If474261934e1e78e5144b80804e95818e73b8b0c
2020-08-18 03:26:28 +00:00
Govinda Wasserman
99249369b9 Adds new screenshot source logging for vendor gesture
This new source is for identifying when a screenshot request was
originated by an oem-specific gesture.

Test: N/A
BUG: 164235798
Change-Id: Iece70a2d8767e5873b30407df57b7428dfea7e26
2020-08-17 08:56:51 -04:00
Tarandeep Singh
2662fabd35 Update InputMethodInfo to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 162536543
Change-Id: Id5bf6719180fe6214ccffec6e9c4d031cd298638
Test: atest InputMethodInfoTest
2020-08-14 23:30:40 +00:00
Julia Reynolds
d3dc8e79cf Merge "Remove app ops indicators from notifications" into rvc-qpr-dev am: 2659836775
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12361488

Change-Id: I70c1dd2665b51c442484577f0077ad4bebc0577d
2020-08-14 17:43:43 +00:00
Julia Reynolds
2778b62f1d Remove app ops indicators from notifications
Test: atest
Bug: 163076432
Change-Id: I5b7514f765811ffd3b0aca63d0108591755974ab
Merged-In: I5b7514f765811ffd3b0aca63d0108591755974ab
2020-08-14 15:02:02 +00:00
Julia Reynolds
f9239b3afc Merge "Remove app ops indicators from notifications" 2020-08-14 13:17:42 +00:00
Julia Reynolds
3a72daad2b Remove app ops indicators from notifications
Test: atest
Bug: 163076432
Change-Id: I5b7514f765811ffd3b0aca63d0108591755974ab
2020-08-13 11:33:43 -04:00
Tiger Huang
1a53789bc8 Update requested state after applying pending frames
When there is an insets animation, we will stop updating insets source
frames until the animation is done. The previous logic didn't update the
frames within the requested state while the animation is done. And the
frames was relied by InsetsPolicy while playing transient bar animation.
If the frames don't match the display, the insets would be wrong, and
the animation wouldn't be played correctly.

Fix: 161134197
Test: atest InsetsControllerTest
Change-Id: Id8f3c1956fbfe3ad16f167ff76297dde6c634e81
2020-08-13 14:58:06 +00:00
Adrian Roos
f2cf13afef Merge changes I05b83c47,I5a840ec1 am: 49c52755d2 am: befa7e20f7 am: 9e07e38369 am: a9d806ec0b am: b0591f4068
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1398233

Change-Id: I6ba64f2253653c7c25ac7407fb0cfed4b3dee577
2020-08-12 18:55:42 +00:00
Adrian Roos
b0591f4068 Merge changes I05b83c47,I5a840ec1 am: 49c52755d2 am: befa7e20f7 am: 9e07e38369 am: a9d806ec0b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1398233

Change-Id: Idffc4452f8845ca937d22291010ee510b076c18c
2020-08-12 18:37:39 +00:00
Adrian Roos
a9d806ec0b Merge changes I05b83c47,I5a840ec1 am: 49c52755d2 am: befa7e20f7 am: 9e07e38369
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1398233

Change-Id: I2e4ded90bf752cf2b9460226c0bd5b97df38b907
2020-08-12 18:21:37 +00:00
Adrian Roos
9e07e38369 Merge changes I05b83c47,I5a840ec1 am: 49c52755d2 am: befa7e20f7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1398233

Change-Id: I15c7258ee3b45f7c9bf65e627140fe7fb3fccf95
2020-08-12 18:01:26 +00:00
Adrian Roos
38a97a4947 Introduce "Fallback InputConnection" term to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 162536543
Test: make droid
Change-Id: I05b83c478e7a8bc95784ad448ed09248d92767ad
2020-08-12 12:52:47 +02:00
Ryan Lin
ba91c6c33f Merge "Add WindowMagnificationAnimationController for animation" 2020-08-11 12:57:59 +00:00
Chavi Weingarten
2da90f7972 Merge "Remove rotation and use flag useIdentityTransform for screenshots." 2020-08-10 18:33:25 +00:00
TreeHugger Robot
97c841140e Merge "Add a lock to guard TCSession's destroy behavior." 2020-08-10 14:13:14 +00:00
ryanlwlin
b2671ade8e Add WindowMagnificationAnimationController for animation
WindowMagnificationAnimationController provides same
functionality but it runs the animation while
enabling/disabling.

This new patch also fixs NPE excetion that happens
when device is in rotation but mirrorWindow is invisible.

Bug: 161669184 163026794 163035371
Test: atest com.android.systemui.accessibility
atest WindowMagnificationGestureHandlerTest
manual Test: enable window magnification to see it
        2. close mirroe window and rotate the device

Change-Id: I4531f5c96ea4b91b287cc8c5ffc4c98fc9611dd5
2020-08-07 15:06:23 +08:00
Chavi Weingarten
d7569e699c Merge "Capture secure layers in SurfaceFreezer" 2020-08-06 23:52:20 +00:00
Tiger Huang
ade289c6fa Merge "Dispatch insets to client if mState is changed" into rvc-qpr-dev am: 046b604fd4 am: c8f8eefeab
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12239625

Change-Id: I3e5d697405b17e4b8183e979324bb3793a735aeb
2020-08-06 21:33:51 +00:00
Tiger Huang
c8f8eefeab Merge "Dispatch insets to client if mState is changed" into rvc-qpr-dev am: 046b604fd4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12239625

Change-Id: I836a29f8662ab19756d3e7401f2582c26b7fdd8e
2020-08-06 21:11:46 +00:00
Tiger Huang
046b604fd4 Merge "Dispatch insets to client if mState is changed" into rvc-qpr-dev 2020-08-06 20:58:40 +00:00
chaviw
ca2eb0182f Remove rotation and use flag useIdentityTransform for screenshots.
There's a lot of confusing logic where 90 and 270 rotation values need
to be flipped to ensure the screenshot is taken the correct orientation.
There's also confusion what useIdentityTransform means, especially if a
non 0 rotation value is sent.

The cases screenshot cares about is the following:
1. Take screenshot in current display orientation
2. Take screenshot with 0 rotation so the caller can handle rotating the
screenshot themselves.

With these two cases in mind, remove the rotation value passed in for
screenshots. If useIdentityTransform is true, it will rotate the
screenshot so it's in the 0 orientation. If useIdentityTransform is
false, it will use the current display rotation.

This simplifies the caller logic since they no longer have to find the
current display rotation to ensure the screenshot is taken in the
current rotation. The callers can just request the screenshot with
useIdentityTransform set to false.

Test: adb shell screencap
Test: Power + volume screenshot
Test: Screen rotation
Fixes: 135942984
Change-Id: I3435ee8b5dac05e910ec1e695f398c5dcdcff9e9
2020-08-06 11:30:59 -07:00
TreeHugger Robot
d40ac08a3f Merge "Revert "Add WindowMagnificationBridge for animation"" 2020-08-06 17:48:49 +00:00
Greg Kaiser
53ffbd5c68 Revert "Add WindowMagnificationBridge for animation"
This reverts commit 1e14e16ac8.

Reason for revert: Breaks fullscreen YouTube playback on wembley
Bug: 163035371
Test: Locally reverted, and now YouTube can play fullscreen on a wembley

Change-Id: I649d651893862b270cb1df14633490748a54bda1
2020-08-06 15:55:05 +00:00
Tiger Huang
b6478edb09 Dispatch insets to client if mState is changed
Previous logic in onStateChanged notifies insetsChanged based on the
change of mLastDispatchedState, which can make us dispatch redundant
insets changes to the app.

In this CL, we only notifies insetsChanged if mState is really changed
in onStateChanged -- we use the final mState (after updateState and
applyLocalVisibilityOverride) to compare with the one before changing.

Fix: 161924448
Test: atest InsetsControllerTest WindowInsetsControllerTests
Test: Swipe up to home while IME open and see if there is any jank
Change-Id: Ia536cdf76805caa56ca1b6eaf2b3db83b6ecd94e
2020-08-06 17:26:57 +08:00
Chavi Weingarten
9ebd43d84f Merge "Revert "Reparent bounds layer if surface was replaced."" into rvc-d1-dev am: 15e6f37a16 am: 1812833eb2 am: ef89319e01
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12308823

Change-Id: I654362e34619e282ac15aeb491005a20e4df5f9c
2020-08-06 02:16:06 +00:00
Ryan Lin
33ce820295 Merge "Add WindowMagnificationBridge for animation" 2020-08-06 02:15:44 +00:00
Chavi Weingarten
ef89319e01 Merge "Revert "Reparent bounds layer if surface was replaced."" into rvc-d1-dev am: 15e6f37a16 am: 1812833eb2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12308823

Change-Id: Ibe64a1ed3a0d03c4e78777268f551a07ca3537fe
2020-08-06 01:56:41 +00:00
Chavi Weingarten
464e51527f Merge "Revert "Reparent bounds layer if surface was replaced."" into rvc-d1-dev am: 15e6f37a16
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12308823

Change-Id: Iad5abb3a1498bbc45359a6e454aa446a0fc983d4
2020-08-06 01:41:08 +00:00
Chavi Weingarten
1812833eb2 Merge "Revert "Reparent bounds layer if surface was replaced."" into rvc-d1-dev am: 15e6f37a16
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12308823

Change-Id: I49889d6e90ed4d8ce33ca773eeeb3ab7e4a43924
2020-08-06 01:39:49 +00:00
Lais Andrade
8fc8732db1 Merge "Fix typo on View.verifyDrawable method javadoc" am: efd27a83f5 am: 8b8c8f1004 am: 655eb212ec am: 388881b89a am: 0e81d7ec8e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1386078

Change-Id: I3dc67195e436645fc62f875e8b9c3f03c565086b
2020-08-05 13:15:28 +00:00
Lais Andrade
0e81d7ec8e Merge "Fix typo on View.verifyDrawable method javadoc" am: efd27a83f5 am: 8b8c8f1004 am: 655eb212ec am: 388881b89a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1386078

Change-Id: Iad15300f86c480874afc71a291eb698a70c9fd52
2020-08-05 13:05:19 +00:00
Lais Andrade
655eb212ec Merge "Fix typo on View.verifyDrawable method javadoc" am: efd27a83f5 am: 8b8c8f1004
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1386078

Change-Id: Ie8720fc2f94420e5d01b03047aa1579c46f8f203
2020-08-05 12:21:32 +00:00
Lais Andrade
50ef151f8b Fix typo on View.verifyDrawable method javadoc
Fix: b/157335615
Test: N/A, only changing documentation
Change-Id: I30f869bdaac5fb6b87ea56a4416e619b46565113
2020-08-05 08:20:08 +00:00
Siarhei Vishniakou
736e4b0668 Merge "Unify dispatching timeout constants" 2020-08-04 22:56:50 +00:00