Commit Graph

1724 Commits

Author SHA1 Message Date
TreeHugger Robot
441f143110 Merge "Removes unused fields from NotificationEntryManager." 2019-01-04 23:19:55 +00:00
TreeHugger Robot
bf435d53ac Merge changes from topic "foreground-service-controller-2"
* changes:
  Factors out notification listening from ForegroundServiceController.
  Collapses ForegroundServiceControllerImpl into interface.
2019-01-04 22:20:45 +00:00
Gus Prevas
9258646f98 Removes unused fields from NotificationEntryManager.
Test: atest SystemUITests
Change-Id: Ia2b361fbfa9d3aa3c18a9a4577eda28bdc22b080
2019-01-04 16:06:12 -05:00
Gus Prevas
eb4e2e1139 Factors out notification listening from ForegroundServiceController.
This change introduces the ForegroundServiceNotificationListener
component, which contains the logic formerly in
ForegroundServiceController for updating its state in response to
notification events.  ForegroundServiceNotificationListener adds a
standard NotificationEntryListener to the NotificationEntryManager,
allowing us to remove the explicit calls from NotificationEntryManager;
splitting this out to its own class prevents us from introducing a
circular dependency since NotificationEntryManager still needs to use
the query methods on ForegroundServiceController.

Test: atest SystemUITests, manual
Change-Id: Iec72aa3a9fd90e3f0079db3b2a3c4f1882e59731
2019-01-04 14:05:43 -05:00
TreeHugger Robot
4926466632 Merge "Eliminates NotificationEntryManager.getNotificationLongClicker()." 2019-01-04 17:18:34 +00:00
TreeHugger Robot
0336013124 Merge "Remove Dependency.get usages from AutoTileManager" 2019-01-04 17:10:34 +00:00
Gus Prevas
ccb544069b Collapses ForegroundServiceControllerImpl into interface.
ForegroundServiceControllerImpl was the only implementation of
ForegroundServiceController; this change eliminates the interface so
that the class can be broken up into more granular components in a
future CL to help break circular dependencies.  No functional changes.

Test: atest SystemUITests, manual
Change-Id: Iabe8ae1dbc42769d5b3e93ebe2249cdc5c3e4e77
2019-01-04 10:58:57 -05:00
Gus Prevas
59ec2ff443 Eliminates NotificationEntryManager.getNotificationLongClicker().
This method always returned NotificationGutsManager::openGuts, and only
existed so that CarSystemUI could override it to disable long presses.
In this change we accomplish this by making
NotificationStackScrollLayout injectable and providing a named flag for
whether to enable long presses or not as a dependency.  This means that
NotificationEntryManager is no longer involved in handling long presses,
and CarNotificationEntryManager no longer needs to exist.

Test: atest SystemUITests, manual
Change-Id: Iae78601fea498a37ed47ef9a114e50de1652b6a8
2019-01-04 10:57:20 -05:00
TreeHugger Robot
927d1d643a Merge "Add utility method for NotificationContentViewTest setup." 2019-01-04 14:21:58 +00:00
Charles Chen
68b5a35cec Merge changes from topic "commandQueue"
* changes:
  Introduce AutoHideController to centralize call to WMS (4/N)
  Make Some APIs in CommandQueue aware of multi-display (3/N)
2019-01-04 06:39:25 +00:00
TreeHugger Robot
ef65858221 Merge "Remove rounded_corner_radius from SystemUI dimens" 2019-01-04 00:52:50 +00:00
TreeHugger Robot
709797647d Merge "Fix tuner crash from dependencies" 2019-01-03 23:18:54 +00:00
Beverly
4d1113d801 Remove rounded_corner_radius from SystemUI dimens
It only pointed to the framework attribute

Test: atest ScreenDecorationsTest
Change-Id: Ic60b9d760a552bd0c1ae363188b8f95f721cfebe
Fixes: 120600397
2019-01-03 17:00:23 -05:00
Jason Monk
c29c2020a0 Fix tuner crash from dependencies
Test: atest SystemUITests
Change-Id: I530ac3fa5d7dc2a044feab81de9587a21a3bcef7
Fixes: 122320435
2019-01-03 16:52:37 -05:00
Ned Burns
761af0d76b Fix NPE in NotificationLogger for real this time
Previous nullcheck just caused another NPE. Actually checking the
null value and adding a test this time.

