22 Commits

Author SHA1 Message Date
Jason Monk
baeb0dfccc Merge "Up the history on SignalControllers" 2015-02-17 15:25:35 +00:00
Jason Monk
7f9623f3dc Up the history on SignalControllers
Also add a test for it, because despite the comment next to it, I
try to set it to an invalid value...

Bug: 19201696
Change-Id: I3c12c871c73ad5ab15f39a6b91b29c71101adad6
2015-02-11 09:03:02 -05:00
Chris Wren
930eccaf44 Don't let the heads up close too quickly.
The public API of HeadsUpNotificaitonView was not well suited to the
new requirements, so it changed slightly.

Old API:
 - showNotification: show or update a notification
 - clear: close the window and forget the notification
 - release: send the notification to the shade and forget about it.
 - releaseAndClose: release and close the window
 - dismiss: clear the notification if clearable, or release it

New API:
 - showNotification: show a new notification
 - updateNotification: show a new version of the same notification
 - removeNotification: respond to a cancel
 - release: send the notification to the shade at some point
 - releaseImmediately: send the notification to the shade right now

The new API makes updating vs. posting and removing vs. releasing more explicit.

There is a new internal concept: lingering.  The heads up lingers
after an event that would have closed it if the minimum visibility
time has not been satisfied. In the case that the notification was
deleted, the heads up may be visible, but mHeadsUp will be null.  In
this case, touches on the notification views are disabled.

More responsibility for control of the heads of policy was moved into
the HeadsUpNotificaitonView class. This should continue on master.

Some changes to support testing.

Added a test to cover all the edge cases for minimum visibility time:
 1. extend visibility when canceled too soon
 2. extend when updated with a low-priority version, fast update.
 3. extend when updated with a low-priority version, slow update.
 4. don't extend the visibility in any other case

TODO: Policy parts of HeadsUpNotificationView should be split out
into a separate HeadsUpNotificationPolicy class, and even more of the
policy should be lifted from status bar that new class.

Bug: 17878008
Change-Id: I192419d0685dd022ee7edcd792e346a4f39c6adb
2015-02-04 17:16:16 -05:00
Jason Monk
a2bfc837cc Merge "Create SettingsLib" 2015-02-02 17:39:45 +00:00
Jason Monk
2ba4ce6a06 Create SettingsLib
This will hold common code that SystemUI and Settings (and others)
will share.

Bug: 19180466
Change-Id: I6614b31d6c3b0a2d426a2aa8ce66725245339d22
2015-02-02 11:33:17 -05:00
Jason Monk
18985e08eb Fix SysUI tests to pass.
Most were fixed by including the correct subscription id in the
broadcast.

The last was testing based on SIM card state which is not something
the MobileSignalControllers track anymore so I just pulled it out
completely.

Change-Id: Ie52068a3c8f8652f1b0641e6376696aeddda26a2
2015-01-29 15:58:23 +00:00
Jason Monk
da68f59628 SysUI: Separate SignalControllers into separate files
and remove the TODO that says to do it.

Change-Id: I54ac3f27f9246aea87d21f2a1da6608ae675aae6
2015-01-07 11:19:10 -05:00
Jason Monk
afeb044afc resolved conflicts for merge of 336c4666 to master
Change-Id: I350b3ecadce490b62c92c0e7b1d555825d035f87
2015-01-05 16:37:46 -05:00
Jason Monk
c014decc74 Don't unregister MobileSignalControllers still used
Also add some more testing for this section of code that manages
when MobileSignalControllers are added/removed to make sure we
are all good.

Bug: 18728593
Change-Id: I9902854c54d2e1deb58b38b7bd97dac1617831c0
2015-01-05 15:53:00 -05:00
Jason Monk
0adc69032d am f8dd5f6a: am a47f968d: Merge "Handle config changes in NetworkController" into lmp-mr1-dev
automerge: 89b75bd

* commit '89b75bdbf64416cfea39641a85bf6458212a32bf':
  Handle config changes in NetworkController
2014-12-12 18:56:18 +00:00
Jason Monk
7f8fab6fc3 am 10680627: am a6869700: Merge "Fix tests after inet changes in NetworkController" into lmp-mr1-dev
automerge: 19b6ae0

