Commit Graph

15852 Commits

Author SHA1 Message Date
Jason Monk
cdec5ff9f4 More dimming tweaks (for accessibility)
- Don't dim when battery saver bar is showing.
 - Bump alpha by 10% for light nav bar

Test: manual
Change-Id: I296aa68c0904f7972dd941eb1aac3b4c71114eee
Fixes: 63630024
2017-11-08 21:06:30 +00:00
Daniel Sandler
17efe6be85 Merge "Give fg services a shelf life before they go bad." into oc-mr1-dev 2017-10-27 14:39:01 +00:00
Dan Sandler
9830b5a8e4 Give fg services a shelf life before they go bad.
When a fg service starts (as indicated by its presence in a
NOTE_FOREGROUND_SERVICES notification), we note the service
start time (as encoded in Notification.when in ActivityMgr).

SysUI will suppress the dungeon (foreground service
disclosure) notification until 5 seconds have elapsed since
the earliest service start time. After that, if the service
is still running, the disclosure will be shown.

Bug: 67819284
Test: runtest -x frameworks/base/packages/SystemUI/tests/src/com/android/systemui/ForegroundServiceControllerTest.java
Change-Id: I5b6df95eb673e2f551aaa3ecc5a7df617f815a90
2017-10-27 14:35:53 +00:00
jackqdyulei
4b7f43bcae Reuse the BluetoothBatteryDrawable in QS detail
BluetoothBatteryDrawable creates the drawable lazily using
the latest(and most correct) context. So it could get the
correct color from the theme.

Also add iconScale field in BluetoothBatteryDrawable so the size
of the battery icon could be scaled.

Bug: 67377756
Test: Manual - connected to bluetooth headphone and open the qs
page and detail page. Retest it after changing it to dark theme.
Change-Id: Ic6c871985a89a503221755eed4bc2605ab53f630
2017-10-19 11:43:54 -07:00
TreeHugger Robot
859f8c4a21 Merge "Fix incorrect colors for CustomTile in QS" into oc-mr1-dev 2017-10-18 13:20:43 +00:00
Evan Laird
b3daf2b88c Fix incorrect colors for CustomTile in QS
Add support for Supplier<Icon> in QSTile.State, allowing a method for
CustomTile not to cache the drawable for its IconViews. This fixes the
problem that the ImageViews in QQS and QS were trying to use the same
drawable and putting it in a bad state.

Test: Add 3rd party tile to first position in QS and turn on/off; visual
Change-Id: I408d6391a718fcb3f847e72bd303551d2d004dbb
Fixes: 67356768
2017-10-17 16:00:29 -04:00
Jason Monk
2044e6e377 Auto-dim refinements
- Don't auto-dim while wallpaper is showing
 - Up alpha to 60%

Change-Id: Ie5fc33279ca46f7de37befacbbd7b42b7d4e5d15
Fixes: 67735001
Test: manual
2017-10-16 11:21:38 -04:00
TreeHugger Robot
43aca9cdc8 Merge "Fixed problem where scrim transition would be cancelled" into oc-mr1-dev 2017-10-11 02:55:29 +00:00
Lucas Dupin
5909d0134d Fixed problem where scrim transition would be cancelled
Change-Id: I089e499bfaf524898f5156aecaf098c94b9a1b2b
Fixes: 64077859
Test: send notifications, look at AoD
2017-10-10 17:35:46 -07:00
Brad Ebinger
ad545464c2 Merge "Fix NPE when removing PIN locked SIM during E911 call" into oc-mr1-dev 2017-10-10 17:14:35 +00:00
Brad Ebinger
3311859a48 Fix NPE when removing PIN locked SIM during E911 call
There is the possibility of mCallback being null while
the Keyguard still has a PhoneStateListener registered
for onSimStateChanged callback. This can cause a NPE.

