Invisible by default, not activatable when the platform
volume controller is active.
However, when the platform volume controller is not active,
it can be enabled via a broadcast intent.
When enabled, the status bar icon also changes to a single
dnd icon.
Very little more than embedding the existing zen mode panel
into the detail pane of a new QS tile.
Change-Id: I1e0ff6fbb99b00f67b53bceda8cbf121f3ef6b52
The public API of HeadsUpNotificaitonView was not well suited to the
new requirements, so it changed slightly.
Old API:
- showNotification: show or update a notification
- clear: close the window and forget the notification
- release: send the notification to the shade and forget about it.
- releaseAndClose: release and close the window
- dismiss: clear the notification if clearable, or release it
New API:
- showNotification: show a new notification
- updateNotification: show a new version of the same notification
- removeNotification: respond to a cancel
- release: send the notification to the shade at some point
- releaseImmediately: send the notification to the shade right now
The new API makes updating vs. posting and removing vs. releasing more explicit.
There is a new internal concept: lingering. The heads up lingers
after an event that would have closed it if the minimum visibility
time has not been satisfied. In the case that the notification was
deleted, the heads up may be visible, but mHeadsUp will be null. In
this case, touches on the notification views are disabled.
More responsibility for control of the heads of policy was moved into
the HeadsUpNotificaitonView class. This should continue on master.
Some changes to support testing.
Added a test to cover all the edge cases for minimum visibility time:
1. extend visibility when canceled too soon
2. extend when updated with a low-priority version, fast update.
3. extend when updated with a low-priority version, slow update.
4. don't extend the visibility in any other case
TODO: Policy parts of HeadsUpNotificationView should be split out
into a separate HeadsUpNotificationPolicy class, and even more of the
policy should be lifted from status bar that new class.
Bug: 17878008
Change-Id: I192419d0685dd022ee7edcd792e346a4f39c6adb
Don't assume the pickup sensor will perform a proximity check before
starting to pulse. This will add some latency, but necessary if
we can't trust the sensor.
Bug: 19083596
Change-Id: I51b7daf5ed76b2780ec5c949a75cc1fca247ddad
- Introduce a maximum number of items to be shown in QS detail view
depending on the device configuration.
- For Wifi and Cast, make the panel exactly that height as we would
show the maximum count of items, in order to prevent that the
buttons jump around.
Bug: 18665311
Change-Id: I7c0c383a902d295f1b486b8a074e15b990fbe562
- Downtime: Allow user to enter downtime early, offer as an end
condition four hours before downtime starts. Available in
either none or priority, regardless of settings configuration.
- Downtime: Always exit before next alarm if zen=none.
- Downtime: Make more like any other condition provider, remove
special status (mostly).
- Downtime: New auto-triggering rules, allow triggering after a
manual condition ends, once.
- Decouple NextAlarm + Downtime providers, allow them to offer
their conditions at the same time.
- Downtime/NextAlarm: Update conditions if they change while being
requested, even if unsubscribed.
- Make all three built-in condition providers optional, via config.
- New internal helper for runtime config.
- Don't follow changes to next alarm, consider the condition false.
- Isolate downtime calendar logic into separate class (for testing).
- Allow a:bb -> a:bb as a valid downtime range (all day).
- Volume dialog: configuration establishes maximum number of visible
conditions, including built-ins.
- Zen mode panel: avoid widget updates during layout transition.
- Zen mode panel: move controller callers to background thread.
- Zen mode panel: hide/show/rebind rows instead of adding/removing.
- ZenLog: Add downtime autotrigger results.
- Volume panel: Smarter refresh on ringer/zen changes.
Bug: 16373455
Change-Id: I4f801018ddb0beb6eb9fa03a81c79f7949888a3f
Pulse immediately, assuming the pickup sensor will not fire
if prox=near. Perform a non-blocking additional proximity check
in these cases purely to collect verification diagnostics.
Also tweak the interpolator for pickup pulses to ramp up more
quickly.
Bug: 18373928
Change-Id: I8607f4b37435722e293db741c273914183cec7be
Decrease the pulse duration when pulsing for pickup.
Add an option to skip the proximity check entirely, but don't
turn it on yet.
Bug: 18373928
Change-Id: I54f8dee004229193a18d488759bf797a16470cab
- Decouple condition requests from expansion, now
pre-request when zen panel unhidden.
- Animate zen mode panel expansion.
- Improve default selection logic, ensure something
is selected as soon as we are in the expanded state.
- Tweak visual spacing.
- Map null condition to Indef properly when we start
out in zen.
- Avoid unnecessary condition teardown when the conditions
are updated but unchanged from current.
- Cap number of optional conditions to display, default=3.
Bug: 18335618
Change-Id: I007b7c3b2e75e2b42805af240684aa8581e9951a
- Use shape drawable for pin background instead of asset.
- Includes fix for scrolling regression when task stack scroller was not reset.
Change-Id: I11eec1f3b0386b4354c8c5e3deca2b17cff83be1
- Add icon above text to all three zen mode states, update text style.
- Remove zentoast.
- Update shared borderless rect background, masks now support shapes.
- Update size of volume stream icons.
- Ensure all volume icons are expressions of white.
- Make volume icons testable via new demo mode command.
- Add a divider + secondary icon to access the notification slider.
- Animate the transition when accessing notification slider.
Bug: 18206097
Bug: 16303068
Bug: 18102850
Change-Id: I5eb6f820dc317e89be272cc78f6c80ed969ad5e9
This change animates the status bar and the bottom area when exiting
doze mode from touch. We also prevent all animations when exiting
from other means, i.e. usually when the power button is pressed, so
we don't have a distracting animation there. In addition, this also
optimizes the scrim animations a bit in terms of interpolation and
duration to make the experience smoother and cleans up some logic.
Bug: 18146441
Bug: 17717584
Change-Id: I495ce480c25de24b6433adebdfe923b637d98f66
Can now disable the default volume dialog in SystemUI with
a standard product overlay.
Bug: 17753150
Change-Id: I305015dbfc40cde2428fa593c89af0f4568e1b74
- Fix regression with launching an affiliated task due to clipping changes (Bug 17755902)
- Tweaking previous changes to home transition
- Disable the debug mode option
It turns out that the optimization to disable glClear + draw scrim
with SRC is not good for all devices, so this CL adds a config flag
to revert to the old behavior.
Bug: 17673806
Change-Id: Ic4e0177f2d6fcf4448755d0be66e8fbef2d15ab5
If the user selects a new zen mode, display a quick toast
with the mode icon + text to aid in association.
Also fix a recent regression in the zen subhead alignment.
Bug:16215680
Bug:17641211
Change-Id: I4ead88d81be4d9c26459aed82c47b8c2fb32eafa
The taskviews now avoid overdraw by clipping invisible
parts. Also adapted some timings of the animation.
Bug: 17455301
Change-Id: Ifbf7bab363e530cb2ad842baed50fc16dcfcc4c4
This saves us a lot of memory and we avoid the clipToOutline.
The view still looks the same, as we now draw the thumbnail
in a rounded rect.
We now only use a hardware layer on the header, which is much
smaller.
Bug: 17522143
Change-Id: I197a1172efe8450ffb0b537c780a240d38f84275
Ensure the pickup is registered a safe period of time after the
last notification before resetting the notification pulse schedule.
Bug:17496795
Change-Id: I0edc9bcbdf078cbf55df5935744a3eee7e902b5d
When dozing and buzz-worthy notifications arrive, don't follow
the LED logic with periodic pulses.
Instead, follow a simple decay schedule after the initial arrival,
pulsing only at 10s, 30s, 60s, and 120s.
The schedule is reset when a new notification arrives, but only
for the first three times, until either the pickup sensor is
triggered or the device exits doze.
Also:
- Make the notification trigger configurable.
- Centralize existing sysprop configuration into DozeParameters.
- Decouple vibration from debugging, make separately configurable.
- Remove "delayed" pulse concept, fold into new schedule.
Bug:17496795
Change-Id: I64fc1c862bcfa1c288a4fd91c9d17e3bff245add
Limit the thumbnail count to a maximum of 10 thumbnails and the app
icon count to a maximum of 20 thumbnails, instead of using a
byte-size based limit.
Also prune entries immediately when leaving recents.
Bug: 16513124
Change-Id: Id9a32f87ca3f9f19e5cad5f115d54b19b26f4f93
Use the framework doze brightness configured for this device
when pulsing, instead of a separately configured value.
Bug:17409425
Change-Id: Icadc00d6c20909375d4ab726ec254dbafd997ead
Instead of pulsing every 30 seconds to mimic the LED, use
a function that pulses more frequently for new notifications,
decaying to a slower pulse, and eventually stopping.
Specifically, the step function for the interval is:
- 10 seconds for the first minute
- then 30 seconds until the five minute mark
- then 60 seconds until the 30 minute mark
- then no pulsing at all
- Since we pulse more frequently on new notifications, remove
the "multi-pulse" concept.
- Move all doze-related duration parameters to a new helper,
backed by config, overridable by sysprops, include in dump.
- Wake up from dozing when hitting volume keys during a pulse.
-
Bug:17393939
Change-Id: Ica86f08b25c738338fced165c77faf3dfccd0343
- When selecting "None" in the dialog, remove the footer warnings
about alarms, and associated bits.
- Update subhead text for "None".
- Keep track of how often "None" is used (defined as a user change
during a visible dialog session) and color the subhead text
with the warning color until it's been used five times.
Bug:17283115
Change-Id: Ief8a1c557716ec2f581b8338511432d17ac0d371
- Ensuring that we consistently load activity icon, title and color for both full and shallow stacks
- Adding activity info caches when loading the stacks
- Should not be scaling pin icon when launching from pin
- Tweaking snap-back, over scroll, and shadows
Change-Id: I556b93562bb2c69e4c25ce787a7a34532ab706ca
The max limit is now 100 (or 50 on svelte devices), and that is
what everyone used.
Re-arranged things so we have a big expensive "fix the world!"
function for recents that we go in to at only select points:
when first initializing the system, when external storage comes
and goes, and if we detect something wrong with the recents
structure.
With that, now getRecentTasks() and addRecentTaskLocked() are
generally much simpler, doing very little work in most cases.
This will help a lot with scaling up to many more recents
entries.
Change-Id: I7b5ae89edc06568f68c8af54a4420aff7635581c
- Reverting changes to the existing thumbnail transition to prevent breaking applications
that currently depend on that transition. As a result, we need to create a new, hidden,
aspect-scaled thumbnail transition, and instead use that thumbnail to animate the
recents header so that we don't have to wait to do that inside the Recents activity.
In order for this to work, we also have to ensure that the thumbnail surface destruction
is synchronized with the application that is currently closing (when going down to
recents) or opening (when coming back up). The current thumbnail is destroyed when the
animation ends, but that can be at least 1 frame before the surface for the animating
window is destroyed. We change this by deferring destruction of this thumbnail window
to the animation that is being closed.
Especially on the way up, not having to wait for us to hide the header before doing the
transition up can save us the duration of that first animation (> 100ms).
- Other optimizations:
* No longer creating a new stack view on each transition to calculate the target rect
* Removing unnecessary call to get the thumbnail when transitioning up/down (the actual
window does its own animation.
* We reduced numerous system calls per task by adding a flag to ignore home-stack tasks
and caching the activity label and icon (and task description icon). These caches
follow the same eviction schemes as the thumbnail and icon cache.
- Also tweaked the touch slop for the nav bar swiping gesture to prevent conflicting with
tapping on home (Bug 17109581)
Change-Id: Ica697aad788051a9203edd9351c583e1cb038a71