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
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
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
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
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
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
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
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
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
- 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
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
* 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
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
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)
The corners now animate nicely instead of just
jumping.
Bug: 69168591
Test: manual, swipe away notifications
Change-Id: Ia45774b1fed4d7b0a5cf2ec56ff1560ff685503c
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
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
- 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
These need a bit more work like length control and animations, etc.
but this is a decent start.
Test: visual
Change-Id: I750d777b2b4a19f8c586066712f5a3f7e79befd6
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
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
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
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
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
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
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
The animation is not a canned animation anymore but base on
the finger movement of the user.
Bug: 19437552
Change-Id: I0f81ac2ff05a92673e3f3b9b72a5c2de238890d0
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
- 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
Also fixed a bug where the notification panel would
keep a hardware layer.
Also improved the interal structure of the HeadsUpManager
Change-Id: I635e4a89b0a32573c26515cc3e65e142d77593ec