Bug: 66986066
Test: Manual, PIN/PUK locked SIM
Merged-In: Id8ca403a839cff994970c370973a91e8e5688722
Change-Id: I799c9521f787e800e259c3bdce9edee3f844f5f3
2017-10-09 22:46:13 +00:00
TreeHugger Robot
c856aa18e3 Merge "Decreases likelihood of AoD flickering" into oc-mr1-dev 2017-10-09 18:01:54 +00:00
TreeHugger Robot
3f0dd94efc Merge "Fixed an issue where added icons were white in multiwindow" into oc-mr1-dev 2017-10-07 17:34:40 +00:00
Lucas Dupin
5322dae530 Decreases likelihood of AoD flickering
The transition from display power modes isn't tightly coupled
to the AoD lifecycle. We rely on a timeout to show and hide
the sysui scrim. In this case we increased it.

Change-Id: I13a0d33205c9f904afced63f231176151aee15c4
Fixes: 64077859
Test: receive notificaition in AoD, observe.
2017-10-06 15:24:52 -07:00
Selim Cinek
887da3cf3a Fixed an issue where added icons were white in multiwindow
Because it wasn't laid out yet, icons would appear white.

Change-Id: I9338966299de253f36ae325553e82b76defe3b9d
Fixes: 66711268
Test: add icon with light statusbar in multiwindow, icon looks normal
2017-10-06 13:40:31 -07:00
Selim Cinek
942aaf5ae8 Merge "Fixed a bug where the order of the icons was wrong" into oc-mr1-dev 2017-10-06 16:09:29 +00:00
Selim Cinek
138590588b Fixed a bug where the order of the icons was wrong
Because the normal order would not factor in the
yTranslation.

Change-Id: Ie37b69ee5187c4f4bd58f90d8297cf73b7a4ed53
Fixes: 67017075
Test: swipe through notification in statusbar, observe right ordering
2017-10-05 17:16:57 -07:00
TreeHugger Robot
eb7aba16d2 Merge "Hides the statusbar in recents for low ram devices" into oc-mr1-dev 2017-10-05 00:34:02 +00:00
Matthew Ng
27b3b2bc1b Hides the statusbar in recents for low ram devices
When entering recents on a low ram device, the system will hide the
statusbar to match the spec (go/android-go-recents).

Test: manual - enter recents
Bug: 67346921
Change-Id: I180899560aa1379b0a68cf63ae9b780fdef1746d
2017-10-04 15:14:10 -07:00
Matthew Ng
d2eb55d098 Fixes rounded corners for clear all button on low ram devices
Fixed rounded corners for clear all button by using a themed
background color on a shape with rounded corners instead of
programmatically changing the background color.

Change-Id: Iaaf4f0d94d417b0064c7e6bf4895b49d9fa6561f
Fixes: 67368134
Test: manual - go to recents and scroll up to show clear all button
2017-10-03 22:57:26 +00:00
Chris Wren
21a2e72655 measure snooze UI use more precisely
Bug: 67003813
Test: runtest systemui
Change-Id: Id7ba68c8308e911cd506943f84c034ade21d1514
2017-10-03 13:01:15 -04: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
TreeHugger Robot
d81e99a963 Merge "Disable long-press home Orb animation." into oc-mr1-dev 2017-09-29 22:28:15 +00:00
TreeHugger Robot
6141d9e54d Merge "enable experiments for AOD timeout" into oc-mr1-dev 2017-09-29 18:09:36 +00:00
Jason Monk
1ff77669e1 Don't show no sim when a sim has been detected.
Instead indicate a lack of signal until we have a subscription to
tell us what to show.

Test: updated existing tests
Change-Id: I170f3782597584e5e761b5c9f9fce3cdbdc26a4f
Fixes: 65744290
2017-09-29 11:17:05 -04:00
TreeHugger Robot
20e1c66a78 Merge "NotificationPlayer: fix race conditions" into oc-mr1-dev 2017-09-29 05:34:50 +00:00
TreeHugger Robot
1b8e47aebf Merge "Ensure that the thumbnail path is valid even without a thumbnail." into oc-mr1-dev 2017-09-28 22:13:47 +00:00
TreeHugger Robot
69e9500606 Merge "Use QS context when creating the bluetooth battery indicator" into oc-mr1-dev 2017-09-28 20:26:58 +00:00
Jean-Michel Trivi
0260938aba NotificationPlayer: fix race conditions
This patch fixes two race conditions that affect the Looper used
  to signal the completion of a notification to abandon audio focus
  as well as the wakelock used between issuing a playback
  command and its actual start. Annotations are added to clarify
  which objects are used to synchronize which methods and variables.

