Commit Graph

1606 Commits

Author SHA1 Message Date
Wei Sheng Shih
89db9cf67f Merge "Clear padding and background after create view from context." into sc-dev am: f2d2fb5292
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15026547

Change-Id: I36ccb90b0216d626711e48552c0ed69a91a06d7f
2021-06-24 11:02:18 +00:00
wilsonshih
0797c86219 Clear padding and background after create view from context.
When create view with Context, there will also load some view
attributes from the Context and pre-set to the View object, to ensure
the splash screen view not affected by those attributes, clear padding
and background after create those view objects.

Bug: 191339594
Test: manual launch several apps from Launcher/Notification.
Tets: atest SplashscreenTests
Change-Id: I05be9c296a04cd49a0896ad8aef57643720d60ce
2021-06-24 11:10:07 +08:00
Mady Mellor
32cea47b4c Merge "Add a note about keeping a dimension value in sync with CTS" into sc-dev am: f46a8f6276
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080681

Change-Id: I0dfaefed72fc322e487b0d7a2964f0490431ac38
2021-06-23 20:58:26 +00:00
Mady Mellor
ab00abc6f6 Add a note about keeping a dimension value in sync with CTS
Test: treehugger
Bug: 182934996
Change-Id: Ib8dd9bc9d13d9f5a737ceb0d61e34b825f883f8c
2021-06-23 11:04:27 -07:00
Wei Sheng Shih
9517b68134 Merge "Ignore exit animation when view is detached from window." into sc-dev am: a1b3ce5250
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14972767

Change-Id: I26beb7d7329d5eaf38a947c784be3ada33d09289
2021-06-22 11:15:40 +00:00
Wei Sheng Shih
a1b3ce5250 Merge "Ignore exit animation when view is detached from window." into sc-dev 2021-06-22 11:02:59 +00:00
TreeHugger Robot
1a6b2ae623 Merge "Fix SysUI NPE crash during the boot/init progress" into sc-dev am: 2adcf7686d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15052835

Change-Id: Iab832312eaa2af14c0c767163b2f1bc52871192c
2021-06-22 07:40:36 +00:00
TreeHugger Robot
2adcf7686d Merge "Fix SysUI NPE crash during the boot/init progress" into sc-dev 2021-06-22 07:27:24 +00:00
Bill Lin
c4bdf37af2 Fix SysUI NPE crash during the boot/init progress
When Device boot and SystemUI servies starting, settings provider
may callback onChange() when OneHandedController register observer.
If the callback timing earlier han mEventCallback registered by
WMShll#initOneHanded, then the NPE will happen.

The simple fix is to add NPE check in
OneHandedController#notifyExpandNotifcation()
we can just ignore the callback during init time since the singal
is to expand notification and come from shorcut after user enable
and tap shortcut.(No need to act for the signal during boot progress.)

Test: manual reboot device and observe
Test: atest WMShellUnitTests
Bug: 191600033
Change-Id: I73849afa9904031759da304298221dbb222aeaaa
2021-06-22 11:50:46 +08:00
TreeHugger Robot
34a6db53ce 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: Id1edbb731b13a973fd893b68b1771302b0f1a81c
2021-06-21 19:55:41 +00:00
TreeHugger Robot
aadedc76b6 Merge "Hook WakefulnessLifecycle for best timing of LockedDisabled" into sc-dev 2021-06-21 16:42:36 +00:00
wilsonshih
84837512a1 Ignore exit animation when view is detached from window.
After first launched activity start remove starting window, there start
a second activity with a new task, so there will trigger a open/close
task transition while playing starting window exit animation, but since
the first launched activity is going to destory, there will goes to
clear all window for that activity.
For client side we can ignore the animation after it was detached from
window.

Bug: 190040281
Test: manual
Change-Id: Idd939feb72163d585e14db480b1e374e41597928
2021-06-21 09:37:23 +08:00
TreeHugger Robot
b93d6b3ce3 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: Id6c22fcd52b323e25e4cdb80531d8086a7747114
2021-06-20 20:32:59 +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
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
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
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
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
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
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
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
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
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
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
1efb640d38 Merge "Start pinchResize only if pointers are inside PIP" into sc-dev am: c6e212c5b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14948317

