Commit Graph

2031 Commits

Author SHA1 Message Date
TreeHugger Robot
a4624c14af Merge "Hook WakefulnessLifecycle for best timing of LockedDisabled" into sc-dev am: aadedc76b6 am: 9c2c1fac7a am: be29d5070b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15002670

Change-Id: I370d60b9e2fd395b7213de033a17e6754815a9f7
2021-06-21 20:14:37 +00:00
TreeHugger Robot
be29d5070b Merge "Hook WakefulnessLifecycle for best timing of LockedDisabled" into sc-dev am: aadedc76b6 am: 9c2c1fac7a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15002670

Change-Id: I59c1c299a6678309a1d7c1966602e4971cf9fbd4
2021-06-21 19:55:12 +00:00
TreeHugger Robot
9c2c1fac7a Merge "Hook WakefulnessLifecycle for best timing of LockedDisabled" into sc-dev am: aadedc76b6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15002670

Change-Id: I1d7ab43a93e9afdf20baf819a1e962d0513991b0
2021-06-21 19:54:31 +00:00
TreeHugger Robot
aadedc76b6 Merge "Hook WakefulnessLifecycle for best timing of LockedDisabled" into sc-dev 2021-06-21 16:42:36 +00:00
TreeHugger Robot
4f4afcd965 Merge "Removing remaining references of ActivityView in fw/base" into sc-dev am: dc86e26f54 am: cedbffebcf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14829810

Change-Id: Ie8633536fe19026a272b010b19b9e8c2285e22e5
2021-06-21 12:05:32 +00:00
Winson Chung
1be677d696 Merge "Add cached state to prevent blocking calls from SysUI->Shell" into sc-dev am: 979fe90f43 am: 2725991d00
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14964835

Change-Id: I1e87be6fdae6ccc80cbbf3787437066210e43fcc
2021-06-21 12:03:19 +00:00
TreeHugger Robot
dcbd027394 Merge "Fix shortcut rotate trigger swipe notification" into sc-dev am: bd1d84122b am: 6b451802c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15017733

Change-Id: I99609bd9cbd20abf9db07fbfc5d6e128f1b78368
2021-06-21 11:58:16 +00:00
TreeHugger Robot
cedbffebcf Merge "Removing remaining references of ActivityView in fw/base" into sc-dev am: dc86e26f54
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14829810

Change-Id: I07f5d9bd292021dcc1de2249cb844c9fdfdec630
2021-06-21 11:58:03 +00:00
Winson Chung
2725991d00 Merge "Add cached state to prevent blocking calls from SysUI->Shell" into sc-dev am: 979fe90f43
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14964835

Change-Id: Id664fec0301032a52271e738442b1bf52aa96cf5
2021-06-21 11:55:56 +00:00
TreeHugger Robot
6b451802c1 Merge "Fix shortcut rotate trigger swipe notification" into sc-dev am: bd1d84122b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15017733

Change-Id: Iee804029beefa05a83b80c670c95ccab95f858ac
2021-06-21 11:49:08 +00:00
TreeHugger Robot
913171d5f0 Merge "Do not skip onMovementBoundsChanged if already in PiP" into sc-dev am: 99bded1612
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14983324

Change-Id: I07e7e0527bb13ea35bb927bdc76399297a7f24c6
2021-06-20 20:32:09 +00:00
TreeHugger Robot
99bded1612 Merge "Do not skip onMovementBoundsChanged if already in PiP" into sc-dev 2021-06-20 20:18:16 +00:00
Hongwei Wang
6fb7cd8320 Merge "Do not skip onMovementBoundsChanged if already in PiP" into sc-v2-dev am: b346d3a64c am: 13aef6e815
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15026238

Change-Id: I5d6c1900c3826ae6185868dbca96d2dc58e1c92b
2021-06-19 17:21:54 +00:00
Hongwei Wang
13aef6e815 Merge "Do not skip onMovementBoundsChanged if already in PiP" into sc-v2-dev am: b346d3a64c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15026238

Change-Id: I8fa758907d0872931861d0c720e99383d68fa3eb
2021-06-19 17:09:45 +00:00
TreeHugger Robot
36097dcdac Merge "Removing remaining references of ActivityView in fw/base" into sc-dev am: dc86e26f54 am: 8913c7788c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14829810

