380 Commits

Author SHA1 Message Date
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 9d3dcdfe1c15ffa1c8d3694a4f2bf5e2280aa5ba.

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
TreeHugger Robot
db53fb0816 Merge "resolve merge conflicts of e86b78a57404 to master" 2017-02-18 01:15:08 +00:00
TreeHugger Robot
6e82080513 Merge "Move Badging from ScoredNetwork to NetworkingBadging." 2017-02-18 01:14:04 +00:00
Colin Cross
af736c9e99 resolve merge conflicts of e86b78a57404 to master
Test: none
Change-Id: I8bf02f8198d003c4453cc59b7a3bccdff688ca15
2017-02-17 15:05:37 -08:00
Colin Cross
3c2c2764d4 Merge changes I82aa8140,Ib62a5dd6,I2c4d64e2
am: 313e645801

Change-Id: Ia10d20ea4ebabc2cc84524950dec7570104b185f
2017-02-17 22:25:53 +00:00
TreeHugger Robot
91e5d7fa99 Merge "Remove locked user tasks if starting overlay fails" 2017-02-17 13:40:43 +00:00
Robin Lee
1d996bd7fc Remove locked user tasks if starting overlay fails
This is a more graceful failure case than giving up and just letting
the task show unmodified on the screen if something goes wrong.

Test: runtest -x WorkLockActivityControllerTest.java
Bug: 31001762
Fix: 31064912
Change-Id: I505c00f411f41fb927c31d2280bdeda69e15b4d4
2017-02-17 10:48:43 +00:00
Colin Cross
254a418e97 Enable multidex for SystemUITests
Test: builds
Change-Id: I82aa81405f635165716c39191082836dae8ce819
2017-02-16 17:34:45 -08:00
TreeHugger Robot
2b71a6d54f Merge "SystemUI: Disable LeakReporterTest" 2017-02-16 17:45:29 +00:00
Adrian Roos
4fb1f51978 AOD: Refactor DozeMachine to allow waking up
Bug: 30876804
Test: runtest -x $ANDROID_BUILD_TOP/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java
Change-Id: I1d01ab5d8ba3c1bf7b11b0b4911b25f3416ca6e9
2017-02-16 01:19:38 +01:00
Adrian Roos
09ed8f6cfc SystemUI: Disable LeakReporterTest
Those tests are slow because they dump the
heap multiple times.

Disable until the code is refactored such that
it does not actually dump and write to disk
when under test.

Test: runtest systemui
Bug: 35398375
Change-Id: I7cf945687900424dc1460367fbef5f36ed75da82
2017-02-16 00:56:45 +01:00
Jason Monk
d7937b3488 Merge "New system for versioning sysui plugins" 2017-02-15 20:49:05 +00:00
Jason Monk
4cfd8c740d Fix test failures on treehugger?
Test: runtest systemui
Change-Id: I0660729aade05cd63b240eed13ed9d5c9ff8de91
2017-02-15 13:52:47 -05:00
Sundeep Ghuman
699deaf610 Move Badging from ScoredNetwork to NetworkingBadging.
This is a non-functional refactor. The old enums will be removed once
ag/35323372 is addressed.

Bug: 35114358
Test: Ran existing tests (see files touched).
Change-Id: I08fd8c7964463b5908ce361e61f8fe811d0ff6f3
2017-02-14 14:04:18 -08:00
TreeHugger Robot
291c9078e6 Merge "Percentage text now sits alongside the battery icon." 2017-02-14 21:55:38 +00:00
Dan Sandler
055bb61426 Percentage text now sits alongside the battery icon.
The old embedded percentage (introduced in change I6a3e7409) is hard
to read at status bar size, so we now draw it in a separate TextView to
the left (start) of the battery gauge. (The embedded code remains so
that it can be used by other places where the battery is drawn larger.)

The old system setting "status_bar_show_battery_percent" is still used
to control whether this percentage is shown, but note that it now
applies only to BatteryMeterView (i.e., the status bar) and not other
usages of BatteryMeterDrawable.

