Commit Graph

159 Commits

Author SHA1 Message Date
Sundeep Ghuman
d57f324776 Update Status Bar with Badged Wifi Icons.
This change inserts badged wifi icons into the status bar to indicate
historical network strength. The existing callback handler was modified
to explicitly pass the drawable as currently the icon is a rendered from
two separate resources, composited together in a LayeredDrawable.

Badging is controlled by Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED
and can be enabled from the Wifi Settings page.

Bug: 34056846
Test: runtest --path
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerWifiTest.java
Change-Id: I33b736d4543e380887513cbb5937f49945794c09
2017-01-24 15:18:32 -08:00
Julia Reynolds
924eed1ca6 Add updatable fields to Ranking
- NotificationChannel
- Badging

Test: runtest systemuinotification & cts

Change-Id: I7fd1f2dc06148927e9a4bd5b760d436e2c5e8a98
2017-01-24 08:43:38 -05:00
TreeHugger Robot
70a1a72eff Merge "PhoneStatusBar: Add test for executeRunnableDismissingKeyguard with null runnable" 2017-01-23 23:27:59 +00:00
Adrian Roos
ef7a402268 PhoneStatusBar: Add test for executeRunnableDismissingKeyguard with null runnable
Adds a regression test for NPEs around executeRunnableDismissingKeyguard when
a null runnable is passed.

The bug was fixed in I89477a8a0067e285e5d0122e918fac45274c57ad.

Fixes: 33489225
Test: runtest systemui
Change-Id: Ia8981bc4c2a1a0f6d8c48e6d66e2af801d6cddac
2017-01-23 13:43:59 -08:00
Jason Monk
20ff3f9255 SysUI fragments: Integrate new support for constructing
Use a new system for constructing fragments so they can be swapped
out in place maintaining state. This will allow easier integration
with plugin lifecycle as parents who have child plugin fragments
can depend on the class existing and won't have to listen to
the lifecycle.

Test: runtest systemui
Change-Id: I517f4ce3d114abd49b1b5baca388d19e929b8f90
2017-01-23 16:28:03 -05:00
Jason Monk
9c7844cb91 Work on sysui dependencies
One of the many problems with PhoneStatusBar is that it holds
dependencies for many other parts of SysUI. Fix this by creating
a static method of grabbing dependencies that are global to sysui
this cleans up a lot of chains of interdependence.

Also add easy way to inject mocks of these dependencies for the
purpose of testing.

Test: runtest systemui
Change-Id: Ia0e947faea62d15b665facada47ac9916c99f895
2017-01-23 12:55:53 -05:00
Jason Monk
a075479746 Merge "Fix crash from AssistManager" 2017-01-19 20:39:16 +00:00
Jason Monk
865246dc9a Fix crash from AssistManager
It expects to have onConfiguration called at least once, so
make sure it has.

Test: runtest systemui
Bug: 34377261
Change-Id: Iba980b020ef2c175c7ffebedf946edb282be464c
2017-01-19 14:47:45 -05:00
Adrian Roos
e18033cbb9 Notifications: Clear animation start visible type when not animating
Fixes an issue where the animation start visible type could
be stale if the animation was cancelled.

Bug: 30876804
Test: runtest systemui
Change-Id: I8e6ac6ba0bcd785f980b22529d83ba86da744f00
2017-01-18 13:21:02 -08:00
Adrian Roos
64f13a56a4 Merge changes Ib6de3aa3,Idc46d1b2,I889e3864,I9a50ee57,I411f08ae, ...
* changes:
  AOD: Use heads-up state instead of buzzBeepBlinked
  AOD: Do not animate shelf icons when changing ambientness
  AOD: Show ambient versions of notifications
  AoD: Reposition shelf under clock
  AoD: Adjust shelf, only show top notification
  AoD: Adjust clock layout
