Commit Graph

65 Commits

Author SHA1 Message Date
Joshua Tsuji
b1a796b155 Adds DynamicAnimation-based movement to the bubbles.
See go/bubble-stack-design for a high level overview of these changes. This is a large CL, but required in order to allow continued development and team testing without breaking functionality over the course of multiple CL submissions.

To integrate the new animations, the following changes have been made to existing code:
* (BubbleStackView) The bubble container (and thus, the stack view) are MATCH_PARENT to allow the bubbles to independently translate anywhere on the screen.
* (BubbleStackView) Start position is set by the stack controller, not BubbleStackView.
* (BubbleStackView) Expand positon is set by the expansion controller, not BubbleStackView.
* (BubbleStackView/BubbleTouchHandler) Added the methods onDragStart/onDragged/onDragFinish, and onBubbleDragStart/onBubbleDragged/onBubbleDragFinish, for cleaner dispatch of touch events to the appropriate animation controller.
* (BubbleStackView/BubbleController) The stack view's getBoundsOnScreen returns the first bubble's bounds, if the stack is not expanded.
* (BubbleStackView) applyCurrentState no longer manages translation of bubbles, or the expanded view, these are controlled by animation.
* (BubbleMovementHelper) Deleted, no longer needed.
* (Everywhere) Changed uses of Point to PointF, since translation values are floats anyway.

Known issues to be fixed in subsequent, far smaller CLs:
* (b/123022862) Bubble dragging out/dismissing is not animated, and the bubbles can be deposited anywhere. Tap outside the stack to collapse them back to normal.
* (b/123023502) New bubbles added while the stack is expanded are not positioned properly.
* (b/123022982) Expanded view arrow is sometimes in the wrong position.
* (b/123023410) If the stack is expanded while animating, it collapses to its original position even if not along the edge of the screen.
* (b/123023904) The expanded view doesn't animate out, it disappears instantly.
* (b/123026584) Bounds in landscape are a bit wonky.

Bug: 111236845
Test: atest SystemUITests
Test: physics-animation-testing.md
Change-Id: Icaca09e5db89c635c9bb7ca82d7d2714362e344e
2019-01-24 19:23:17 -05:00
Aaron Heuckroth
f708d47e4b Extract GlobalActionsLayout to an abstract class.
Test: Automated tests pass.
Change-Id: I5898723737e8c4355ff2de2c6535f6c81df9136f
2019-01-16 13:45:57 -05:00
Wu Ahan
1153b78033 Merge "Enable AOD image wallpaper and apply aod mask view." 2019-01-11 08:21:59 +00:00
Evan Laird
e626cdac2e Remove SignalClusterView and signal_cluster_view
These are unused since P, when the icons all moved into the same icon
container and are all managed by StatusBarIconController

Also remove an unused class StatusBarIconContainer

Test: atest SystemUITests
Change-Id: I636449b51c009ccfaeebc559b1f7fb31487cc5fe
2019-01-10 13:44:04 -05:00
Ahan Wu
723a80e4fd Enable AOD image wallpaper and apply aod mask view.
1. Enables image wallpaper in AOD.
2. Enables a mask with 70% black scrim and vignette effects.
3. Add feature flag in developer options which is default disabled.

Bug: 111861907
Bug: 118470430
Test: Manually test the flow
Test: runtest systemui
Test: atest ImageWallpaperTransformerTest
Test: atest AodMaskViewTest

Change-Id: Iff2642d52264e88012f4759842a59aaf5bc45b38
2019-01-08 15:17:53 +08:00
Selim Cinek
ff2ffece4b Removed the shadow alpha property from notifications
It wasn't used anymore. Additionally are we also removing the
drag animation events that were originally created for the shadow
alpha animations.

Test: runtest systemui
Change-Id: Ia5cbf7ecb2728fc1298c1b22f3f37bac6b531803
Fixes: 119791828
2018-11-20 11:54:24 -08:00
Selim Cinek
5f259a7d90 Merge "Fixed an issue where icons could remain white" into pi-dev 2018-05-17 01:22:41 +00:00
shawnlin
4ef7ca5a9a Fixed regression on jank test of changeBrightness
Replace using hardware layer for alpha animation with drawing
transparent color with MULTIPLY mode.