Looper for notification playback completion:
  Before a notification starts playing, audio focus is requested,
  which causes the ducking of media apps. When the notification
  completes, audio focus is abandoned. If a new notification is
  to be played while one is playing, the current player is
  stopped and the Looper on which we expect the MediaPlayer
  completion callback is .quit(). But there is a race condition
  between the quitting of the current Looper whenever a sound
  is started (in startSound()) and when quit when playback
  is stopped (command STOP), and when created in
  CreationAndCompletionThread.run(). If the Looper is quit
  when another notification starts to play, the completion
  callback cannot be received, and audio focus will not be
  abandoned.
  The fix consists in synchronizing all access to mLooper
  on mCompletionHandlingLock.

Wakelock:
  Initializing and acquiring the wakelock, and releasing it
  are done in different threads (client thread vs CmdThread).
  There was no memory barrier between the initialization
  and release. The fix consists in making all wakelock
  operations synchronized on mCmdQueue.

Test: issue multiple notifications that interrupt eachother, verify focus is abandonned (in logs, check "abandonAudioFocus()")
Bug: 65866087
Bug: 64531811

Change-Id: Ie8f4091eaa96bd0bcb732e27423f6e31e76da98e
2017-09-28 12:21:18 -07:00
Chris Wren
baff9f03c1 enable experiments for AOD timeout
Bug: 67009600
Test: runtest systemui
Change-Id: I5505b69051a55608b3c3803c48dd51603845e9c9
2017-09-28 15:17:05 -04:00
Winson Chung
97376cfe08 Ensure that the thumbnail path is valid even without a thumbnail.
- When there is no thumbnail snapshot, an empty sized thumbnail path is
  created since thumbnailWidth/Height are zero.  Instead, like the parent
  class, the path should default to the view width/height in such a case.

Bug: 66938643
Test: Launch PlayMovies video anew, go home, then to overview
Change-Id: I354ff0716ee44149f50ff11fa435161cf466c0cc
2017-09-28 10:13:31 -07:00
TreeHugger Robot
88c6071b5d Merge "Handle clear all button show and hide functionality for low ram devices" into oc-mr1-dev 2017-09-28 02:27:04 +00:00
Matthew Ng
9e177f05ea Handle clear all button show and hide functionality for low ram devices
Hides the clear all button at the beginning and shows it when scrolling
the list up or when swiping an app away. The clear all button will not
hide when already shown. Users can also start the scroll gesture over
the clear all button to scroll the list.

Test: manual - use low ram device and go to recents and scroll
Change-Id: Ie2d22db9bdd66308ce8ef3acf77b9f707d638ade
Fixes: 65571889
2017-09-27 17:10:46 -07:00
Evan Laird
4673c381fa Use QS context when creating the bluetooth battery indicator
SysUI context doesn't know about the dark theme change when trying to
set the tint on the BluetoothDeviceLayerDrawable, so change the icon to
one that isn't cached so it can use the QS context and use the right
tint when in dark mode.

Test: set dark background, visual
Change-Id: If9255e2d2155ebcd355ddf26f06385e73aab68d6
Fixes: 66497162
2017-09-27 13:00:50 -04:00
Winson Chung
37b202492e Minimal change to ensure that position is last saved when docking.
- When a task is docked from Recents, the last position is never updated
  if the user never touches the divider.  Ensure that the default dock
  snap target is saved in this case as well.