Bug: 122169343
Test: atest
Change-Id: I4acc055b8d5039ea65fded43526780be883eaf74
2019-01-03 13:52:37 -05:00
Charles Chen
8c9a83fe54 Introduce AutoHideController to centralize call to WMS (4/N)
AutoHideController is a per-display controller and has following tasks:
1. Control all auto-hide logic in SystemUi
2. Update hide/unhide status to WMS

Bug: 117478341
Test: atest SystemUITests

Change-Id: I5066030c750f72e6e0b0d70cd377109458989c7d
2019-01-03 22:12:38 +08:00
Charles Chen
f3d295c58a Make Some APIs in CommandQueue aware of multi-display (3/N)
By this CL, we could dispatch Callback to fragments on the specified
display. I also add some annotations for documenting.

TODO: 1. add tests for multi-display.
      2. make registerStatusBar be an IStatusBar API to propagate the
         information when a display is added or in the initial step.
      3. Introduce AutoHideController

Test: atest SystemUiTests
Bug: 117478341

Change-Id: I864600f929c1d0c8aa39274f30c17b213b754d86
2019-01-03 22:12:38 +08:00
Charles Chen
10ca70b075 Move all logic of navigation bar to NavigationBarController(2/N)
Since we don't have status bar on external displays, we need to saparate
the logic to make some animations or transitions just work on external
navigation bars. When we set System UI visibility on an external display,
we could make the flag only effect navigation bar. Also, it can simplify
StatusBar code by moving navigation bar related fields into
NavigationBarController.

Test: atest SystemUITests
Bug: 117478341

Change-Id: I1cdf61f6eeb2c377e04a073401efa0cdb45b65cd
2019-01-03 22:12:03 +08:00
TreeHugger Robot
24fd0a9f80 Merge "Make DarkIconDispatcher visible to plugins" 2019-01-02 23:41:03 +00:00
Beverly
1be62f46ab Make DarkIconDispatcher visible to plugins
Test: manual
Bug: 115322193
Change-Id: I6204d771e476c504e9070ebc88dd8fd44b268635
2019-01-02 16:13:34 -05:00
TreeHugger Robot
f2426f9a04 Merge "Log undo of notification importance change." 2019-01-02 18:40:26 +00:00
Lucas Dupin
583ca98e96 Merge "Add a state for hiding UI while docking" 2019-01-02 18:35:24 +00:00
Jason Monk
a26641f582 Remove Dependency.get usages from AutoTileManager
Test: existing tests
Change-Id: Iff4e5c90eef7aa0f4a1fcba5ea7eba0847725a70
2019-01-02 10:33:57 -05:00
Gus Prevas
ca1b6f74f3 Removes dependency of NotificationEntryManager on IStatusBarService.
This change moves the logic in NotificationEntryManager which logs
notification removal and inflation errors via the IStatusBarService to
the NotificationLogger, which is already logging visibility changes to
that service.

Test: atest SystemUITests, manual
Change-Id: I895a36db505a165c4e6684d1d6e66592e62ef1f7
2018-12-28 13:50:03 -05:00
Jerry Chang
5d3eb44729 Add a state for hiding UI while docking
Adding a state to support hiding UI while docking.

Bug: 119001412
Test: atest SystemUITests
Change-Id: I0e197aedc94ac4b0005a8b7f2d383c4e4f623e45
2018-12-28 20:06:27 +08:00
Selim Cinek
5639004225 Merge "Allow for injection in StatusBar Views" 2018-12-28 02:00:58 +00:00
TreeHugger Robot
ee9445e358 Merge changes from topics "nem-low-prio-state", "nem-group-manager", "nem-remote-input-manager", "nem-media-manager", "nem-perform-remove", "nem-combine-remove-callbacks", "nem-callback-to-listener", "nem-alert-handling-listeners"
* changes:
  Moves minimization change handling into NotificationEntryListeners.
  Removes dependency of NotificationEntryManager on NotificationGroupManager.
  Makes NotificationRemoteInputManager a NotificationEntryListener.
  Removes circular dependency between NotificationMediaManager and NotificationEntryManager.
  Combines NotificationEntryManager listener interfaces (part 5).
  Combines NotificationEntryManager listener interfaces (part 4).
  Combines NotificationEntryManager listener interfaces (part 3).
  Combines NotificationEntryManager listener interfaces (part 2).