Test: atest google/perf/jank/SystemUI/UbSystemUIJankTests-Trace:android.platform.systemui.tests.jank.SystemUiJankTests#testChangeBrightness
Change-Id: I9615af89c4418dd90ccc86e9e7c71d88e7121826
Fixes: 79266233
2018-05-16 15:06:31 +08:00
Selim Cinek
653c139e39 Fixed an issue where icons could remain white
Test: code inspection
Change-Id: Ib2d2e5f5a638bd86fcd17e8c3dfe28501de75bad
Fixes: 77024183
2018-05-15 15:23:02 -07:00
Mady Mellor
b3a6aed980 Add 'Snooze' to local context menu for notifications
Bug: 34840333
Test: manual - 1. turn talkback on
               2. have a notification focused
               3. invoke local context menu, note that 'snooze' is an option
               4. select snooze, note that notification is snoozed

Change-Id: Id3ea62a0a9e5c2b8893aa5b548e64bb2b341d7a2
2018-05-14 12:52:22 -07:00
Lucas Dupin
60661a6dd8 Clock padding and motion adjustments
Fixes: 73830624
Test: manual
Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/PropertyAnimatorTest.java
Change-Id: I9b7785cfbc610db9e4b920eef518ab24b97a6bbc
2018-04-20 01:08:21 +08:00
Jian Jin
44e4d82d2e Add Cancel button in Car Keyguard
Change-Id: I0c44f3583fe1dadade1e1b01229571ab7eb29643
Fixes: 74964857
Test:  Manually tested on Mojave
2018-04-09 17:26:32 -07:00
Lucas Dupin
80a3fcc3f5 Fix opacity of expanded shade during transitions
Change-Id: I480e558113cd9f31b7548002265e9b4b78b0ddad
Fixes: 70351996
Fixes: 71443237
Fixes: 73311721
Fixes: 72757727
Test: packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
Test: unlock with fp. pattern
Test: pull down shade adjust brightness on bouncer and launcher
Test: unlock with fingerprint from pulsing notification
2018-02-21 19:43:38 +00:00
Lucas Dupin
d1fac203ad Merge "Display blanking logic improvements" 2018-02-07 00:34:28 +00:00
Selim Cinek
a352b7a9f3 Merge "Implemented support for inline images" 2018-02-06 23:15:00 +00:00
Selim Cinek
7199ed910e Implemented support for inline images
Messaging Style always had API support to
display images, but they were never shown.
We are now displaying images inline

Bug: 63708826
Test: send messages with an image
Change-Id: I50c835b19f4846cb2cbfb17e9805eacffd9ec6b3
2018-02-06 10:33:16 -08:00
Lucas Dupin
8c7cb02f1f Display blanking logic improvements
Blank display immediatelly when requested, display power controller
will fade out the screen using ColorFade.

SysUI just needs to fade the UI back in when we're in control of
the transition again.

Change-Id: I9d58de3d39c0288f5c82c0c04c86cb43bb3d02c4
Fixes: 72527083
Test: receive notification on AOD, wait.
Test: receive notification on AOD, fp unlock
Test: wake up, unlock, pull notification shade
Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
Bug: 71913808
2018-02-05 15:52:56 -08:00
Adrian Roos
5b51885427 Merge emulated cutout into either rounded corner overlay
This so that we can save a layer, which avoids dropping us into
GL composition during animations.

This assumes that the cutout is always at the top or bottom edge
in the device's natural orientation.

Note that the two overlays for the top and bottom rounded corners
are still separate.

Bug: 72492508
Test: enable emulated cutout, verify it still shows up
Change-Id: I895084828e0502005bfa31e37d23dd3a6f01a2ca
2018-01-30 15:18:01 +01:00
Evan Laird
058c8aee39 Initial support for camera cutout in CollapsedStatusBar
- Display a space view exactly covering where the display cutout is

- Custom layout for system_icons because this view needs to now layout
right-to-left, and hide icons that don't fit. Similar to notification
icon container but in the other direction. Still needs dots and to limit
the # of icons

- When in landscape/seascape, the cutout space disappears and instead
the status bar insets itself by the same amount that the window is
letterboxed

