Commit Graph

14972 Commits

Author SHA1 Message Date
Tiger Huang
ce21ca5c09 Merge "Let animations of insets controller can be disabled" into rvc-dev am: 299734b637 am: 3f6f662d51 am: 115e3a75a9 am: c31434f630
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11570106

Change-Id: I1f2e81dc03074ed424f8546d423cb49f19982e02
2020-06-16 15:29:08 +00:00
Charles Chen
8f6b6dffe7 Merge "Trust System UI owned display to receive keys" into rvc-dev am: 94deecfda2 am: d09b0f10bf am: 8fccd6e144 am: a7050e9667
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11570100

Change-Id: I6fcea62dffe51d3cbc522beb8e63e90ab27fb6d1
2020-06-16 14:56:54 +00:00
Tiger Huang
115e3a75a9 Merge "Let animations of insets controller can be disabled" into rvc-dev am: 299734b637 am: 3f6f662d51
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11570106

Change-Id: I9c5d977f49cb2f54a0bb9f1fcb8b100718e041c0
2020-06-16 14:56:03 +00:00
Charles Chen
a7050e9667 Merge "Trust System UI owned display to receive keys" into rvc-dev am: 94deecfda2 am: d09b0f10bf am: 8fccd6e144
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11570100

Change-Id: I75db01ccbe3e051b0fe21522efe771387632e31f
2020-06-16 14:37:56 +00:00
Tiger Huang
299734b637 Merge "Let animations of insets controller can be disabled" into rvc-dev 2020-06-16 14:31:41 +00:00
Charles Chen
94fe22f674 Merge "Trust System UI owned display to receive keys" into rvc-dev am: 94deecfda2 am: d09b0f10bf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11570100

Change-Id: Iac08bb390ee1a5d6bbfc02afdb57e980cdad7597
2020-06-16 14:29:09 +00:00
Charles Chen
94deecfda2 Merge "Trust System UI owned display to receive keys" into rvc-dev 2020-06-16 13:56:55 +00:00
Tiger Huang
6dae2090a1 Merge "Disable user animations on insets whose visible frame is empty" into rvc-dev am: ae9ce9716d am: 07d77fce08 am: ad8e892660 am: 38cc421fdd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11754098

Change-Id: I0851d1c548670e0e8eec4b0ee0e82d295a5cd9d7
2020-06-16 10:02:25 +00:00
Tiger Huang
ad8e892660 Merge "Disable user animations on insets whose visible frame is empty" into rvc-dev am: ae9ce9716d am: 07d77fce08
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11754098

Change-Id: I73e27dead5774a4cf9ce4618ec8e5fdbea833416
2020-06-16 09:38:08 +00:00
Tiger Huang
ae9ce9716d Merge "Disable user animations on insets whose visible frame is empty" into rvc-dev 2020-06-16 09:26:33 +00:00
TreeHugger Robot
c68df8b2e6 Merge "Add event log for view_enqueue_input_event." 2020-06-16 06:04:42 +00:00
Chris Ye
a33291e6e2 Add event log for view_enqueue_input_event.
Log out the input events to help debugging unresponsive UI issues.

Examples:
06-15 19:00:53.725  2272  2272 I view_enqueue_input_event: [Motion - Cancel,NavigationBar0]
06-16 02:28:35.318  3650  3650 I view_enqueue_input_event: [Key - Cancel,com.google.android.apps.nexuslauncher/com.google.android.apps.nexuslauncher.NexusLauncherActivity]

Bug: 154660150
Test: Manual test of swiping screen and watch event log.

Change-Id: I08c6be21ec01d9da2c67e2b59c15ba780de227be
2020-06-15 19:26:38 -07:00
Charles Chen
b28fb721f5 Trust System UI owned display to receive keys
A11y service cannot get focus of bubbles because it's not a
System owned display. This patch makes System UI owned display
a trusted display. Moreover, this patch refactors the logic to
identify a trusted display by introducing FLAG_TRUSTED and
removes the trusted display check along with supportsSystemDecorations()
because the check has been included in supportsSystemDecorations().

