Commit Graph

176 Commits

Author SHA1 Message Date
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
TreeHugger Robot
8068bfeae2 Merge "Doze: Fix WakeLock bug" 2016-11-17 20:57:33 +00:00
Adrian Roos
ae0c5e8d2c Doze: Fix WakeLock bug
Change-Id: I3d687bbf82173723c420058867531a970d1f46cb
Fixes: 32857549
Test: runtest -x $(gettop)/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java
2016-11-16 20:15:09 -08:00
Jason Monk
3713151425 Merge changes I52007c69,I6503947e,Icf677f4a,I2ae7ed61
* changes:
  Unit testing for fragments.
  Plugin fragment support
  Move QS to a fragment
  Fragments in SysUI!
2016-11-11 16:38:57 +00:00
Jason Monk
8852905b0b Unit testing for fragments.
Set up a base class for testing fragments that will generate the host
and run the fragment through some lifecycle checks to make sure it
does ok with standard lifecycle.

Fragment tests will also automatically check for any sort of leaks
related to bindings, receivers, or other callbacks in sysui. This
requires changing the statusbar.policy classes with callbacks to
have a common interface.

Lastly also fixes a few lifecycle bugs in QS found from the above
tests.

Bug: 32609190
Test: runtest systemui
Change-Id: I52007c696c2fd41914bba4ba9d8055f2b564a7d8
2016-11-11 11:20:10 -05:00
Jason Monk
e97892844a android.provider.Setting test utilities
Add a way to fake values for settings in tests. Since the content
provider is cached in the NameValueCache, there is one static
FakeSettingsProvider that passes through all values to the
real SettingsProvider by default. Values that are required for
the test can be acquired and locked for the duration of the test
easily.

Test: runtest systemui
Change-Id: Ibc31ac8509fb31a22c522358a9c1bae6ec63553b
2016-11-11 09:52:17 -05:00
Manu Cornet
c6f261b750 Merge "2-dimensional Recents activity." 2016-11-08 02:24:42 +00:00
Adrian Roos
ff2c4563cd Doze: Refactor v1
Pulls appart UI, state, power, display and trigger management
into individual components controlled by a state machine.

Also adds tests.

Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java
Change-Id: I6ee7e79d58a5a3ebeb975775af44ad1e5aaccf93
2016-11-07 14:14:30 -08:00
Manu Cornet
1afcea499d 2-dimensional Recents activity.
This is a simple first version in the spirit of small, incremental CLs.
It is fully functional but the following will come in later changes:

* Split screen support
* Potential animations
* Alt-tab behavior
* Relayout on orientation changes

The new activity is only started when a specific system property is set.

Test: Locally on Ryu device. Added tests for layout logic.
Bug: 32101881
Change-Id: I550f6e7ea0de3937dbf80e5f0294676cfe567d47
2016-11-07 10:01:36 -08:00
Jason Monk
4f70b9cfd4 Faster plugin updating from UI control
Send a broadcast back and forth to speed up the rate at which plugins
are enabled or disabled.

Also update make files to handle exclude tests better.

Test: Manual
Change-Id: Ic8f45c663c3a5e5fd4b3e9e2f79480e155845c14
2016-10-28 10:13:56 -04:00