Commit Graph

269 Commits

Author SHA1 Message Date
TreeHugger Robot
b40c82f230 Merge "Move out test utilities to a Testables library" 2017-03-15 00:55:20 +00:00
Adrian Roos
af45b60e90 Fix flakey KeyguardIndicationControllerTest
The test in question would pass only when the device was
not charging, because the KeyguardIndicationController registers
itself with the KeyguardUpdateMonitor and shows indications when
the device starts charging.

Fixed by not registering the controller with the KeyguardUpdateMonitor
and instead driving the controller's callback directly.

Change-Id: I6828a97a36572be9e7520ce9a82afddf474d4008
Fixes: 36211361
Test: runtest -x frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java -m transientIndication_releasesWakeLock_afterHidingDelayed
2017-03-14 14:21:40 -07:00
Jason Monk
340b0e5216 Move out test utilities to a Testables library
Test: runtest --path frameworks/base/tests/testablets/tests
        && runtest systemui

Change-Id: Ideef4aef5f26136b1741c556b9be5884f38842a0
2017-03-14 17:17:54 -04:00
Geoffrey Pitsch
164c648d18 @Ignore for KeyguardControllerTest
transientIndication_releasesWakeLock_afterHidingDelayed is slightly
flaky.

Test: runtest systemui
Bug: 36211361
Change-Id: I0e71c445efae54c45cca418653a8d6df2888d722
2017-03-14 10:52:58 -04:00
Maurice Lam
95628d6d25 Merge "Add permission to show notification during setup" 2017-03-10 21:14:58 +00:00
TreeHugger Robot
1eb124656d Merge "Fixed a bug where the increased height wasn't applied correctly" 2017-03-10 03:22:16 +00:00
Selim Cinek
10790672a9 Fixed a bug where the increased height wasn't applied correctly
The wrong value was used for the increased heads-up and the
increased contentViewHeight.

Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationinflaterTest.java
Change-Id: Ia72b2de890d89d4cffb40eaa653a62f426945451
2017-03-09 17:15:12 -08:00
TreeHugger Robot
eb6d731fc5 Merge "re-enable StatusBarTest tests" 2017-03-10 00:19:23 +00:00
Adrian Roos
7446235e7d Merge changes Ie17eedfd,Icb80843a,If1619c10,Iee23682a
* changes:
  AOD: Add wakelock for charging text while dozing
  AOD: Show charging status on AOD1
  AOD: Fix default for always-on setting
  Revert "Revert "AOD: Refactor always on configuration""
2017-03-09 23:25:56 +00:00
Chris Wren
fd57db6ead re-enable StatusBarTest tests
Also fix a broken test by passing the fake
logger deeper into the status bar.

Bug: 35138327
Test: runtest --path frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
Change-Id: I74dda6fbcf1e48d9723cd0e7f63eff4a5e561338
2017-03-09 17:51:19 -05:00
Adrian Roos
c1b50324a2 AOD: Add wakelock for charging text while dozing
Also refactors the WakeLocks in SystemUI.

Bug: 30876804
Bug: 35850304
Test: runtest systemui
Change-Id: Ie17eedfd266deb3aa46dabd701bc784330b2e030
2017-03-09 14:31:24 -08:00
Adrian Roos
22a905eef1 AOD: Fix default for always-on setting
Change Ic35bd3c04d150fd3eb85d76db0043880b31a011f mistakenly
flipped the default to on. Change it back to off.

Test: runtest -x frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/DozeConfigurationTest.java
Fixes: 36027947
Change-Id: If1619c10f8cc269f2dd852e166ac959e6c9c590a
2017-03-09 13:25:59 -08:00
Adrian Roos
0261fb2a19 Revert "Revert "AOD: Refactor always on configuration""
This reverts commit cdcc5c438949ce3d942c95204555680e080c17ed.