Change-Id: I0078a183422562b7de3db1e98410bafd5ed2177d
2021-06-19 01:51:59 +00:00
TreeHugger Robot
8913c7788c Merge "Removing remaining references of ActivityView in fw/base" into sc-dev am: dc86e26f54
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14829810

Change-Id: Ida091f760dd0427e9ffb467a0ac9bb7b65eba80b
2021-06-19 01:38:26 +00:00
TreeHugger Robot
1b1d2d5d10 Merge "Removing remaining references of ActivityView in fw/base" into sc-dev am: dc86e26f54
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14829810

Change-Id: Id373b53b241f52510c070749976822a1cf886e01
2021-06-19 01:38:01 +00:00
TreeHugger Robot
dc86e26f54 Merge "Removing remaining references of ActivityView in fw/base" into sc-dev 2021-06-19 01:23:12 +00:00
Hongwei Wang
330fc27924 Do not skip onMovementBoundsChanged if already in PiP
If the Task is already in PiP mode and fixed rotation is happening, we
still need the onMovementBoundsChanged callback to go through in
PipTaskOrganizer.

Note that there seems to be an existing bug that Launcher shelf height
is ignored with the following steps
- Enter PiP and open another app to fullscreen
- Rotate screen and swipe the other app to home

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/gs08EEyHyNcn86lsIcbIRe
Bug: 191143521
Test: follow the reproduce steps in bug, see the video
Merged-In: I601c7493794316883445e9c69e5cdd6a808e8933
Change-Id: I601c7493794316883445e9c69e5cdd6a808e8933
2021-06-18 22:34:07 +00:00
Hongwei Wang
298da246f0 Do not skip onMovementBoundsChanged if already in PiP
If the Task is already in PiP mode and fixed rotation is happening, we
still need the onMovementBoundsChanged callback to go through in
PipTaskOrganizer.

Note that there seems to be an existing bug that Launcher shelf height
is ignored with the following steps
- Enter PiP and open another app to fullscreen
- Rotate screen and swipe the other app to home

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/gs08EEyHyNcn86lsIcbIRe
Bug: 191143521
Test: follow the reproduce steps in bug, see the video
Change-Id: I601c7493794316883445e9c69e5cdd6a808e8933
2021-06-18 15:24:19 -07:00
Winson Chung
59b2a8282b Merge "Add cached state to prevent blocking calls from SysUI->Shell" into sc-dev am: 979fe90f43 am: 36982f2793
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14964835

Change-Id: Ib535723c2e391c60d19c5771415f981a1e33ef61
2021-06-18 22:08:41 +00:00
Winson Chung
36982f2793 Merge "Add cached state to prevent blocking calls from SysUI->Shell" into sc-dev am: 979fe90f43
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14964835

Change-Id: I3c86248d705d80d2feb6107efb9533f5563315ff
2021-06-18 21:52:42 +00:00
Winson Chung
542830c839 Merge "Add cached state to prevent blocking calls from SysUI->Shell" into sc-dev am: 979fe90f43
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14964835

Change-Id: I526730dd7183ae1b7f5314e77910a1474441e58f
2021-06-18 21:52:34 +00:00
Winson Chung
979fe90f43 Merge "Add cached state to prevent blocking calls from SysUI->Shell" into sc-dev 2021-06-18 21:34:29 +00:00
TreeHugger Robot
7e9d573025 Merge "Fix shortcut rotate trigger swipe notification" into sc-dev am: bd1d84122b am: b10dba7ae0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15017733

Change-Id: I415f3268470fe4ad0b166e9c7cdfa46a47723365
2021-06-18 17:44:57 +00:00
TreeHugger Robot
b10dba7ae0 Merge "Fix shortcut rotate trigger swipe notification" into sc-dev am: bd1d84122b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15017733

Change-Id: Ifde0256d03c39ad928366db1da871f5767120107
2021-06-18 17:27:11 +00:00
TreeHugger Robot
01a4b9b237 Merge "Fix shortcut rotate trigger swipe notification" into sc-dev am: bd1d84122b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15017733

