Commit Graph

307 Commits

Author SHA1 Message Date
Selim Cinek
286825f60c Fix drag down animation when bypassing
The drag down animation didn't do the transition
to the full shade visually, so things would look
out of place.

Fixes: 191282610
Test: drag down while bypassing
Change-Id: Icdd62155f3762621c1046ed5271476ec0b4e2635
Merged-In: Icdd62155f3762621c1046ed5271476ec0b4e2635
2021-07-23 18:15:43 +00:00
Winson Chung
7cbbc225b1 Workaround for back arrow being stuck on screen
- Whenever we defer the cleanup of the back gesture, schedule a failsafe
  to clean up the window if it's not handled properly.  We'll enable
  this failsafe for sc-dev and disable it for further investigations
  post sc-dev
- Dump additional info for the nav bar window so we can narrow down
  the issue post sc-dev

Bug: 190778197
Test: Can't repro the initial issue, so artificially trigger it to verify failsafe
Test: adb shell dumpsys activity service SystemUIService
Change-Id: I0a8f25babe750e6e5ba4c933ab5271a82ef63646
2021-07-18 20:52:35 +00:00
Peter Kalauskas
875b9b7a19 Fix visibility issue in QS detail panels
Fixes visibility issue where keyguard could enter a bad state where QS
remains visible even though it should be hidden.

Previously, keyguard could enter a bad state if QS was closed while it
had a detail panel open that had animations disabled.

To fix issue, run animations when closing detail panels, even if they
requested not to be animated on close.