Bug: 36027947
Change-Id: Iee23682a9d82f930484c3f4c15d99f21a0f1bc36
2017-03-09 13:25:59 -08:00
Chris Wren
ef3199040f more testable MetricsLogger interface
Begin migration to non-static methods to allow easier mocking.
New clients should use the non-static methods.
Old clients that want to unit test metrics
should move to the new interface.

Bug: 35138327
Test: runtest --path frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
Change-Id: I168f3787ee50ddde8aa2d42c05b2b816d1d3a30e
2017-03-09 14:41:10 -05:00
Maurice Lam
132710e389 Add permission to show notification during setup
Add a priviledged permission NOTIFICATION_DURING_SETUP which together
with the existing Notification.EXTRA_ALLOW_DURING_SETUP will allow a
notification to be shown during setup.

Test: Added NotificationDataTest
Bug: 34705874
Change-Id: I7215acf4017ad897294c69abf63a7f2e5d556f31
2017-03-09 11:08:30 -08:00
TreeHugger Robot
35035f6066 Merge "Add version of @UiThreadTest that works at class level" 2017-03-09 03:00:43 +00:00
Selim Cinek
f72baf17fc Merge changes I6823a613,I7763b473
* changes:
  Fixed a bug where the low-priority header wasn't cleared
  Fixes an issue where the notification header could be invisible
2017-03-08 19:04:19 +00:00
Jason Monk
ba3643290d Add version of @UiThreadTest that works at class level
Saves a bunch of lines of tagging every test with @UiThreadTest

Test: runtest systemui
Change-Id: Id565dbe6bf1ae3dd7b3b23c507d1b3c386a36974
2017-03-08 09:15:48 -05:00
Selim Cinek
6fd06b5b80 Fixed a bug where the low-priority header wasn't cleared
For notification groups, the header could not be removed
properly leading to overlapping text.

Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/statusbar/stack/NotificationChildrenContainerTest.java
Change-Id: I6823a6137655e9266e46eb33dc33c0ceaee1f45c
Fixes: 36006673
2017-03-07 17:06:15 -08:00
Selim Cinek
1826d98381 Fixes an issue where the notification header could be invisible
It's not actually necessary to set the visibility of the notification header
since it is actually in the ChildrenContainer which already handles the visiblity.
This existed from legacy times where it was outside of the viewgroup.
When animating the headers, this could actually lead to blank headers.

Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/statusbar/ExpandableNotificationRowTest.java
Change-Id: I7763b47340a347ed44fc9ce34a98f74c7e55ef8d
Fixes: 35993698
2017-03-07 15:27:09 -08:00
Adrian Roos
805dfb836a Merge "Revert "AOD: Refactor always on configuration"" 2017-03-07 20:53:25 +00:00
Adrian Roos
c45944b680 Revert "AOD: Refactor always on configuration"
This reverts commit 28d26a821f.

Bug: 36027947
Change-Id: I3d4c2e58b753120ff668a4594f60692abc6a3426
2017-03-07 20:21:47 +00:00
TreeHugger Robot
4540811b4d Merge "AOD: Refactor always on configuration" 2017-03-07 04:40:30 +00:00
TreeHugger Robot
8729c7e2b7 Merge "Fixed a crash when creating a public notification group" 2017-03-07 02:01:07 +00:00
Selim Cinek
2ffa02fcbb Fixed a crash when creating a public notification group
The method whether it was showing an icon was wrong

runtest -x packages/SystemUI/tests/src/com/android/systemui/statusbar/ExpandableNotificationRowTest.java
Fixes: 35981843

Change-Id: Ieffeb7480960586fc644e04baaa0c28e98df7736
2017-03-06 16:11:08 -08:00
Jason Monk
e5b770e47d Updated QS UI
- Adds footer to QS which contains the date/alarm info
   and all touch targets (settings, edit, etc.)
 - Swaps out emergency + carrier text on cell tile for a
   standard CarrierText from lock screen in the header
   to make the header only contain status info.
 - Add dividing line
 - Work on animations