- Moved battery percent back to the right of the battery because the
time is no longer on that side

Test: adb shell cmd overlay enable
com.android.internal.display.cutout.emulation && adb shell stop && adb
shell start # to start emulation
Bug: 63772836

Change-Id: I8071bfb4983a9d9306df1487cdac956494e80c28
2018-01-18 09:20:13 -05:00
Selim Cinek
b95fd18561 Made the notification side paddings consistent
The rounding and paddings are now consistent
throughout the shade. Before the notifications
were only rounded on the top, but the design
didn't work perfectly in all situations.

Bug: 69168591
Test: add notifications, observe consistent paddings
Change-Id: Idc60cb7d448193c65f77bafebb2d110809ecb725
2018-01-10 20:14:38 +00:00
TreeHugger Robot
7e80df8118 Merge changes I2d517a2b,Ia59e2d97,Id98763d8,Ie3f57dd4,Ib5ddee5c, ...
* changes:
  Fixed a bug where messages could be invisible
  Implemented rounded clipping for groups
  Added padding between notifications and qs on lockscreen
  Insetting notifications on the lock screen
  Increased the notification paddings
  Implemented animations for rounding
  Refactored PropertyAnimator for easier usability
  Implemented rounded corners for notifications
2017-11-29 11:31:55 +00:00
Selim Cinek
515b2035df Insetting notifications on the lock screen
We are now insetting the notifications on the
lockscreen.
This also improves the clipping to the notifications
since we can't just clip the whole content to the
outline bounds.

Test: add notifications on lockscreen, observe inset. Try swiping too.
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationCustomViewWrapperTest.java
Bug: 69168591
Change-Id: Ie3f57dd4938bc97124fb98230cc9427fd4973ead
2017-11-28 18:48:11 +01:00
Lucas Dupin
9e3fa1033c Refactoring ScrimController
ScrimController is now a state machine with tests.

The main motivation for refactoring this class was to
centralize ownership of the scrim state. Before, animations
could be triggered by StatusBar, StatusBarKeyguardViewManager
or DozeScrimController simultaneously, causing collision,
sometimes overriding an expected state due to the call order
and making it hard to calculate an actual state.