2018-12-28 01:42:33 +00:00
TreeHugger Robot
3fb6a1be87 Merge "Protects query pulse reason exception" 2018-12-28 00:32:13 +00:00
Gus Prevas
5b9098dc3a Moves minimization change handling into NotificationEntryListeners.
This change moves the logic in NotificationEntryManager which was
explicitly handling changes in whether a row was minimized or not after
it was reinflated into the target components through the normal listener
mechanism.  This involves VisualStabilityManager registering a
NotificationEntryListener and allows us to remove the dependency of
NotificationEntryManager on VisualStabilityManager.

Test: atest SystemUITests, manual
Change-Id: I4bfdbda49c1cdff4a78fabeb2343843edc509fb0
2018-12-27 17:38:49 -05:00
TreeHugger Robot
006892ffdb Merge changes I1ef8b41a,I348bdb1c
* changes:
  Remove Dependency.get usages from QSFooterImpl
  Remove Dependency.get usages from QSTileHost.
2018-12-27 21:51:21 +00:00
Jason Monk
9c387a5c0c Merge changes I9c2ab16b,I6ac1fd46,I687412fc,I943f3098
* changes:
  Add link to dagger user guide
  Make QSTileImpl a LifecycleOwner and make use of it
  Remove Dependency.get usages from QS tiles
  Switch QS tile creation to use injection
2018-12-27 20:33:41 +00:00
Jason Monk
30b64fad25 Remove Dependency.get usages from QSTileHost.
Test: existing tests
Change-Id: I348bdb1c7e14810a2864637d550a388e6f399f6d
2018-12-27 13:19:34 -05:00
Gus Prevas
772e5325b9 Makes NotificationRemoteInputManager a NotificationEntryListener.
This change makes NotificationRemoteInputManager register itself as a
NotificationEntryListener instead of having NotificationEntryManager
separately and explicitly notify it of a notification being removed.

Test: atest SystemUITests, manual
Change-Id: Ib212de504430fd3f543d4c2919e5f434ce2f0aea
2018-12-27 10:28:02 -05:00
Gus Prevas
2d5a1e95f1 Removes circular dependency between NotificationMediaManager and NotificationEntryManager.
This change makes NotificationMediaManager register itself as a
NotificationEntryListener instead of having NotificationEntryManager
separately and explicitly notify it of a notification being removed.
This allows us to remove the dependency of NotificationEntryManager on
NotificationMediaManager.  (The reverse dependency already existed.)

Test: atest SystemUITests, manual
Change-Id: I0577bf864668ccbecd70a3c3b13b610f981f7fc4
2018-12-27 10:27:33 -05:00
Gus Prevas
dca2be5f93 Combines NotificationEntryManager listener interfaces (part 5).
This change combines the onEntryRemoved() and
onPerformRemoveNotification() methods on NotificationEntryListener to a
single method.  The latter method was called after the former method in
all cases where the removal of the notification was precipitated by user
action (swipe, bubble swipe, launching content intent), so it's replaced
by a boolean parameter to the former method indicating whether a user
action caused the removal.

Test: atest SystemUITests, manual
Change-Id: I448fdd68984e3c2489259940c4d3432ac5bfe320
2018-12-27 09:49:02 -05:00
Gus Prevas
f37435a69b Combines NotificationEntryManager listener interfaces (part 4).
This change combines the onEntryRemoved() and onNotificationRemoved()
methods on NotificationEntryListener to a single method.  The logic in
NotificationEntryManager which calls these methods is rearranged and a
flag is added to the callback method in order to fully preserve the
previous behavior of all implementors.

Test: atest SystemUITests, manual
Change-Id: I6077e78005ed6c20b02f5fa21f213199384cc3b8
2018-12-27 09:45:30 -05:00
Gus Prevas
8621bd27a5 Combines NotificationEntryManager listener interfaces (part 3).
This change eliminates the mCallback field on NotificationEntryManager,
instead adding the listener which used to be in that field to the list
of listeners.

Test: atest SystemUITests, manual
Change-Id: I3b489ad87cf9d757c9ad9e49cf3c12c35972dee5
2018-12-27 09:25:03 -05:00
Gus Prevas
b43dc65641 Combines NotificationEntryManager listener interfaces (part 2).
This change introduces the NotificationAlertingManager component, a
NotificationEntryListener which handles showing/hiding/updating alerts
(heads-up or ambient pulsing) in response to events from the
NotificationEntryManager.  All code in the new component was moved out
of NotificationEntryManager proper.