fixes: 155823002
Bug: 152416787
Test: atest DisplayContentTests
Test: atest WindowFocusTests
Test: atest TaskDisplayAreaTests
Test: atest MultiDisplaySystemDecorationTests
Test: atest DisplayTest
Change-Id: Ie684c6488904e5aa8cae166a455c6d55455e5f55
2020-06-16 02:10:21 +08:00
Tiger Huang
f23211979e Let animations of insets controller can be disabled
In some cases, System UI needs to hide navigation bar without any
animation, i.e. transitioning to AOD. This CL creates a method in
insets controller to disable/enable animations.

Fix: 150729581
Test: Enable AOD, and go to AOD from home screen by pressing power key.
Test: Enter/leave bouncer while screen is on.
Change-Id: I3fb7be898b9e615c661d07eca97c9ffcb6bbf8c3
2020-06-15 19:36:37 +08:00
Tiger Huang
3b81a13ec1 Merge "Let position of system bars can be restored by swipe" into rvc-dev am: ac4e36b948 am: 5078e7a8c1 am: 2121d62ccd am: c30d4a180c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11612964

Change-Id: I5aeadac674b84e7aee61c4d8765ec37c265dcdf6
2020-06-15 09:58:17 +00:00
Tiger Huang
2121d62ccd Merge "Let position of system bars can be restored by swipe" into rvc-dev am: ac4e36b948 am: 5078e7a8c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11612964

Change-Id: I73e23ea1a5052d4f0afb02f58fae4bf3a91825e5
2020-06-15 09:34:02 +00:00
Tiger Huang
ac4e36b948 Merge "Let position of system bars can be restored by swipe" into rvc-dev 2020-06-15 08:54:46 +00:00
Tiger Huang
0b9450bab9 Disable user animations on insets whose visible frame is empty
Floating IME or fullscreen IME won't cause insets (except the area
overlapped with navigation bar). It doesn't make much sense to let
apps move the IME at these cases.

Fix: 157777145
Test: atest InsetsSourceConsumerTest
Change-Id: Ibdf5454843c880d7e726a66a8f1107ca511e5025
2020-06-14 19:14:26 +08:00
Tony Huang
f5988173b4 Merge "Only add divider when it need to show" into rvc-dev am: a73d6ecb84 am: dbe759768c am: ed4937c342 am: 6bcf2f4762
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11612936

Change-Id: Ie7fe1337675aadfa8b147463a411d9fc62c42c0c
2020-06-12 04:07:39 +00:00
Tony Huang
dbe759768c Merge "Only add divider when it need to show" into rvc-dev am: a73d6ecb84
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11612936

Change-Id: I2274b246c949846a48d622090c17be3d0baed4b3
2020-06-12 03:24:57 +00:00
Tony Huang
a73d6ecb84 Merge "Only add divider when it need to show" into rvc-dev 2020-06-12 03:04:26 +00:00
Automerger Merge Worker
5226518e3a Merge "Merge "Fix content capture session id collision bug" into rvc-dev am: dd9c140ef5 am: 3618b46f2a am: a8122e5da2" into rvc-qpr-dev-plus-aosp am: 81659831dd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11829309

Change-Id: I4e62f93b804817ea3cfe45faa0fff7b6c20ec2c9
2020-06-12 00:53:50 +00:00
TreeHugger Robot
a9195622c2 Merge "Fix content capture session id collision bug" into rvc-dev am: dd9c140ef5 am: 3618b46f2a am: a8122e5da2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11829309

Change-Id: Id4db3cd84529a22c5212622889f2d599d25d0a6c
2020-06-12 00:42:02 +00:00
TreeHugger Robot
8b29418964 Merge "Fix content capture session id collision bug" into rvc-dev am: dd9c140ef5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11829309

Change-Id: Ibeaab73767ebb7f7bf0c35f5716c65c0c4b91de5
2020-06-12 00:24:13 +00:00
TreeHugger Robot
dd9c140ef5 Merge "Fix content capture session id collision bug" into rvc-dev 2020-06-12 00:14:51 +00:00
Feng Cao
945f31cc12 Fix content capture session id collision bug
* The content capture session id should be globally unique
* Before this change, the id is genrated from a static random
  number generator created with new Random(). It appears that
  it all has the same seed value, so the sequence it generates
  is identical across processes
* Ideally the session id should be generated from a center
  place to ensure uniqueness (e.g. system server), or be a UUID
  which is more unlikely to conflict. We will explore that as
  a longer term solution in S