Test: runtest systemui
Change-Id: I97dfea1b1ea7006b53eb61ac3a1f942c64dd282d
2017-03-04 20:02:09 -05:00
Jason Monk
702e2ebf9f Add plugin API for individual QS tiles
This will allow prototyping of individual QS tiles and/or their
visual representation without having to write a plugin for the
entire panel. This will allow quick iteration on QS UI + dual
target tiles.

Test: Install plugin using new API
Change-Id: I05ca9d9f5a200a1dad2c3582251a36edb5cb9aba
2017-03-04 16:01:26 -05:00
TreeHugger Robot
bb80cfa7a7 Merge "Fix qs tiles disappearing when leaving edit" 2017-03-03 22:26:21 +00:00
Adrian Roos
28d26a821f AOD: Refactor always on configuration
Moves the AOD configuration helper to the framework such that it is
available outside SystemUI

Bug: 30876804
Change-Id: Ic35bd3c04d150fd3eb85d76db0043880b31a011f
2017-03-03 14:25:36 -08:00
Evan Laird
6b28473635 Fix qs tiles disappearing when leaving edit
On presenting the customizer view to edit quick settings tiles, the
tiles were fetched in background threads (2 different ones). If the user
then managed to dismiss the view too quickly, a save would occur before
all tiles were loaded and they would disappear. This change coerces
tiles to load on the same background thread and allows the customizer
view to know when that operation is complete. Thus, it can save only
when it knows that all possible tiles were loaded.

Fixes:35556395
Test: runtest -x SystemUI/tests/src/com/android/systemui/qs/customize/TileQueryHelperTest.java
Change-Id: Ie232d3c28645d38aad97a8763b7418e6b044b5cc
2017-03-03 10:34:36 -05:00
Julia Reynolds
d528684373 Allow resid notification channel group labels.
Test: cts, runtest systemui, runtest systemui-notification, manual
Change-Id: I9e7b43c97fd04057e1a2614876af958cc2f40a99
2017-03-02 21:08:31 +00:00
TreeHugger Robot
c231d5fd72 Merge "Fix emergency only edge case" 2017-03-02 21:01:53 +00:00
Jason Monk
8996b94e57 Fix emergency only edge case
When the default sub id doesn't exist and there is only one other
sub id currently, assume that is meant to be the default and use
that to pull emergency state.

Also switch to SparseArray for performance and betterness.

Change-Id: I976de6abb58c46bce0c56793442c0377a39a7071
Fixes: 34119642
Test: runtest systemui
2017-03-02 14:00:05 -05:00
Julia Reynolds
77f5317003 Merge "Allow translatable channel names." 2017-03-02 17:50:10 +00:00
Jason Monk
28cc166060 Disable flaky test
Don't have a fix yet, disable to avoid any unwanted flakes.

Bug: 35866797
Test: runtest systemui
Change-Id: I8865253fbb58f619eb23d1c24c4370e819c58a29
2017-03-02 10:57:36 -05:00
Julia Reynolds
5a31193497 Allow translatable channel names.
Bug: 35336590
Test: runtest sytemui runtest systemui-notification, manual
Change-Id: I1e6ebbcc36cab22ab9b2dfde505a68513544ef52
2017-03-02 15:48:12 +00:00
TreeHugger Robot
3f80513733 Merge changes Ic4370fa8,I81c43329,Ic563a8fe,I6d4be770,I858d1c95, ...
* changes:
  Fixed a bug where a wrong notification could be visible
  Fixed a bug where the icon would dissappear
  Continued low-priority group implementation
  Fixed an issue where the minimum height wasn't applied correctly
  Worked around a bug where the view could render blank
  Fixed another memory leak
  Creating the right views for low-priority group children
  Move the inflation away from the statusbar
2017-03-02 00:52:52 +00:00
Selim Cinek
414ad33470 Continued low-priority group implementation
Adapting the low-priority group implementation
according to spec. Expanding a group takes 2 taps now.