2017-01-18 19:34:38 +00:00
Adrian Roos
4b820e4e5e AOD: Use heads-up state instead of buzzBeepBlinked
Bug: 30876804
Test: runtest systemui
Change-Id: Ib6de3aa33c0bbe004b9e4070817860efbe886161
2017-01-17 16:52:35 -08:00
Selim Cinek
70c5c30afa Merge changes Ic5ceb729,I51fab5be,Id7abd858,Ic5fce695,I14a75cd6, ...
* changes:
  Fixed the interactivness of the shelf on the keyguard
  Follow up fixes for expandhelper
  Fix guts not expanding when QSPanel is expanded
  Fixed an issue where the setVisibility wasn't annotated
  Fixed a crash when a notification is updated
  Improved the performance of the shelf / scrim
  Fixed a caching issue where icons could stay greyscale
2017-01-18 00:46:00 +00:00
Jason Monk
49fa016a98 Move navigation bar logic to its own class
Start hacking away at PhoneStatusBar by trying to pull out
as much NavigationBar logic as possible.

Test: runtest systemui
Change-Id: I23b904428be31b91f0747fd60c9f6e0dd323eb44
2017-01-17 10:31:13 -05:00
Selim Cinek
2b6eb803ef Fixed a caching issue where icons could stay greyscale
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarIconViewTest.java
Change-Id: I61a86c67b14ffcd469a1126f7e285fc3b9ea629d
Fixes: 33942177
2017-01-13 13:35:14 -08:00
TreeHugger Robot
97d9813245 Merge "Add one-shot plugin support" 2017-01-11 19:35:22 +00:00
Geoffrey Pitsch
4e7ae02ce0 Do not select an importance for unspecified notifications
Test: runtest systemui-notification
Bug: 34164846
Change-Id: I4988ce26264853fd9ab84ae02e995641edf933cd
2017-01-11 12:48:09 -05:00
Jason Monk
59d86ed2a8 Add one-shot plugin support
Should have happened a while ago.

Test: runtest systemui
Change-Id: I0da4deb5c297e8030213810815a408364ec97e14
2017-01-11 11:29:17 -05:00
Jason Monk
b5b0920170 Allow CommandQueue to have multiple callbacks
Allow for multiple callbacks to be added to CommandQueue.
This will allow PhoneStatusBar to be broken up into pieces
that make more sense.

Test: runtest systemui
Change-Id: I73a7da1c23c8e45a291e5957e7341f3930abc334
2017-01-09 12:51:56 -05: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
Lei Yu
c71f5b34ce Merge "Add TileColorPicker to remove hardcoded tile state color" 2017-01-03 22:15:11 +00:00
jackqdyulei
76471a5d9e Add TileColorPicker to remove hardcoded tile state color
1. Remove hardcoded color qs_tile_tint_* in colors.xml
2. Add tint_color_selector.xml which uses colorForeground and alpha
to tint.
3. Use TileColorPicker to grab tile state colors from
tint_color_selector.xml and provide them to customTile and BatteryTile

Bug: 32592245
Test: make -j40 SystemUITests
Change-Id: Ie5fc828c3c6d4e1f192643592c034f462fae5313
2017-01-03 11:21:59 -08:00
Geoffrey Pitsch
4dd5006ff5 Change Notification Inline Settings for Channels
Removes slider advanced settings.
Move more Guts internals out of BaseStatusBar.

Test: runtest systemui
Change-Id: I0cf7f144859d1248bd54e281cfe0b35a817376a6
2016-12-28 10:13:02 -05:00
Selim Cinek
45e63815e7 Merge changes Ic88e8094,I4253bf4b,Iba4ebd3c,I943b6352,If88c0b08, ...
* changes:
  Made it easier to use updatable Animators
  Improved the interpolators of the icon appearing
  Modified the way icons merge into the shelf
  Fixed a potential heads up crash
  Fixed a bug where the notifications would close on back
  Bye bye veto button
  Only requiring 2 taps for accessibility on lock screen
  Fixed a bug where systemui could crash
  Introduced the visual stability manager
  Removing notifications always immediately when swiping them away