Test: Turn off all animations (i.e. adb shell 'settings put global
      animator_duration_scale 0.0 && settings put global
      transition_animation_scale 0.0 && settings put global
      window_animation_scale 0.0'), open QS, tap user icon, tap close,
      ensure you are taken back to the lock screen and that the UI looks
      normal
Test: Rapidly tap the user icon and bottom of keyguard in quick
      succession, ensure that keyguard UI never enters a bad state
Fixes: 193549640
Fixes: 193545214
Change-Id: Ie092f83031edaff0240194832b5499df3b4eab12
2021-07-14 08:34:30 -07:00
Fabian Kozynski
b2314f2d27 Fully expand QSPanel on scroll
If the user starts to scroll while the panel is not fully expanded,
expand it fully.

Test: manual: expand and collapse QS while trying to scroll it
Fixes: 189915859
Change-Id: I15d46e3ff4c67754aa8063ffa55e5c62cad7dc89
2021-06-30 14:23:49 -04:00
Selim Cinek
17754ea1ef Animating the qs / notification bounds now when dismissing media
Previously the bounds animation was on the background which doesn't
exist anymore.

Fixes: 192059748
Test: add media, dismiss, observe normal animation
Change-Id: I0f90b3ca5224b538c62adf30081ad30ed906b3b1
2021-06-28 20:16:34 +02:00
Jordan Demeulenaere
534aef4d05 Fix bouncer to launcher/app animation
This CL ensures that we don't show the keyguard early when unlocking the
phone from the bouncer after swiping up on the lockscreen.

Bug: 191031464
Test: Manual, swipe up on lockscreen with PIN
Change-Id: Id7269189c857e1108a8e33074bb5abfd40437deb
2021-06-16 12:10:28 +02:00
Jordan Demeulenaere
d5c5517416 Animate launches from lockscreen
Bug: 172048407
Test: Tap notification, media, QS, etc from lockscreen
Change-Id: I361aadc18b24375173f3bcea9dc1de0c13c803df
2021-06-14 12:00:01 +02:00
Dave Mankoff
d3cd5bb67b Merge "Don't destroy the FalsingManager in Wallet." into sc-dev 2021-06-03 13:58:12 +00:00
Dave Mankoff
b4935a25ca Don't destroy the FalsingManager in Wallet.
When FalsingManager#cleanupInternal is called, it no longer produces
valid results. With this change, we check that the FalsingManager
is not used after being destroyed, and also avoid destroying it in
WalletScreenController.

Fixes: 188174214
Test: manual
Change-Id: I0ce67de5a326b56dee11c1d63c1d592640c0713d
2021-06-02 09:50:16 -04:00
TreeHugger Robot
86cc28a4f4 Merge "Create state strings for every stock tile" into sc-dev 2021-06-01 20:25:47 +00:00
Matt Pietal
44ad78711f AOD Media
Add media back into smartspace content when the new plugin is
enabled. Only show media on AOD when no other content is displayed,
other than the default weather/date card.

Fixes: 185373132
Test: atest KeyguardMediaViewControllerTest

Change-Id: I9a1ff4eaeb4e13ed30c7796c1e9d2d5d46916737
2021-05-26 10:48:57 -04:00
Fabian Kozynski
803e545259 Create state strings for every stock tile
For stock tiles state (filled in subtitle when there is not one set by
the tiles), we specify values for each of the tiles states. That way,
they can be translated with that specific tile name in mind for
grammatical matching.

Custom tiles will use the default.
New stock tiles must add a new array to pass tests.

Test: QSTileViewImplTest TilesStatesTextTest
Fixes: 188163204
Change-Id: Idd4da01994e37cb4778dcdd3080711179cb884c7
2021-05-19 14:29:46 -04:00
Jeff DeCew
f8894a8664 Remove dead snooze code
Bug: 187480963
Test: manual snooze testing
Change-Id: Icb5b664c677efe95fb3ce5e5c28122d1037d75a5
2021-05-19 14:19:34 -04:00
Selim Cinek
8304b95fad Implemented Lockscreen to shade transition
When dragging down on the lockscreen, we now pull down the quick
settings while dragging instead of wating for the release

Bug: 184946919
Test: atest SystemUITests
Change-Id: Ib233282dd7ce4ba63ceab3e1b788aa164e88c8c0
2021-05-14 17:20:19 +02:00
Schneider Victor-tulias
a6d4e151d2 Update SmartspaceDataPlugin to allow sending SmartspaceTargetEvents.
Test: manual
bug: 187320188
Change-Id: Idda9b4fb96d863c9c49f6233e1ab4f3d89f2682a
2021-05-13 11:22:17 -07:00
Matt Pietal
241f1e71c2 Merge changes from topic "ss_next_alarm" into sc-dev
* changes:
  Smartspace - Next alarm
  Cleanup support for multiple PIN views
2021-05-10 13:44:20 +00:00
Matt Pietal
bf934d2201 Smartspace - Next alarm
Support next alarm appearing next to DnD. If weather is showing, show
inline, otherwise below the smartspace content. Next alarm will not
fade out but DnD will.

Fixes: 185678563
Test: atest KeyguardZenAlarmViewControllerTest

Change-Id: I21e95470d0013bfb6900c1c228dda69f5707c9e6
2021-05-07 14:35:34 -04:00
Fabian Kozynski
26159c8b66 Merge "Set the default background color to ACTIVE" into sc-dev 2021-05-07 14:11:32 +00:00
Matt Pietal
8ddca3c6cb Merge "Smartspace - Support Do Not Disturb" into sc-dev 2021-05-06 19:13:50 +00:00
Fabian Kozynski
f0b4194fbc Set the default background color to ACTIVE
This corresponds to the default state of tiles.

Test: no test
Fixes: 187414055
Change-Id: I85fe80becd8305bb6600921d08d7121c33481f4a
2021-05-06 13:56:29 -04:00
Fabian Kozynski
9969241092 Merge changes Ib9407914,I63dbe8fa into sc-dev
* changes:
  Add chevron to tiles that expand instead of toggling.
  Refactor QSTileView hierarchy
2021-05-06 13:24:59 +00:00
Fabian Kozynski
cd7ecf7db2 Add chevron to tiles that expand instead of toggling.
Logic for side view:
* If the tile has a sideViewCustomDrawable, show that regardless of
State
* Else, if the tile is not Boolean or the state has forceExpandView, it
shows a chevron.
* Else, show nothing.

Test: atest com.android.systemui.qs
Test: manual
Fixes: 187057842
Change-Id: Ib9407914f4fbe5ac833b06008fc405435d0c45b0
2021-05-04 15:29:29 -04:00
Dave Mankoff
a759abbe4b Merge "Mkae SysUIPlugins its own gradle target." into sc-dev 2021-05-04 18:44:10 +00:00
Matt Pietal
d5ea029ae6 Smartspace - Support Do Not Disturb
Add support for systemui to inform smartspace about do not disturb
settings. Address some minor spacing issues. Fix how smartspace loads
through dagger.

Fixes: 185970916
Test: atest KeyguardClockSwitchControllerTest
Change-Id: Id19244ceb45fb70a28d780fa5edefab35a5e42c4
2021-05-04 13:53:21 -04:00
Andy Wickham
4e408fe183 Fixes Studio warning from not being able to find this reference.
Test: Manual
Fixes: 186905222
Change-Id: Iab122016da87dc151d3928666bea9d235691fb67
2021-05-01 01:01:57 +00:00
Dave Mankoff
4e30df7dee Mkae SysUIPlugins its own gradle target.
Breaks the dependency of SystemUIPlugins on ThresholdSensor
by introducing an intermediate interface.

Fixes: 186781915
Test: manual
Change-Id: Ib2633f8f2acaa1d21f1e8968317b4a4e63d3af32
2021-04-30 14:04:12 -04:00
Fabian Kozynski
028497cd67 Add animation for tiles second line
Test: manual
Fixes: 186251234
Change-Id: I0fd6216453b5591469d99a4ba64ac3b1af6e615f
2021-04-27 11:41:29 -04:00
Fabian Kozynski
920c7aa24a Fix credit card animation
Test: manual
Bug: 186251234
Fixes: 186426700
Change-Id: Id81aa3c7fab7ef80faa42aca447501c476464bd2
2021-04-27 11:39:48 -04:00
Dave Mankoff
8d2cf97e71 Merge "Make FalsingManager send out an event when second tap is required." into sc-dev 2021-04-26 19:22:47 +00:00
Lucas Dupin
477aab1fa3 Merge "A new shade pull down animation" into sc-dev 2021-04-25 01:03:18 +00:00
Lucas Dupin
976de38e37 A new shade pull down animation
Test: manual
Test: atest ScrimViewTest
Test: atest ScrimControllerTest
Bug: 185683835
Fixes: 184891403
Change-Id: I1c51f3dc0d8afe97457aea8712c4322ebbda6ae4
2021-04-24 13:08:34 -07:00
Dave Mankoff
73b487f63c Make FalsingManager send out an event when second tap is required.
Bug: 185908806
Test: manual
Change-Id: I33b704b0f5b4fded59214ab33dbafc8de89675ad
2021-04-23 17:02:26 -04:00
Matt Pietal
de36555b9f Smartspace - Support launching intents from lockscreen
Also integrate the FalsingManager, which is important for determining
user intent while on the lockscreen.

Fixes: 186219857
Test: atest KeyguardClockSwitchControllerTest

Change-Id: I22108ec2335bd350fbcaf5d5b90dd3b351011767
2021-04-23 11:51:32 -04:00
Jordan Demeulenaere
ff8c1e6f6f Merge "Animate activities launched by QS click (1/2)." into sc-dev 2021-04-21 15:46:05 +00:00
Jordan Demeulenaere
2541d51347 Animate activities launched by QS click (1/2).
See b/185892236#comment3 for before/after videos.

Bug: 185892236
Test: atest QuickAccessWalletTileTest DeviceControlsTileTest AlarmTileTest
Change-Id: I539921777ab516bd35ba809f818fe02092325e78
2021-04-21 14:28:26 +02:00
Matt Pietal
7db0e2e381 Smartspace - Fade out secondary cards
Pass dozeAmount values to the smartspace library to allow the lib to
make decisions regarding content on both AOD and Lockscreen

Fixes: 185598979
Test: manual, multiple smartspace cards
Change-Id: Ic7bc2ba238b22794a33e6db18c1aae0fa7c96e0b
2021-04-20 16:36:27 -04:00
Jordan Demeulenaere
091a6db76b Animate the QS gear button click.
See b/172050985#comment4 for videos.

Fixes: 172050985
Test: Click the QS gear button
Change-Id: I7a8607e41d4cb8d7734c66c1a601f942e5597796
2021-04-15 11:50:41 +02:00
Matt Pietal
a76c5b2bed Smartspace - Allow primary card colors to be updated
This is largely for both AOD and lockscreen, while may have different
colors than launcher. Particularly for AOD, we need to transition to a
WHITE color. Set a primary text color, with expectations that a
secondary color will later be set in order to support cards with
various background colors.

Fixes: 185211979
Test: manual, change to AOD <-> LS
Change-Id: I36fb8e5cfcbac1ec999b2b9df08f42d47507990f
2021-04-14 09:45:39 -04:00
Jordan Demeulenaere
cea62bb74a Move ActivityLaunchAnimator in its own lib. (1/n)
Bug: 184121838
Test: Manual
Change-Id: Ib979fed2f59d9dbf5f0696edb5fcb4956600e6e0
2021-04-08 22:32:21 +02:00
Dave Mankoff
4b2a3cc2a3 Merge changes from topic "b172655679-bayes-falsing" into sc-dev
* changes:
  Add Falsing to quick settings bottom buttons.
  Collapse QS when falsing happens.
  Separate out FalsingManager#isFalseTap
2021-04-07 21:14:12 +00:00
Dave Mankoff
58718c7f81 Separate out FalsingManager#isFalseTap
Method no longer takes `robustCheck` parameter. Instead,
FalsingManager#isSimpleTap is added for basic checking, and
FalsingManager#isTap does robust checking by default.

FalsingManager#isTap takes an enum value for penalty instead of
a double, making the value more understandable.

Bug: 172655679
Test: atest SystemUITests && manual
Change-Id: Ib4a99f87bcd6acee67a98420f460c98d44fa6360
2021-04-07 11:32:47 -04:00
TreeHugger Robot
830a202254 Merge "Revert^2 "Enable smartspace"" into sc-dev 2021-04-07 15:14:39 +00:00
Matt Pietal
3b67a00d95 Revert^2 "Enable smartspace"
Address issue with component init and tests

Bug: 184642387
Test: com.android.devicehealthchecks.SystemAppCheck

Change-Id: I51ad3fb2e9df47a8f426a356fc34c8499b94892f
2021-04-07 09:13:09 -04:00
Jordan Demeulenaere
49bcc0d1ee Animate QuickSettings long press (1/2).
See b/172063474#comment3 for before/after videos.

Bug: 172063474
Test: Long press any QS tile
Change-Id: I75e4784bd6db92a1aea6ffd0eabb648e82376a09
2021-04-07 14:25:22 +02:00
Jordan Demeulenaere
b796cfec0a Add generic support for corner radius in launch animations.
This CL adds a generic way in GhostViewLaunchAnimationController to
change the corner radius of the expanding background. It does so by
supporting Gradient- and LayerDrawable (and therefore RippleDrawable).

This will be first used to animate the launch of the settings after long
clicking a QS tile (see ag/13988954), but this implementation will
hopefully work with other views as well.

This CL also adds the wiring in ActivityStarter that will be needed by
the QuickSettings.

Bug: 184121838
Test: Manual
Change-Id: I40f7048edd682d5d68c32b4439368d19009a8df1
2021-04-07 14:25:17 +02:00
Jordan Demeulenaere
a867af2d87 Extract ActivityLaunchAnimator into a reusable class.
This CL removes all logic specific to notifications in
ActivityLaunchAnimator, so that it can be reused for other launch
animations.

I would suggest to look at ag/14057092 in parallel to make more sense of
the abstractions added in this CL.

For the sake of not making this CL even bigger than it already is, a few
things still need to be done in follow-up CLs:
 - Show the status bar icons at the right time, instead of at the end of
   the animation, when using the StatusBarLaunchAnimatorController.
 - Move the animation/ package outside of the SystemUIPluginLib library
   and instead have it in its own reusable library.
 - Replace the animation durations and interpolator to the latest
   designs.
 - Improve split screen by retrieving the final window bounds and
   prevent the clipping of the window during the animation.
 - Handle animations in the lock screen.

For review, I would recommend to review in order:
 1. ActivityLaunchAnimator.kt
 2. StatusBarLaunchAnimatorController.kt
 3. NotificationLaunchAnimatorController.kt
 4. GhostedViewLaunchAnimatorController.kt
 5. Everything else.

Bug: 184121838
Bug: 181654098
Test: Tap a notification when the shade is open and unlocked.
Change-Id: If4c3c64fcd153bb8e89111f56332013ca6dff156
2021-04-06 17:28:37 +02:00
Silin Huang
807cca09df Add card image to the QuickAccessWalletTile.
We fetch the wallet cards on handleUpdateState() of the Tile, if the
card image exists, it will be stored in the QS State and then pass to
the QSTileViewHorizontal so the card image will be presented on the
tile.
The car image won't show on the tile when the user is edittng the tiles.

Test: manually tested on device
locked - https://hsv.googleplex.com/5756150307880960
unlocked - https://hsv.googleplex.com/5767433589620736
Test: atest
Bug: b/182963608

Change-Id: I45bab06528a7154419ae73f9e576cf385bf0f7c1
2021-04-05 23:48:09 +00:00
Fabian Kozynski
fd5d0a2d7b Pass the context from QS into QSFactory#createTileView
This way, we guarantee that the theme is the same in all of QS

Test: manual
Bug: 183953523
Change-Id: Ia03171194d8c90358730fcacb9ea7dcf61d4dbed
2021-04-02 16:13:03 -04:00
Peter Kalauskas
eeedbc44f9 Allow QS detail panels to change text of "Done" button
User detail panel settings button will now say "Close" instead
of "Done"

Bug: 169783558
Test: atest SystemUITests
Change-Id: Ibafe212dce8a8b8654e877418200e1dc2c5dec8b
2021-03-24 10:36:16 -07:00
Peter Kalauskas
45df6837cd Allow QS detail panels to change text of settings button
User detail panel settings button will now say "User settings" instead
of "More settings"

Bug: 169783558
Test: atest SystemUITests
Change-Id: I1a7a6963f15dbbf6ed8086113fa47f4662d8373c
2021-03-23 13:15:44 -07:00