* commit '19b6ae0fe82913a9838a43f60ae330197d4ef978':
  Fix tests after inet changes in NetworkController
2014-12-12 18:55:04 +00:00
Jason Monk
3aaabd7124 Handle config changes in NetworkController
We need to remap or recalculate icons after a config change, so
configs based on mccmnc can update properly.

Bug: 18654943
Change-Id: I6a4c1debf9b266d486143b9869abb569bbc31aef
2014-12-12 11:56:11 -05:00
Jason Monk
d8e4bf4e43 Fix tests after inet changes in NetworkController
Bug: 17460017
Change-Id: Iee9c4399f5ca4413f1449cfcf05d72a67b0adadc
2014-12-12 10:26:43 -05:00
Jason Monk
22c6550206 am 5a938481: am d6b001f1: am 8d72046b: Merge "Don\'t show no sim icon on wifi devices" into lmp-mr1-dev
* commit '5a938481f3fc8c3e84d3ce07234363f4d6c26f40':
  Don't show no sim icon on wifi devices
2014-12-03 21:49:57 +00:00
Jason Monk
21d05a08d8 Don't show no sim icon on wifi devices
Bug: 18222975
Change-Id: I82143ad23fa6c4dc5ed57d682186e1bb977a6fe1
2014-12-02 13:43:43 -05:00
Leigh Anne
d0a6279af6 SysUI Tests: Added some tests for mobile icon.
Testing to verify correct mobile icon in edge cases such as no sim,
or no mobile data feature. Tests for updating the network name.

Change-Id: I0e4114d0c1e4109d4b2aae761181bedb841fe8b6
2014-12-02 11:21:53 -05:00
Jason Monk
b574627ebc SysUI: Actual MSIM status bar support
Expand SignalClusterView and NetworkController to handle multiple
SIMs.  It does this by creating multiple MobileSignalControllers
for each of the active subscriptions on the device.

Also some minor changes for followup on the NetworkController
refactor that went in before this.

Bug: 18222975
Change-Id: Ic7a857cfc5cadb46d51bb9ded0df8187eea799f7
2014-12-02 10:35:09 -05:00
Jason Monk
d2263cd9db SysUI: Refactor the NetworkControllerImpl
Minimal changes to interface/callbacks, all of the changes are
internal and prepare for MSIM.

Separate out AccessPoint and MobileData from the NetworkController
interface to give some space.

A SignalController class has been created as a base for both
WifiSignalController and MobileSignalController, both of which
internally handle the state of their respective connectivity and
only reach up into the NetworkControllerImpl when completely
necessary (such as for combined carrier label).

Bug: 18222975
Change-Id: I75b954bbece187371cdb8571dd8420e7d2cad978
2014-11-18 12:48:42 -05:00
Jason Monk
29f7a7b0ae SysUI Tests: Make tests not break SysUI
Now you can run the tests without getting the blank broken sysui.
The tests instrument themselves so they include all of the source
they need to run rather than piggybacking on the sysui process.

A couple of changes were needed for this.  The xml files cannot
reference com.android.systemui, instead they must use res-auto.
The tests can no longer make privileged calls, so some restructuring
to avoid those calls was needed.

Bug: 18222975
Change-Id: I67b794af854f1420583d48960bd6e52ca753b56d
2014-11-17 14:46:11 -05:00
Jason Monk
f13b4b39f2 SysUI: Add basic test coverage for signal levels
Add some tests that verify for varios wifi, and mobile signal
strengths and types that the correct icons are sent out in the
callbacks. Still in prep for MSIM refactoring.

Bug: 18222975
Change-Id: I477bf9a90e5c32fb1cba9c150ec6314f4b707108
2014-11-12 15:42:15 -05:00
Jason Monk
e0cdb6079e Prepare for testing the NetworkControllerImpl
This will allow us to add some test cases to verify that under
certain phone/signal conditions we get out the icons we expect.
This will let us break less things when refactoring for MSIM.

Bug: 18222975
Change-Id: I7bd3e66e7de6b30fede72e40fb6aa37dd523336c
2014-11-07 20:08:47 +00:00
Brett Chabot
caf30a18b5 Add functional test for screenshots.
Change-Id: Ice2cbc656f9814da7d0634644a250c1af9243ad1
2011-07-28 19:52:49 -07:00