Bug: 66903645
Test: Dock a task from Recents, go home, and hit recents
Change-Id: Ia229d2ba0eee792424fb9e9c043320cec71695dc
2017-09-27 09:59:28 -07:00
Rajeev Kumar
3e0843038d Disable long-press home Orb animation.
Bug: 64814158
Test: Tested manually.
Change-Id: I8a33e302e26211be77b4ee2e0d36f438cfccd383
2017-09-26 13:02:36 -07:00
Evan Laird
9b120d5a08 Merge "Fix wifi tile animating full-dark when slashing/unslashing" into oc-mr1-dev 2017-09-26 14:09:09 +00:00
Adrian Roos
73c93f02f7 Merge "FRP: Add config flag for disabling credential FRP" into oc-mr1-dev 2017-09-25 18:33:01 +00:00
Adrian Roos
2adc263ce9 FRP: Add config flag for disabling credential FRP
Bug: 65258606
Test: Verify FRP still works when not disabled
Change-Id: I78e308b6eaba73c794615b1eebdbfacb334ae72f
2017-09-25 13:32:48 +02:00
Kevin Chyn
3e3e05c933 Merge "Swipe for notifications should work when navigation occludes keyguard" into oc-mr1-dev 2017-09-22 00:07:16 +00:00
Kevin Chyn
20a68dcefb Swipe for notifications should work when navigation occludes keyguard
Fixes: 65780650

Test: 1) Enable FP swipe
2) Start navigation
3) Turn off screen
4) Turn on screen
5) Swipe for notifications should work while maps is on top of keyguard

Change-Id: I5d8c75db940bfdfa4e29643c1ba89a119ec6a954
2017-09-21 11:41:04 -07:00
Evan Laird
6026b057e7 Fix wifi tile animating full-dark when slashing/unslashing
WifiTile now owns a specific tile view that will animate the tint/alpha
of the slash but not the underlying drawable. Becasue we always animate
from the disconnected icon <-> disabled icon, this fixes the problem
where the disabled icon will start off as full-dark and appear to flash.

Fixes: 63534380
Test: turn wifi on/off; runtest -x
tests/src/com/android/systemui/qs/AlphaControlledSignalTileViewTest.java

Change-Id: I824572fdf00e122b7c17104b727171d81ff104c5
2017-09-21 14:11:00 -04:00
Winson Chung
66f2d56556 Merge "Ensure profile-specific PiP notification is shown." into oc-mr1-dev 2017-09-21 16:38:16 +00:00
TreeHugger Robot
204346c277 Merge "Revert "Increased the text size for colorized notifications"" into oc-mr1-dev 2017-09-21 01:29:53 +00:00
Selim Cinek
a6ee4bd1bc Revert "Increased the text size for colorized notifications"
This reverts commit 299b3302ef.

Change-Id: Id887bd37f8f7b0c1ff48c339c9d59491f65cae84
Bug: 35925915
Fixes: 66067974
2017-09-20 23:03:12 +00:00
TreeHugger Robot
8e84dfec6a Merge "DND alert info set to INVISIBLE (not GONE) to retain formatting." into oc-mr1-dev 2017-09-20 16:02:46 +00:00
David Stevens
9282193c84 Merge "Handle showWhenLocked on secondary displays" into oc-mr1-dev 2017-09-20 00:09:04 +00:00
Winson Chung
85d3c8a8f8 Ensure profile-specific PiP notification is shown.
- Pipe through user id when an activity is pinned, to ensure we show the
  right notification with the correct profile badge that launches into the
  correct profile's PiP settings.

Bug: 65417722
Test: Enter PiP for work profile app, ensure that it shows the notification
      for that profile, and launches the profile-specific PiP settings.

Change-Id: I62b8e1b23cb81bfc60c93f452cf950ab06cbf32d
2017-09-19 14:06:01 -07:00
Beverly
e28c94f98e DND alert info set to INVISIBLE (not GONE) to retain formatting.
Change-Id: I182aed5f48d4c2a935a7bfbb9a240046b27dea58
Fixes: 64688590
Test: Manual based on repro steps
2017-09-19 19:01:50 +00:00
David Stevens
67c036b1ba Handle showWhenLocked on secondary displays
The keyguard has windows on the default display and the remote display
selected by MediaRouter. Keyguard occlusion only applies to the default
display. To make the activity showWhenLocked flag work on secondary
displays, pass the display id of the locked secondary display from the
SystemUi to KeyguardController and make its isKeyguardShowing method
take a displayId.

Test: android.server.cts.ActivityManagerDisplayTests
Test: #testSecondaryDisplayShowWhenLocked
Bug: 64994006
Merged-In: Ib31fc76e9df469e97a59a181f09d457ceed4ef5f
Change-Id: Ib31fc76e9df469e97a59a181f09d457ceed4ef5f
2017-09-19 18:15:43 +00:00