Test: atest SystemUITests, manual
Change-Id: I46a046da6caf39b1d314b357e21ac6b4755c5796
2018-12-27 09:24:50 -05:00
Jason Monk
fa452ef8ff Make QSTileImpl a LifecycleOwner and make use of it
Test: existing tests pass
Change-Id: I6ac1fd46b74d8eb48c83af3883c7fdcd2cb0f628
2018-12-27 07:46:57 -05:00
Jason Monk
c0e0e2b8a9 Remove Dependency.get usages from QS tiles
Test: existing tests
Change-Id: I687412fcef888b516983132efd1ee007c40f7c2f
2018-12-27 07:46:57 -05:00
Jason Monk
5d57720036 Switch QS tile creation to use injection
This will make it easy to remove dependency usages from tiles.

Test: existing tests
Change-Id: I943f3098c4e7cf2feaa6ebe190f3ddec557c3850
2018-12-27 07:46:50 -05:00
TYM Tsai
2d23690ef4 Protects query pulse reason exception
Checks the machine is currently in one of the pulse states before
query the current pulse reason. Avoid incorrect undocked event cause
DozeService crash. And refines test case and javadoc.

Bug: 120464108
Test: atest SystemUITests
Test: manual
Change-Id: I3595217984ec7982de1f0f53765e7ae0a9d80fcf
2018-12-27 20:24:23 +08:00
Selim Cinek
9d20bed963 Allow for injection in StatusBar Views
Previously, StatusBar was unable to have any views with injection
due to dagger. We're now allowing for member injection in the
top level StatusBar class and any views inflated.
Once most members are migrated from Dependency we can fully migrate
to the new dependency injection.

Bug: 111414690
Test: atest SystemUITests
Change-Id: I988dc4426c2183955a467e9ea7f7ee7acf6f3019
2018-12-26 17:33:42 -08:00
Lucas Dupin
de64ee0126 make wake event trigger a pulse
Test: manual
Test: atest ScrimControllerTest
Bug: 111405682
Bug: 111395593
Change-Id: I5a7b9024ecd5aea691ac5e3f23e70818186fc37c
2018-12-26 13:28:41 -08:00
Jason Monk
ce441748ac Merge changes Ie7f66818,I7e91d12b,I0f44b3dd,I8625f3d3,I115c55af, ...
* changes:
  Remove Dependency.get usages from LightBarController
  Remove Dependency.get usages from NotificationLogger
  Remove Dependency.get usages from OverviewProxyService
  Remove Dependency.get usages from BubbleController
  Remove Dependency.get usages from BatteryControllerImpl
  Remove Dependency.get usages from BluetoothControllerImpl
  Remove Dependency.get usages from DeviceProvisionedController
  Remove Dependency.get usages from HotspotControllerImpl
  Remove Dependency.get usages from RemoteInputQuickSettingsDisabler
  Remove Dependency.get usages from SecurityControllerImpl
  Remove Dependency.get usages from UserSwitcherController
  Remove Dependency.get usages from SmartReplyController
  Reduce usages of Dependency.get in TunablePadding
  Remove Dependency.get usages from TunerServiceImpl
  Remove Dependency.get usages from GarbageMonitor
2018-12-26 20:42:38 +00:00
Jason Monk
d97204c986 Remove Dependency.get usages from NotificationLogger
Test: atest SystemUITests
Change-Id: I7e91d12be282bf6de615830aa813208018c74f33
2018-12-26 13:18:19 -05:00
Jason Monk
92d5c24e70 Remove Dependency.get usages from BubbleController
Test: atest SystemUITests
Change-Id: I8625f3d3b3078e60e90145be77f286bfaacb8ed6
2018-12-26 13:18:18 -05:00
Jason Monk
de48d5df49 Remove Dependency.get usages from BatteryControllerImpl
Test: atest SystemUITests
Change-Id: I115c55af157410fccbf13db326ca246993cbb6e0
2018-12-26 13:18:18 -05:00
Jason Monk
8111bccc42 Remove Dependency.get usages from BluetoothControllerImpl
Test: atest SystemUITests
Change-Id: I5dd95d8ae7e319c74b6d96109d87f45d38c7e084
2018-12-26 13:18:18 -05:00
Jason Monk
cfa61ff2c9 Remove Dependency.get usages from DeviceProvisionedController
Test: atest SystemUITests
Change-Id: I3a8cd6e9802987f019dea5f402dac494f11f16c8
2018-12-26 13:18:18 -05:00