Change-Id: I4f4d82549235d3fc7be35b235a2668e70b956cb7
Fixes: 64397851
Fixes: 65688233
Bug: 64155983
Test: runtest -x tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
Test: runtest -x tests/src/com/android/systemui/statusbar/phone/DozeScrimControllerTest.java
Test: unlock using fingerprint, or challenge (pin/password/pattern)
Test: trigger in-app bouncer (camera app)
Test: pull down notification shade locked and unlocked
Test: lock, look at AoD (or black display when AoD isn't supported)
2017-11-28 11:25:49 -05:00
Selim Cinek
d9b7dd4a5d Implemented animations for rounding
The corners now animate nicely instead of just
jumping.

Bug: 69168591
Test: manual, swipe away notifications
Change-Id: Ia45774b1fed4d7b0a5cf2ec56ff1560ff685503c
2017-11-22 02:32:02 -08:00
Selim Cinek
5ec560a12a Refactored clipping util to be used in core
We need the possibility to disable clipping
up a view hierarchy also in core, so I'm
moving it and refactoring it.

Test: expand, observe normal clipping
Bug: 63708826
Change-Id: I157395be8f2b7ac75afc0a3967cb0f2068a02fb6
2017-11-06 16:22:07 -08:00
Chris Wren
e901a7e0ed Enable experimentation on notification snooze options
Bug: 67003813
Test: runtest systemui

Change-Id: Id46ef3938e2edc633f64cec7b66e10d80c9a0bff
2017-10-02 17:38:16 -04:00
Selim Cinek
6eaacf25aa Fixed the icon clipping of the notification shelf
Before the icon wasn't clipped to it's notification container
and could go out of bounds. We're now clipping it to it's
surrounding notification.

Change-Id: I1b9a3650eb3e3f0bcd7d7cef087afb7cc41ccf62
Fixes: 63477094
Test: add notifications, observe icon animations, better clipping
2017-09-07 18:55:25 -07:00
Mady Mellor
920fd89aef Add customs accessibility actions to snooze, allow it to be focused
- Add plumbing for accessibility action IDs, enabling custom
  accessibility options in the local context menu
- Allow snooze view to be focusable
- When option is selected announces the selection via window state change

Test: manual
Bug: 34840333
Change-Id: Idca0b0e00e792d3e3f71fc6a15b9b26d9136f6da
2017-06-12 17:16:58 -07:00
Jason Monk
395617fd35 Start drawing QS slashes rather than using AVDS
These need a bit more work like length control and animations, etc.
but this is a decent start.

Test: visual
Change-Id: I750d777b2b4a19f8c586066712f5a3f7e79befd6
2017-05-05 14:25:43 -04:00
Selim Cinek
7b9605b79c Added a new API to colorize notifications
Ongoing notifications can now be colorized.
This will use the color provided as the background
and invert most text colors

Test: runtest -x cts/tests/app/src/android/app/cts/NotificationTest.java
Bug: 34469375
Change-Id: I818e8db96c868d8bcde8f28c253efd581eeccaa2
2017-01-25 15:31:53 -08:00
Julia Reynolds
bb983d20d2 Use internal volume controller and status bar.
Remove code that let these components be replaced by external
processes.

Bug: 33006669
Bug: 34106436
Test: manual. reboot device, play music, change volume,
view notifications
Change-Id: I458f11537ab9db6f23735487513815553004613f
2017-01-06 15:59:45 +00:00
Chris Wren
5e6c0ffd3e Create a global registry for system message IDs
Port all system UI notifications to use the registry.  Retain stable
integer IDs where they exist. Assign new stable IDs where resource IDs
were previously used.

Using "message" rather than "notification" since we may eventually
want to include dialogs and toasts.

Bug: 32584866
Bug: 30995038
Test: runtest systemui
Change-Id: Iec4d7cebbd88683e339ada29a279315222699942
2017-01-06 09:22:02 -05:00
Jason Monk
26bc8996c8 Add notifications for incorrect plugin versions
Test: runtest systemui
Change-Id: Ic59a583202a8a20fbfc6fb504e6ab60ecc71ce78
2017-01-04 15:57:30 -05:00
Andrew Sapperstein
9625b4fce1 Merge changes from topics 'thermal-notif-2', 'thermal-notif'
* changes:
  Add VR mode check for thermal notification
  Show notif when device reaches throttling temp
2017-01-04 19:18:24 +00:00
Selim Cinek
f082fe2319 Made it easier to use updatable Animators
The existing system is extended such that AnimationProperties
can be easier animated and running animations updated.

As a first sample this animates the scale of the
icons in the shelf.

Change-Id: Ic88e8094d53f37ab13f5e9e00796b63d229a5114
Test: runtest systemui
Bug: 32437839
2016-12-21 12:12:31 +01:00
Andrew Sapperstein
b7caf1d06d Show notif when device reaches throttling temp
Adds logic to SystemUI that shows a notification alerting the user
that their phone has reached a certain temperature and has throttled
itself in order to cool down.

The logic is controlled by a configuration resource:
R.bool.config_showTemperatureWarning. If false, no action is taken.

When true, PowerUI checks every 30 seconds if the current temp of
HardwarePropertiesManager.DEVICE_TEMPERATURE_SKIN is greater than
the throttling temp of HardwarePropertiesManager.DEVICE_TEMPERATURE_SKIN.
If any one of the temperatures returned is greater, a notification is shown.

Clicking on the notification will show a dialog explaining more details
about what the device is doing in response to the high temperature.

The notification will disappear once the temperature drops below
the throttling temperature.

In order to check the temperature in SystemUI, HardwarePropertiesManager
has been updated to also allow any calls made by callers holding the
signature-level DEVICE_POWER permission.

Test: runtest systemui
Bug: 30995038

Change-Id: I1b3f122341911c68e90c8a49ad35267ac382b356
2016-12-20 18:19:03 -08:00
Selim Cinek
c40c79ac66 Added the possibility to animate X and refactoring
A viewstate can now animate its X value.
This also refactors the animation logic such that
an application when an animation is running will
update the existing animation nicely.

Test: manual, observe views animating in X
Bug: 32437839
Change-Id: Ic091d87e530af793281ca3f2b1e9370ff5dac236
2016-11-28 13:44:31 -08:00
Winson
ce9630da86 Tweaking accessibility actions for dock divider.
- Adding tl_full/70%/50%/30%/rb_full

Bug: 27724715
Change-Id: Ie3125ec81e6463696cf56640c6b86f9cfcbda945
2016-04-19 14:46:24 -07:00
Selim Cinek
c317933a91 Fixed fading and dozemode for custom notifications
The custom notifications were fading really ugly when they
had a dark background like media notifications, because
it was fading from dark to dark.
Now this background is shared for both custom views which also
reduces overdraw for them.

In addition does the doze mode now work much nicer because we're
only fading them to greyscale instead of inverting.
This also fixed an issue where legacy custom notifications with
a dark background were colorful during doze.

Bug: 19437552
Change-Id: I87798da9ac11b9abfe4470b6ca53b555da3aa629
2016-03-04 17:03:34 -08:00
Selim Cinek
dafa00cb98 Merge "Transforming notifications now based on the user dragging" into nyc-dev 2016-02-25 19:42:25 +00:00
Selim Cinek
8f2f6a67fa Transforming notifications now based on the user dragging
The animation is not a canned animation anymore but base on
the finger movement of the user.

Bug: 19437552
Change-Id: I0f81ac2ff05a92673e3f3b9b72a5c2de238890d0
2016-02-25 11:02:30 -08:00
Jorim Jaggi
88afd020b6 Accessibility for split-screen divider
- Add label
- Add actions

Bug: 27274494
Bug: 26894949
Change-Id: I041c44f793f1ec86ec27951cc8e87868148b527d
2016-02-25 13:18:12 -05:00
Selim Cinek
277a8aa409 Replacing alpha with shadowAlpha
Change-Id: I1fc75e395321d77fb959dd3e8ce520bd8378cfeb
2016-01-26 15:30:28 -08:00
Selim Cinek
587cbf30a7 Remove the scale animation from the lockscreen
With fullbleed notifications don't scale anymore when clicked.

Change-Id: I75fadb5e6ccb7f12ca8fc1cb9459c6d9576f4abd
2016-01-26 15:30:28 -08:00
Selim Cinek
646d2054dd Improved notification transformations
All views are now faded, even if they are not handled specially

Change-Id: I2970548667e0388984098293ac0dfcbdbed12df1
2016-01-21 19:42:49 -08:00
Selim Cinek
4ffd63611a Changed the transformation from when switching notification views
Change-Id: I2af3c2f36787d208be7745dabae96903df256156
2016-01-21 19:42:49 -08:00
Selim Cinek
5104a6db2e Fixed the animations on the notification scrims
When pulling down on a heads up notification the scrim would
fade in from 0 instead of fading to the new position.
The old behavior didn't work if the heads up notifications were
big, so we had to change it in order to always have a scrim.

Change-Id: I9ae387b75136c9240d863e06a8649c85b3c6c9dc
2016-01-21 19:42:49 -08:00
Jorim Jaggi
83eb6bb5d8 Improve motion for wake-and-unlocking while pulsing
- Move all fingerprint related to logic in on central class in
SystemUI that knows all the state of the UI so there is exactly ONE
place in which we decide what to do when we acquire a fingerprint.
- When pulsing and we get a valid finger, we fade the contents of the
Keyguard out and fade the scrim out almost the same way as we would do
in a normal wake-and-unlock sequence.
- Hide shadows while dozing, so we don't see the artifacts when we fade
the dozed Keyguard out.

Bug: 23225107
Change-Id: I82f78e61f2530cf7d507ade80f6f0a340c082567
2015-08-18 17:57:10 -07:00
Selim Cinek
0fccc729fd The heads up now correctly dissapears when clicking
Bug: 22729955
Change-Id: I977b36823bf936baab527f932b1e5576241f4d71
2015-07-30 23:05:42 +00:00
Selim Cinek
aac932591d Added the heads up scrim back
Also fixed a bug where the notification panel would
keep a hardware layer.
Also improved the interal structure of the HeadsUpManager

Change-Id: I635e4a89b0a32573c26515cc3e65e142d77593ec
2015-04-15 13:14:27 -07:00