Bug: 32539932
Test: (manual) adb shell settings put system status_bar_show_battery_percent 1
Change-Id: Id298dba544f594b11269539284a2e8042fd4780b
2017-02-14 14:47:28 -05:00
Robin Lee
3cb867326a Merge "Theme work lock activity with the task primaryColor" 2017-02-14 18:38:14 +00:00
Robin Lee
3c82d3d5bf Theme work lock activity with the task primaryColor
This involves adding another system RPC, getTaskDescription(taskId)
gated on MANAGE_ACTIVITY_STACKS permission.

Bug: 31001762
Test: runtest -x frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/WorkLockActivityTest.java
Change-Id: Ieb996f7fab5bc79737df570e35733551118118d3
2017-02-13 23:22:34 +00:00
Geoffrey Pitsch
7c4f39b856 Merge "Updated Inline Notification Controls" 2017-02-13 17:47:33 +00:00
TreeHugger Robot
f49f3482de Merge "Partial revert of "Disable StatusBarTests due to flakes."" 2017-02-13 16:34:51 +00:00
Adrian Roos
02de498b0e Partial revert of "Disable StatusBarTests due to flakes."
Only disable the flakey metrics tests. The other tests in
this class are fine. Also use @Ignore instead of commenting
out @Test.

This reverts commit 63b55435e8406f3235876da2e672fc8d890fc7c2.

Change-Id: I023e63be18dba3659cabe4db9ae1245ccafe835c
2017-02-13 16:19:58 +00:00
Adrian Roos
4f2b3fe0a1 Merge "SysUiLeaks: Add GarbageMonitor" 2017-02-13 15:06:15 +00:00
Adrian Roos
9125068a99 SysUiLeaks: Add GarbageMonitor
Adds a service for monitoring the amount of tracked garbage.
If it exceeds reasonable levels, a notification with a leak
report is posted.

Test: runtest systemui
Change-Id: Ib55281f2aac557743b97c46bc616688261c72e9c
2017-02-11 21:57:10 +01:00
Jason Monk
a8e72d463c Merge "Move Keyguard to SystemUI" 2017-02-11 00:37:39 +00:00
Geoffrey Pitsch
63b55435e8 Disable StatusBarTests due to flakes.
Looks like it relies on some global state.

Test: runtest systemui
Change-Id: If4add9e551bbaef5580df2532f937345c9e69d32
2017-02-10 13:37:03 -05:00
Geoffrey Pitsch
df44b606f3 Updated Inline Notification Controls
Removed old xml resources, strings, dimens, etc
Different behavior when sent from the default channel.
Display how many notification categories are used by the app.
Group label when channel is associated with group.
Add package icon.
Fix tap-away-to-save behavior

Test: runtest systemui
Change-Id: Ib41a536a5c4e7c7747a2453eddc3b4b4b99ffa7a
2017-02-10 13:24:54 -05:00
Jason Monk
23f85ec14d Move Keyguard to SystemUI
Test: make
Change-Id: I3abb67e2b022737d2aa0226bb07f3966ad68fff7
2017-02-10 07:45:58 -08:00
Adrian Roos
3b172ba054 Merge "Dependency: Make non-class dependencies type-safe" 2017-02-09 22:29:02 +00:00
Adrian Roos
09c43c8743 Dependency: Make non-class dependencies type-safe
Introduces a new DependencyKey<V> type which allows
referring to non-class dependencies in a type-safe
way. This also improves performance because we no
longer need to perform string comparisons.

Test: runtest systemui
Change-Id: Idc948855a85a1899be41e7f0170c40e73e525024
2017-02-09 21:23:04 +01:00
Jason Monk
5bec68fbea New system for versioning sysui plugins
Use annotations to handle the multi-dimensionalness of interface
versions, but still maintain compile time inclusion of current
versions.

Test: runtest systemui
Change-Id: I0789a72112cf6630a6406f76020071c8a6d9e24c
2017-02-09 09:32:20 -08:00
Jason Monk
28d5d220cc Switch fragment tests to use TestableLooper
Test: runtest systemui
Change-Id: Iccbbaca2ef02cb3f5b08eef66c6c939e4ec2a5eb
2017-02-09 09:30:42 -08:00
TreeHugger Robot
df185d7502 Merge "avoid race condition on very fast tests" 2017-02-09 16:46:53 +00:00
Jason Monk
7898e87be2 Merge "Add better method test handlers/loopers in sysui" 2017-02-09 15:43:19 +00:00