Change-Id: Ic90e3d27fcc267a62bdb6a79da77d8e681f0f5a5
2021-06-18 17:22:59 +00:00
TreeHugger Robot
bd1d84122b Merge "Fix shortcut rotate trigger swipe notification" into sc-dev 2021-06-18 17:12:22 +00:00
Bill Lin
638db506c8 Fix shortcut rotate trigger swipe notification
onActivatedActionChanged() was invoke When setting
ONE_HANDED_MODE_ACTIVATED update, the root cause is
onRotateDisplay() in OHMDisplayAreaOrganizer and go
to finishOffset() and callback onStopFinished(), then
OHMController#onStopFinished() invoke reset settings
through notifyShortcutState(STATE_NONE) which reset
settings key ONE_HANDED_MODE_ACTIVATED to 0.
At the meanwhile reset key cause observer invoke
onActivatedActionChanged() to expand notification again.

The simple solution is directly return if current setting
is "Swipe notification" in OHMDisplayAreaOrganzier
onRotateDisplay() to avoid finishOffset() called.

Test: manual tap OHM shortcut to expand notification,
      rotate to check if notification expanded
Test: atest WMShellUnitTests
Bug: 191337996
Change-Id: I697dbabce070249f0a5e513abd514f9e02b8aa16
2021-06-18 21:05:44 +08:00
Ben Lin
34dad932bb Merge "PiP: Update menu bounds before showing the menu." into sc-dev am: 9b8c01844b am: 48326abd8f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15001386

Change-Id: I70fa21593fe483c9f389bc6d66e943827f9511fc
2021-06-17 23:44:25 +00:00
Ben Lin
3506966461 Merge "PiP: Update menu bounds before showing the menu." into sc-dev am: 9b8c01844b am: 22607bc065
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15001386

Change-Id: I94c973cb608aad83563f6a4faf6e4f3452ec7ce1
2021-06-17 23:31:50 +00:00
Ben Lin
22607bc065 Merge "PiP: Update menu bounds before showing the menu." into sc-dev am: 9b8c01844b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15001386

Change-Id: I05a7a4616b0860c7728aa73c5e7bf30129e9fec9
2021-06-17 23:31:16 +00:00
Ben Lin
30fc7ff9c9 Merge "PiP: Update menu bounds before showing the menu." into sc-dev am: 9b8c01844b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15001386

Change-Id: I784a90cb3c34da81ec5840a0b3996c24c7ca0d32
2021-06-17 23:30:38 +00:00
Ben Lin
48326abd8f Merge "PiP: Update menu bounds before showing the menu." into sc-dev am: 9b8c01844b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15001386

Change-Id: I5e6296df574638d18c0764b481cea23546486a2c
2021-06-17 23:30:35 +00:00
Ben Lin
9b8c01844b Merge "PiP: Update menu bounds before showing the menu." into sc-dev 2021-06-17 23:27:24 +00:00
Ben Lin
1e398917c4 Merge "PiP: Move enter-PiP on-pause logic." into sc-v2-dev am: 5643e20db3 am: a12047dc90
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14754525

Change-Id: Id5a40c0712f75e974aab0e15168d39b67e228e5d
2021-06-17 22:00:13 +00:00
Ben Lin
a12047dc90 Merge "PiP: Move enter-PiP on-pause logic." into sc-v2-dev am: 5643e20db3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14754525

Change-Id: I675f3b0b33058cf486061ac353851862ddb72a46
2021-06-17 21:56:47 +00:00
Ben Lin
5643e20db3 Merge "PiP: Move enter-PiP on-pause logic." into sc-v2-dev 2021-06-17 21:50:11 +00:00
Bill Lin
4f4b74bbce Hook WakefulnessLifecycle for best timing of LockedDisabled
1. Sets LockedDisabled when onStartedGoingToSleep()
2. Reset LockedDisabled when onFinishedWakingUp()
3. Update keyguard showing state to controller through
   onKeyguardVisibilityChanged(showing)

The flow changes:
 1) POWER-KEY going to sleep(AOD)
 2) onStartedGoingToSleep()   <--New timing for LockedDisabled
 3) onFinishedGoingToSleep()
 4) onKeyguardVisibilityChanged(true) <--Legacy LockedDisabled
 ---------------
 1) POWER-KEY waking up to HOME
 2) onStartedWakingUp()
 3) onFinishedWakingUp()
 4) onKeyguardVisibilityChanged(false) <--Reset LockedDisabled