Change-Id: Ie0f93793235892921790df65006ffa911e5d36f5
2021-06-16 22:04:08 +00:00
Jorge Gil
c6e212c5b2 Merge "Start pinchResize only if pointers are inside PIP" into sc-dev 2021-06-16 21:59:53 +00:00
Ben Lin
524bc0a22c PiP: Update menu bounds before showing the menu.
It is possible that sometimes when PiP menu is not showing, it is not
updated correctly.

Bug: 190210447
Test: Enter PiP
Change-Id: I87639a6d568e96e26d4b79ba68a6349ec0ae29e1
2021-06-16 19:51:07 +00:00
Bill Lin
ca75e7e466 Allow one-handed mode shortcut expand notification
1) Add OneHandedEventCallback for WMShell to register
   callback, and if one handed mode settings set show
   notifications, when user tap one handed mode shortcut
   notify WMShell send KEYCODE_SYSTEM_NAVIGATION_DOWN
   through OneHandedEventCallback with SysUIMainExecutor.

2) Add isReady() flag in OneHandedDisplayAreaOrganizer
   and Simplify the flow of onActivatedActionChanged()
   to prevent potential race problem while auto-enable
   One-handed and immeditately startOneHanded(), however,
   DisplayAreaOrganizer#onDisplayAreaAppeared() may not
   ready for transtion yet, and result mState keep in
   unfinsihed STATE_ENTERING.

3) Adjust the transiton duration from 800ms to 600ms
   800ms is a little bit long to affect timing of
   apply runtime overlay package.

4) DelayExecute setEnabledGesturalOverlay() until
   transition finised and at most delay once.
   - onSwipeToNotificationEnabledChanged() : DelayExecute
   - onEnabledSettingChanged() : DelayExecute
   - Ctor setupGesturalOverlay() : No DelayExecute
   - mState.isTransitioning() : DelayExecute

Test: WMShellUnitTests
Bug: 182425480
Change-Id: I2615c3b30ad95a858510b4bcc73d8f343843fc96
2021-06-17 01:12:32 +08:00
Vadim Caen
e65475b1c6 Merge "Release the SurfacePackageViewHost on splash screen removed" into sc-dev am: dc07d29bd0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14775423

Change-Id: I49cf9037240aeffebff7b6109ea0abe3942c0fc9
2021-06-16 12:42:29 +00:00
Vadim Caen
dc07d29bd0 Merge "Release the SurfacePackageViewHost on splash screen removed" into sc-dev 2021-06-16 12:27:47 +00:00
jorgegil@google.com
c73eb5d3f7 Start pinchResize only if pointers are inside PIP
The PipResizeGestureHandler was previusly signaling a start
of the pinch resize without checking that both pointers were
within the PIP bounds region. This caused the TouchState to
be reset with a single tap outside the PIP window while
drag-moving it with another finger, which led to PIP becoming
stuck without snapping to the edges.
With this CL, we make sure that both fingers are inside PIP
before starting resetting the touch state and allowing the
pinch resize to start.

Bug: 188640607
Bug: 186607893
Test: move the PIP with one finger and while still holding it
tap anywhere outside of PIP with another finger - verify you
can still keep moving the PIP with the first finger normally.

Change-Id: I2137180ea1f333fe2e0b67e52d57da5ff9a2d094
2021-06-15 17:33:09 -07:00
Ben Lin
e8b4a8ab7a Merge "PiP: Divide up the magnetic percent by 2." into sc-dev am: dd44345c6a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14940431