Test: add low-priority group observe behavior
Change-Id: Ic563a8fe0e71df746b9b548adc8d1698940b1a83
Fixes: 35125708
2017-03-01 13:15:08 -08:00
Christine Franks
69c2d1d752 Add QS tile for Night Display when first used
Bug: 30994985
Test: runtest systemui, and manual - verify that the quick settings
panel does not have a Night Display quick settings tile, then turn
Night Display on and verify that the tile has appeared. Multiuser
does NOT work and is tracked separately.

Change-Id: I997b4ca7952016fc703a6bb777e500f4eccce189
2017-03-01 20:35:06 +00:00
Jason Monk
ec34da8f6f Add method for plugins to reference global dependencies
The new annotation versioning system allows plugins to share common
global interfaces that can be versioned on their own. To facilitate
this add a static method for plugins to get a hold of dependencies.
To get any dependency a plugin must @Requires it so it can be version
checked.

Test: Plugin that uses the new call.
Change-Id: I8e01260f8fbc14465502d506a7aa08212795ad9b
2017-03-01 13:26:01 -05:00
TreeHugger Robot
80999f790b Merge "New system for plugin + tuner integrations called extensions" 2017-02-24 20:02:03 +00:00
Jason Monk
1d9632df97 New system for plugin + tuner integrations called extensions
An ExtensionController provides an easy way to say I need an
object of interface X. Then a plugin or a tuner factory can
actually provide X when needed or fallback to a default implementation.

Test: runtest systemui
Change-Id: I5e1b76def3c790d7f673867648ffeb13c4d0a829
2017-02-24 12:51:51 -05:00
TreeHugger Robot
38a65f6c56 Merge "Fix roaming getting stuck after changing sims" 2017-02-24 16:51:41 +00:00
Jason Monk
9ec0f1eca4 Fix roaming getting stuck after changing sims
The header was keeping a map of roaming states which could have
stray old subids in it when it shouldn't. It just needs to be
cleared when the sims change.

Test: runtest systemui
Change-Id: If61b9b5f376daecc49f483b679378c5968a1501c
2017-02-24 10:07:28 -05:00
Jason Monk
eb527bccf8 Merge "Revert "Fix roaming getting stuck after changing sims"" 2017-02-23 20:33:04 +00:00
Jason Monk
99c405a35c Revert "Fix roaming getting stuck after changing sims"
This reverts commit 9d3dcdfe1c.

Change-Id: I21739f73548be383221b1bec81a05e196fe0a690
2017-02-23 20:32:24 +00:00
Jason Monk
40d199fc48 Merge "Fix roaming getting stuck after changing sims" 2017-02-23 20:14:43 +00:00
Jason Monk
0288de0e56 Fix data disabled icon from not showing in status bar
The NetworkController seemed to think the user wasn't set up since
the DeviceProvisionedController didn't send an initial callback
on add.

Also add some extra listening to data disabled state to avoid race
conditions there.

Change-Id: I17f759894a283da08eb0da7ceb5181355c8f4d55
Fixes: 35708363
Fixes: 35632846
Test: runtest systemui
2017-02-23 14:51:17 -05:00
Jason Monk
9d3dcdfe1c Fix roaming getting stuck after changing sims
The header was keeping a map of roaming states which could have
stray old subids in it when it shouldn't. It just needs to be
cleared when the sims change.

Test: runtest systemui
Change-Id: I62c5acab5739b9c4acf69a8c7e00b2f75de903dc
2017-02-23 13:29:52 -05:00
Adrian Roos
26d8184d46 AOD: Don't use doze states when unsupported
Bug: 30876804
Test: runtest -x $ANDROID_BUILD_TOP/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenStatePreventingAdapterTest.java
Change-Id: Iff09aef0733e30f13723208ff4e7605d40449bb2
2017-02-21 21:39:50 +01:00