* For now the less invasive solution is to use SecureRandom,
  which produces non-deterministic output
* Other approaches tried:
  1) new Random(android.os.Process.myPid()). This doesn't work
     as the pid value is all the same at static loading time
  2) offset the generated number by pid. This will work but the
     ids are not so random
  3) make Random a non-static variable. This will work but it
     creates a new object for every class

Test: manual
Bug: 158714891

Change-Id: I158f45680a961b32f3b01dc4eabb45e7215cdeec
2020-06-11 15:51:09 -07:00
Automerger Merge Worker
bf63febda9 Merge "Merge "Release SurfaceView surface if viewrootimpl surface is not valid" into rvc-dev am: 8089c3867e am: 428bd1f07c am: 7b293577d5" into rvc-qpr-dev-plus-aosp am: 948be3207e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11829307

Change-Id: I5d60175ae492770cc8e8def1954d2aa81f65706c
2020-06-11 19:25:06 +00:00
TreeHugger Robot
a479be9fab Merge "Release SurfaceView surface if viewrootimpl surface is not valid" into rvc-dev am: 8089c3867e am: 428bd1f07c am: 7b293577d5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11829307

Change-Id: I0cd28eeff32a1f47643e46b8fbc9b0914fee1001
2020-06-11 19:13:11 +00:00
TreeHugger Robot
cb2b174838 Merge "Release SurfaceView surface if viewrootimpl surface is not valid" into rvc-dev am: 8089c3867e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11829307

Change-Id: I4b61eb8994f5f75fe0f38c54c874d90d2396f0ae
2020-06-11 18:45:28 +00:00
TreeHugger Robot
8089c3867e Merge "Release SurfaceView surface if viewrootimpl surface is not valid" into rvc-dev 2020-06-11 18:43:39 +00:00
Tiger Huang
017d51dccd Let position of system bars can be restored by swipe
In the new insets world, apps can move system bars while keeping them
visible, which can make the user difficult to access the bars. This CL
lets the user can restore the position of system bars by swipe.

This CL also removes some unnecessary logic and refactors some methods.

Fix: 152194798
Test: Manual test with NewInsetsMainActivity
Change-Id: I81c8a41ca88a403d291186d61ec597c6bc5d3d84
2020-06-11 21:57:47 +08:00
Jorim Jaggi
c2f9d1f9c7 Merge "Exclude non-observable insets change" into rvc-dev am: 1f6b99d5fa am: 6255421565 am: 6741fd7439 am: 703f0b2e5c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11592755

Change-Id: Ibf66b140d5ca333b1bc2aab3de712f2ed101d42d
2020-06-11 13:16:45 +00:00
Jorim Jaggi
703f0b2e5c Merge "Exclude non-observable insets change" into rvc-dev am: 1f6b99d5fa am: 6255421565 am: 6741fd7439
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11592755

Change-Id: I5ab77bce8eec384479669a3d08943cb14b58bc47
2020-06-11 13:03:29 +00:00
TreeHugger Robot
83c23bd98c Merge "Don't clear requested SysUI visibility if the source doesn't exist" into rvc-dev am: 9e1a5ebbfd am: d75315ca6d am: 1dc0f45226 am: 0bf658036f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11835421

Change-Id: I4d9db1b3878046c24ad4cfc9fe4c17631e37e703
2020-06-11 12:39:37 +00:00
Jorim Jaggi
3f04cf23f4 Merge "Exclude non-observable insets change" into rvc-dev am: 1f6b99d5fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11592755

Change-Id: I095d445a6ed391c2519fbd73a899813c6c17d9e4
2020-06-11 12:31:30 +00:00
Jorim Jaggi
1f6b99d5fa Merge "Exclude non-observable insets change" into rvc-dev 2020-06-11 12:15:49 +00:00
TreeHugger Robot
1dc0f45226 Merge "Don't clear requested SysUI visibility if the source doesn't exist" into rvc-dev am: 9e1a5ebbfd am: d75315ca6d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11835421

Change-Id: I5c261f9e8b3d046953ee1af97f2e7cd5527336d7
2020-06-11 12:00:41 +00:00
TreeHugger Robot
f50c874323 Merge "Don't clear requested SysUI visibility if the source doesn't exist" into rvc-dev am: 9e1a5ebbfd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11835421