2016-12-21 12:23:05 +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
a7d4f82c05 Introduced the visual stability manager
Notifications used to roam around and reorder whenever
they wished. Those little beasts must be tamed, hence
a new visual stability manager is introduced that
dictates the terms of their interplay.

Test: manual: add heads-up and see if they correctly appear
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/notification/VisualStabilityManagerTest.java
Bug: 32442500
Change-Id: I8d7596fa7c14e0df68459a77d445f618d517ad51
2016-12-20 13:19:36 +01:00
Jason Monk
3cfedd78b1 Speed up sysui tests
Shave a few seconds off the tests by adding capabilities to
TestableContext and removing mocks from some large classes
(like Context and PhoneStatusBar)

Test: runtest systemui
Change-Id: Ib9c30cf895bd9f24a5a26e24ffe2498ca6fe2f6e
2016-12-19 16:06:38 -05:00
phweiss
9e450e1233 Rework Device Monitoring Dialog in Quicksettings
If a device owner is active, the layout is changed from a
standard AlertDialog with only one string to a custom dialog
that includes information on Device Owners, and VPN and Network Logging,
if enabled.

BUG: 29748723
BUG: 33126622
Test: Manual, CTS-Verifier tests will be added later

Change-Id: I2bfca9d9d02a42d9c3b17683625eda29e9369666
2016-12-19 17:53:00 +01:00
Manu Cornet
cfcbf118b2 Merge "Delete the separate grid recents activity and related code" 2016-12-17 02:23:25 +00:00
Manu Cornet
8e17342610 Delete the separate grid recents activity and related code
Bug: 32101881
Test: Made sure everything builds & boots on sw600dp device and checked recents
Change-Id: I1236a1ec5f5d2f485d9825c39702130bbfc243ca
2016-12-16 16:31:19 -08:00
Adrian Roos
a1b19a2c39 Merge "Doze: Fix crash when suppressing pulse" 2016-12-17 00:07:02 +00:00
Adrian Roos
cd139a6df1 Doze: Fix crash when suppressing pulse
Fixes a crash due to an overzealous state validation.

Change-Id: I363c13206c890a2be56615663f89d80ac256a991
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java
Fixes: 33463320
2016-12-16 12:56:07 -08:00
Jason Monk
b1ca4f84e4 Merge "Turn on dexmaker sharing classloaders for sysui tests" 2016-12-16 20:34:26 +00:00
Jason Monk
556cfb6a36 Turn on dexmaker sharing classloaders for sysui tests
This will allow us to mock package private things. It also happens
to speed up the tests, a lot.

Test: runtest systemui
Change-Id: I48f39ee282a4ea3163c642c8290f302428c4a5f4
2016-12-16 14:01:25 -05:00
Jason Monk
1a80b03595 Merge "Switch sysui to updated mockito target" 2016-12-15 20:15:49 +00:00
phweiss
9d945d90a4 Add implementation of isNetworkLoggingEnabled to FakeSecurityController
Fix build breakage introduced by ag/1666505.

Test: Did a local build.

Change-Id: Ie3c2d8cc89f71583b546a6085c3f991e0affaa61
2016-12-09 17:49:31 +01:00
Philipp Weiß
9498f5a81b Merge "Add network logging icon to Quicksettings when enabled" 2016-12-09 16:31:41 +00:00
Jason Monk
26ad85a646 Switch sysui to updated mockito target
Some updates required for tests to pass. Also did a little cleanup
of bad verify matching.

Test: runtest systemui
Change-Id: I75b9f34ab7e9af111dafd5a648840893e1cee434
2016-12-08 15:32:13 -05:00
Jason Monk
89377bb609 Fix sysui crashlooping
Fix startup lifecycle on header.