Change-Id: I5fea0df9e9e23084cf41dd93e9b5d02fc484eecc
2021-06-15 19:13:28 +00:00
Ben Lin
dd44345c6a Merge "PiP: Divide up the magnetic percent by 2." into sc-dev 2021-06-15 19:06:17 +00:00
Antonio Kantek
ec6b2bbd6e Removing remaining references of ActivityView in fw/base
Bug: 179161778
Bug: 191165536
Test: atest CarServiceTest
Change-Id: Ic45091d565e1654c9177183f065e605b0ab0b56d
2021-06-15 11:23:12 -07:00
Mady Mellor
f25ecf8dfc Merge "Fix dismiss ciricle being behind expanded view" into sc-dev am: 563e1b4856
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14970151

Change-Id: If3794aeb4235008b7e09104e4e34b853c7d7f361
2021-06-15 16:21:40 +00:00
Mady Mellor
563e1b4856 Merge "Fix dismiss ciricle being behind expanded view" into sc-dev 2021-06-15 16:09:56 +00:00
Mady Mellor
500a18e02a Merge "Fix launching bubbles from widgets" into sc-dev am: faee2e6b03
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14940550

Change-Id: I69f23eae9d361d25d4aa22dd47ce56268361e7a3
2021-06-15 16:09:09 +00:00
Mady Mellor
faee2e6b03 Merge "Fix launching bubbles from widgets" into sc-dev 2021-06-15 16:08:52 +00:00
Vadim Caen
a46ff113be Release the SurfacePackageViewHost on splash screen removed
The SurfacePackageViewHost was never release, leading to a leak of its
surfaces.

This CL ensure it is released:
  - Directly in the shell if the SplashScreenView was not copied
  - From the client, through the window manger and then to the shell if
  the splash screen was copied in the client process

Test: Manually tested with app setting by checking if the surfaces
are actually removed (winscope + logs) in the following scenarios:
    - When the application registers an OnExitAnimationListener
      and calls remove(),
    - When the application registers an OnExitAnimationListener
      and dies without calling remove()
    - When the applicaiton does not register an OnExitAnimationListener
    and the shell removes the splash screen
Bug: 189759180

Change-Id: Ib68bfffad6720911368739d7dd87d8a03034c589
2021-06-15 15:39:09 +02:00
Tony Huang
751c068b24 Merge "Using rotate split layout while split active" into sc-dev am: e59e08b8f2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14909655

Change-Id: If2177bc4f6c21d38efd5b647c57098a8a21443b2
2021-06-15 06:58:12 +00:00
Tony Huang
e59e08b8f2 Merge "Using rotate split layout while split active" into sc-dev 2021-06-15 06:50:54 +00:00
TreeHugger Robot
4403e96123 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-06-15 04:39:23 +00:00
Bill Yi
1729ea4c88 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Iab4b9ceaa274a0914f294e71d8fc56f99bd6c87d
2021-06-15 02:38:26 +00:00
TreeHugger Robot
bd1142c3a3 Merge "Settings Switch animation jank while enabled One-handed mode" into sc-dev am: e796dc88bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14947950

Change-Id: I6d1e56857d683f81aa05891cbd5853465cd8946f
2021-06-15 01:54:03 +00:00
TreeHugger Robot
e796dc88bd Merge "Settings Switch animation jank while enabled One-handed mode" into sc-dev 2021-06-15 01:37:34 +00:00
Mady Mellor
e57920820e Fix launching bubbles from widgets
There were a couple of issues:
1) onActivityRestart wasn't checking for bubbles in the overflow
   so there were cases where we could open a bubble but weren't
2) delay opening the bubble until after the transitions have
   happened when launching from a widget, the transition could
   alter the placement of the bubble's surface resulting in
   weird UI.

Test: atest LaunchConversationActivityTest
Test: manual 1) have a bubble & convo widget for it
             2) tap on the widget => bubble opens normally, close
                the bubble & repeat that a bunch

             1) have an unopened bubble & convo widget for it
             2) get enough bubbles to push it out of the stack &
                out of the overflow
             3) tap on the widget => bubble opens

             1) have a bubble & convo widget for it, dismiss bubble
             2) tap on the widget => bubble opens normally
Bug: 188306336

Change-Id: Id68ccbfbfc6fc6949cfc257df4706b470fb78569
2021-06-14 18:25:25 -07:00