Change-Id: I8e27684ca16d8f140d77ba33b2b9491f85e2f37a
2020-06-11 11:47:32 +00:00
TreeHugger Robot
9e1a5ebbfd Merge "Don't clear requested SysUI visibility if the source doesn't exist" into rvc-dev 2020-06-11 11:24:45 +00:00
Tiger Huang
026dec4298 Don't clear requested SysUI visibility if the source doesn't exist
This makes the SysUI visibility callback compatible with the legacy
behavior.

Fix: 158639842
Fix: 158643177
Test: atest LayoutTests#testAddingImmersiveWindow
Change-Id: Ife06f8aab1b9d86790478665a33961d1b613d62d
2020-06-11 17:50:04 +08:00
Vishnu Nair
34486ad942 Release SurfaceView surface if viewrootimpl surface is not valid
When the window visiblity changes, SurfaceView gets notified to
release its surface. If an app relayout happens before this
notification, the ViewRootImpl surface will be null and the
SurfaceView will not release it surface.

Fixes: 158469622
Test: go/wm-smoke
Test: repro steps from bug
Test: play with SurfaceView apps
Change-Id: Ia4d5948fd229b2c77700c91691b54561d84290bb
2020-06-10 18:14:20 -07:00
Jorim Jaggi
ed31259e01 Exclude non-observable insets change
When we notify insets changed, legacy behavior forces us to force
a new measure on the entire hierarchy. However, this can cause
jank in various scenarios.

Make sure that we don't report an insets change if non-observable
state changes.

Test: InsetsStateTest
Test: Swipe up to home while IME open
Bug: 157123435
Change-Id: I9c51066c6489888720b307240d03054cc18c4172
2020-06-10 14:24:03 +02:00
TreeHugger Robot
0b2dbedeaa Merge "Report WINDOW_FOCUS_GAIN_REPORT_ONLY when the served connection remains" into rvc-dev am: b121512580 am: 4f93e9c80c am: f3b9965750 am: bb8e0b922a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11686078

Change-Id: Ife20398017639b41019d3ee58e3179cf31b3da2e
2020-06-09 14:27:19 +00:00
TreeHugger Robot
f3b9965750 Merge "Report WINDOW_FOCUS_GAIN_REPORT_ONLY when the served connection remains" into rvc-dev am: b121512580 am: 4f93e9c80c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11686078

Change-Id: I37a0e10e7b9d84e2411636fdbfbbb43a9a6d2e8c
2020-06-09 14:08:44 +00:00
TreeHugger Robot
c1f9c5e221 Merge "Report WINDOW_FOCUS_GAIN_REPORT_ONLY when the served connection remains" into rvc-dev am: b121512580
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11686078

Change-Id: Ibb8d43ae4df099b3304284571365a3b55f0daa4c
2020-06-09 13:55:38 +00:00
TreeHugger Robot
b121512580 Merge "Report WINDOW_FOCUS_GAIN_REPORT_ONLY when the served connection remains" into rvc-dev 2020-06-09 13:41:30 +00:00
Adrian Roos
8a931d7f08 Merge "Insets: allow controlling insets as long as the window is covering in the relevant direction" into rvc-dev am: 5b12e07b9c am: 37afe34234 am: cbfdd45165 am: d49ab516fe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11632046

Change-Id: I5e7e7a5c229e2e6fd2e786545da392b18d7aff80
2020-06-09 09:25:03 +00:00
Adrian Roos
cbfdd45165 Merge "Insets: allow controlling insets as long as the window is covering in the relevant direction" into rvc-dev am: 5b12e07b9c am: 37afe34234
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11632046

Change-Id: I14ae753f5a4f3bde05cca821c395964850b5f6f9
2020-06-09 08:49:31 +00:00
Adrian Roos
30e24e93fd Merge "Insets: allow controlling insets as long as the window is covering in the relevant direction" into rvc-dev am: 5b12e07b9c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11632046

Change-Id: I4c93f16807003209a8b99cee0aa35081e6b76062
2020-06-09 08:35:45 +00:00
Adrian Roos
5b12e07b9c Merge "Insets: allow controlling insets as long as the window is covering in the relevant direction" into rvc-dev 2020-06-09 08:24:57 +00:00