Screen OFF to AOD flow takes about 1800ms:
  POWER_KEY---(400ms)---> onStartedGoingToSleep()---(100ms)--->
  onFinishedGoingToSleep()---(1300ms)--->onKeyguardVisibilityChanged()

Screen ON to HOME flow takes about 700ms:
  POWER_KEY---(50ms)---> onStartedWakingUp()---(160ms)--->
  onFinishedWakingUp()---(500ms)---> onKeyguardVisibilityChanged()

Test: Manual PowerKey going to sleep > Trigger One Handed mode
Test: atest WMShellUnitTests
Bug: 191149165
Change-Id: I557ab4736d0f77b38334fb95d89dcf0875fc5be2
2021-06-18 01:56:25 +08:00
TreeHugger Robot
cfb1474112 Merge "De-optimize flicker tests" 2021-06-17 15:10:11 +00:00
Nataniel Borges
8b59ddb19c De-optimize flicker tests
The library is used in tests only and doesn't need to be optimized. When optimization is enabled, the IDE breakpoints don't work correctly and some variables are not available, making it harder to debug.

Test: atest FlickerTests WMShellFlickerTests -w and put a breakpoint in any test
Bug: 162925924
Change-Id: I642cf86473573847d10b0ed452246e8742487684
2021-06-17 15:42:45 +02:00
Winson Chung
523ab2ab6f Add cached state to prevent blocking calls from SysUI->Shell
- WindowManagerGlobal has a shared lock which means that code in the
  shell main thread can deadlock with code running on the sysui main
  thread in rare cases (ie. display changes when folding/unfolding).

  Ideally there are no blocking calls between SysUI/Shell so this
  change caches state changes from the Bubbles side for querying from
  SysUI.  In particular, the expanded states and the suppressed states.

Bug: 190453559
Test: atest SystemUITests


Change-Id: I4e60b168a84618033604e7d097599b048a5886a1
2021-06-16 20:58:03 -07:00
Bill Lin
55d3e45c4a Merge "Allow one-handed mode shortcut expand notification" into sc-dev am: 789f014c04 am: 2214897235
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14957128

Change-Id: Ic9c8b87988f723cb3ce14aa686fad17e4426e474
2021-06-17 00:39:18 +00:00
Bill Lin
2225a58b34 Merge "Allow one-handed mode shortcut expand notification" into sc-dev am: 789f014c04 am: dd211bab21
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14957128

Change-Id: I653e6446bcdac8ba7ed628ae7e89fb44d03b7b24
2021-06-17 00:39:16 +00:00
Bill Lin
d3b7eb8dd1 Merge "Allow one-handed mode shortcut expand notification" into sc-dev am: 789f014c04
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14957128

Change-Id: I24b1fb1055403dd684bc0b1f96739fcdd8d6e809
2021-06-17 00:30:48 +00:00
Bill Lin
2214897235 Merge "Allow one-handed mode shortcut expand notification" into sc-dev am: 789f014c04
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14957128

Change-Id: Ic889ca6d24deb1e4a721f87837c3d813dbb1b0b2
2021-06-17 00:25:38 +00:00
Bill Lin
dd211bab21 Merge "Allow one-handed mode shortcut expand notification" into sc-dev am: 789f014c04
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14957128

Change-Id: Ifce69988d9f86294ad0b91c94606dedce3a15f08
2021-06-17 00:23:48 +00:00
Bill Lin
789f014c04 Merge "Allow one-handed mode shortcut expand notification" into sc-dev 2021-06-16 23:59:28 +00:00
Jorge Gil
78dce732c4 Merge "Start pinchResize only if pointers are inside PIP" into sc-dev am: c6e212c5b2 am: 1efb640d38
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14948317

Change-Id: Ie97e3ba18433e5727c4d7f48c3e43d606d51c6ad
2021-06-16 22:08:38 +00:00
Jorge Gil
153d2538cf Merge "Start pinchResize only if pointers are inside PIP" into sc-dev am: c6e212c5b2 am: 2c8878f17b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14948317

Change-Id: I588e7e4dd120b2c0aed21689af053463beb167ce
2021-06-16 22:08:16 +00:00