Test: runtest systemui
Change-Id: I732cc2fb6693b9857c14534154d02a9b18e7d44a
2016-12-08 15:32:07 -05:00
Jason Monk
9abca5e9f8 Cleanup and refactoring of test utilities
- Make leak checking faster by converting to fakes
    - Requires making clean interfaces for all CallbackControllers
 - Integrate leak checking into the TestableContext

Test: runtest systemui
Change-Id: Ic57a06360d01a0323ef26735a543e9d1805459e2
2016-12-08 11:41:59 -05:00
phweiss
a4e169ed68 Add network logging icon to Quicksettings when enabled
Add the network logging icon in Quick Settings' footer if
network logging is enabled, possible next to the VPN icon.
Quicksettings has to be able to tell that network logging
is enabled, so this CL changes DPM.isNetworkLoggingEnabled() to be
callable from the device owner or from any app with the MANAGE_USERS
permission.

The icon is only a placeholder until the official icon is finished.

CTS Verifier tests will be added when all Network logging UX changes are
done.

BUG: 33126618
BUG: 29748723
Test: runtest --path frameworks/base/packages/SystemUI/tests
Change-Id: Ib35d323605ab11f883a4b6199d1db79b9e53c49b
2016-12-08 16:34:25 +01:00
Bartosz Fabianowski
b272e91202 Merge "Link from Quick Settings to Enterprise Privacy page" 2016-12-06 15:09:31 +00:00
Bartosz Fabianowski
46bea2e685 Link from Quick Settings to Enterprise Privacy page
This CL updates the information shown in Quick Settings when a device
is managed by a Device Owner and adds a "learn more" link that takes
the user to the Enterprise Privacy page in Settings.

Bug: 32692748
Bug: 25779452
Test: runtest --path frameworks/base/packages/SystemUI/tests &
      runtest --path frameworks/base/core/tests/coretests

Change-Id: I8cbb6f2bb5c6da29ae581b6dcf7a01b1a4f2af2b
2016-12-06 08:13:30 +01:00
Adrian Roos
b84dc1866a DozeMachine: Improve resilience against out-of-order pulse requests
Fixes a class of bugs that arise from requesting to pulse at
inopportune times. Also improves logging such that we know what
state transition failed to validate.

Test: runtest -x frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java
Change-Id: If0bbe003c4805fd180d013dadbc28addc5bb0dd4
Fixes: 32869355
2016-12-05 22:09:25 +00:00
Bartosz Fabianowski
5f045007e0 Add enterprise disclosure to Keyguard screen
With this CL, a disclosure text is shown on the Keyguard screen when
a Device Owner is managing the device.

Bug: 32692748
Test: runtest --path frameworks/base/packages/SystemUI/tests

Change-Id: I7a48df7dc010c39b2db94fcd26b75313a7ceee08
2016-12-01 10:36:18 +01:00
TreeHugger Robot
d25cf04e98 Merge "Add explicit method to dismiss Keyguard" 2016-11-29 14:30:46 +00:00
Manu Cornet
e138bd1955 Change the task layout to better match mocks, add "in" animation
This only adds an animation when transitioning into recents. "Out"
animations will come later as they need to be run in parallel with
launching the activity not to introduce any latency.

Test: Open recents on sw600dp device, check recents layout/animations
Bug: 32101881
Change-Id: I367f8e5c106cd06d2a7833c165ecb960a7821ed9
2016-11-23 14:48:30 -08:00
Jorim Jaggi
241ae10b21 Add explicit method to dismiss Keyguard
The flag is a bit clunky for most cases, and a method is more
clear.

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
android.server.cts.KeyguardTests

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
android.server.cts.KeyguardLockedTests

Test: runtest systemui -c
com.android.systemui.keyguard.DismissCallbackRegistryTest

Bug: 30961403
Bug: 27422134
Change-Id: I39de90c7cfecd99350a74f72cd76418e337f2b79
2016-11-23 16:27:35 +01:00