Commit Graph

30 Commits

Author SHA1 Message Date
Fabian Kozynski
e771b7529e [DO NOT MERGE] Fix BroadcastDispatcher registering with CURRENT
When a BroadcastReceiver is registered with UserHandle.CURRENT, the
current user should be obtained. This has to be cached in order to not
call ActivityManager every time.

As it is done in the initializer the initial value caching will happen
before any other BroadcastReceiver is actually registered. The caching
and updating is all done in the background thread.

Also, remove unnecessary dependency.

Test: manual
Test: atest BroadcastDispatcher
Fixes: 158298581
Change-Id: Idfd2dc65f9079c57e971250aa7b0aef222da5af5
2020-06-11 16:28:07 +00:00
Fabian Kozynski
938137e7fc Add info about sticky in broadcasts.md
Also in the Javadoc of BroadcastDispatcher

Test: no test
Fixes: 151641451
Change-Id: Id19f5192c9c0c17b7405853960258b43053630d1
2020-04-28 16:09:27 -04:00
Fabian Kozynski
35e1d1fc4a Merge "Documentation for QSTiles" 2020-02-10 15:44:30 +00:00
Fabian Kozynski
01f07684d3 Documentation for QSTiles
Also added javadoc for QSTileImpl

Test: no test

Change-Id: I3c71954e04d58b1d694502baf01ceae13288031b
2020-02-08 21:06:46 +00:00
Matt Pietal
f07bac46ee Remove all control experiments
And plugins, and flags, and any associated code

Bug: 148207527
Test: atest SystemUiTests
Change-Id: Id1b800d6ec96b5297e6ed4792ca003d45b61e53e
2020-01-30 08:49:20 -05:00
Fabian Kozynski
5e92c6fd9f BroadcastDispatcher can use Executors now
registerReceiver takes an optional Executor parameter. The old
registerReceiver that takes a Handler has been renamed and @Deprecated

Test: SystemUITests
Change-Id: I43b97f720b2b153d1019ed3cf19e1533558e380f
2020-01-09 15:31:14 -05:00
Dave Mankoff
6891682256 Documentation on new Executors in SystemUI.
Also, remove the "removeAll" method. It was going
to cause more harm than good.

Bug: 145135056
Test: n/a
Change-Id: I39ef8c4aa656e6a9d7ef15e8dd528960e07a406a
2019-12-06 11:51:12 -05:00
Fabian Kozynski
5ca7a51c11 Finish migrating to BroadcastDispatcher
This CL migrates most of the remaining classes to use
BroadcastDispatcher. Some classes left are Views or created before the
BroadcastDispatcher can be injected.

Adds docs for instructions on using the BroadcastDispatcher.

Using the broadcast dispatcher, the time system_server spends
dispatching common intents to SystemUI like SCREEN_OFF and SCREEN_ON can
be seen to decrease from ~70-150ms (in a Q build) to ~2-4ms.

Additionally, once a broadcast is received by the dispatcher, time
until it is fully dispatched inside SystemUI is not impacted greatly.
Most broadcasts are fully dispatched after ~20ms with a few of them
taking ~100ms.

Test: atest SystemUITests no regressions
Test: build and boot
Test: tried some random broadcasts and they are properly dispatched
Test: BroadcastDispatch dump
Test: adb shell dumpsys activity broadcasts
Bug: 134566046

Change-Id: I26a592be66b053f25669b5481b58bf7f07bfd0da
2019-11-04 10:53:26 -05:00
Fabian Kozynski
3bf518dd98 Adding a Plugin to attach things under QQS
This plugin responds to expansion and changes in theme, ui, etc.

Test: manual

Change-Id: I5d866a4fff491aa6273edfb765e538864b270534
2019-09-05 12:26:13 -04:00
Mady Mellor
06b770cf14 qt-r1-bubbles-dev @ build 5835883
Test: presubmit setup on source branch

Bug: 126945401
Bug: 128932906
Bug: 129158983
Bug: 130237686
Bug: 130250809
Bug: 130442248
Bug: 131267438
Bug: 131609280
Bug: 131692350
Bug: 131849856
Bug: 133444037
Bug: 134064116
Bug: 134064858
Bug: 134070807
Bug: 134077101
Bug: 134090085
Bug: 134155107
Bug: 134423445
Bug: 134512898
Bug: 134514210
Bug: 134514227
Bug: 134734945
Bug: 134960381
Bug: 134989736
Bug: 135214687
Bug: 135280077
Bug: 135472021
Bug: 135475155
Bug: 135487618
Bug: 135488406
Bug: 135518045
Bug: 135633218
Bug: 136034310
Bug: 136150954
Bug: 136199542
Bug: 136538998
Bug: 137201711
Bug: 137213469
Bug: 137214359
Bug: 137214536
Bug: 137233453
Bug: 137876221
Bug: 138301618
Bug: 138445026
Bug: 138659213
Bug: 138749133
Bug: 138799651
Bug: 138801505
Bug: 138941969
Bug: 139002444
Bug: 139025304
Bug: 139816141
Change-Id: Ic271a6a0f0803941dd5a84124dabf4d8c5fcc755
2019-08-29 20:24:52 -07:00
Dave Mankoff
2ea5a83202 Allow Services to be created through Dagger.
This is a significant change that allows Services to have their
constructed injected into.

This change includes DozeService as an example, injecting the
FalsingManager into its constructor.

Bug: 136279712
Test: atest SystemUITests
Change-Id: Ib58f8763c996fbc2aea07ead56493d2d9e936f5b
2019-07-08 16:56:11 -04:00
Joshua Tsuji
debd831ca7 Adds followAnimatedTargetAlongPath, and modifies the expanded controller to use it.
This also moves the end action methods into the controller, which is a more logical place for it. That way, PhysicsAnimationLayout only has one public method (setActiveController). This sets us up better for future abstractions that don't rely on a custom view at all.

(also updates the docs for these changes and several recent ones)

Test: atest SystemUITests
Bug: 134077101
Change-Id: I6fcc14587b07f14371fa75fbbe0cc31353aa5c0b
2019-06-26 13:39:41 -04:00
Robert Snoeberger
aa184854de Add doc for system health guidelines for AOD clock faces.
Bug: 129775476
Test: none
Change-Id: I3b5eb9524a076669cc15278f80d9fc8c81b5340a
2019-04-19 17:35:10 -04:00
Joshua Tsuji
c110843412 Adds PhysicsPropertyAnimator, which simplifies animation controllers.
See the updated docs for an explanation and example usages. The number of overloaded animateValueForChild methods, and end listener/property setting boilerplate in the controllers were getting annoying, and this is a familiar pattern similar to ViewPropertyAnimator.

Test: atest SystemUITests, also manually tested to ensure no regressions.
Change-Id: Ibca870efda447d79b795c846408f1f6864ce3aa9
2019-03-21 13:03:27 -04:00
Evan Laird
15b3599256 Touchup the dagger.md docs
I was going through the documentation saw that it could use some love

Test: visual
Change-Id: I837220364f63878fe5d751d000f414c01c9de419
2019-03-06 16:40:18 -05:00
Joshua Tsuji
1575e6bb31 Animate addition/removal of views in expanded mode.
This required adding the setChildVisibility method to controllers, to allow them to animate in/out views that pass the max rendered child threshold. This was not previously relevant since in the bubble stack, you can't really see the views when they're set to VISIBLE/GONE.

Also, renamed onChildToBeRemoved to onChildRemoved since that's more accurate given the move to transient views.

Test: atest SystemUITests
Change-Id: I291ff8f6257ba54e0688c1062bbd673e0c7bdb5c
2019-02-04 15:31:51 -05:00
Joshua Tsuji
b1a796b155 Adds DynamicAnimation-based movement to the bubbles.
See go/bubble-stack-design for a high level overview of these changes. This is a large CL, but required in order to allow continued development and team testing without breaking functionality over the course of multiple CL submissions.

To integrate the new animations, the following changes have been made to existing code:
* (BubbleStackView) The bubble container (and thus, the stack view) are MATCH_PARENT to allow the bubbles to independently translate anywhere on the screen.
* (BubbleStackView) Start position is set by the stack controller, not BubbleStackView.
* (BubbleStackView) Expand positon is set by the expansion controller, not BubbleStackView.
* (BubbleStackView/BubbleTouchHandler) Added the methods onDragStart/onDragged/onDragFinish, and onBubbleDragStart/onBubbleDragged/onBubbleDragFinish, for cleaner dispatch of touch events to the appropriate animation controller.
* (BubbleStackView/BubbleController) The stack view's getBoundsOnScreen returns the first bubble's bounds, if the stack is not expanded.
* (BubbleStackView) applyCurrentState no longer manages translation of bubbles, or the expanded view, these are controlled by animation.
* (BubbleMovementHelper) Deleted, no longer needed.
* (Everywhere) Changed uses of Point to PointF, since translation values are floats anyway.

Known issues to be fixed in subsequent, far smaller CLs:
* (b/123022862) Bubble dragging out/dismissing is not animated, and the bubbles can be deposited anywhere. Tap outside the stack to collapse them back to normal.
* (b/123023502) New bubbles added while the stack is expanded are not positioned properly.
* (b/123022982) Expanded view arrow is sometimes in the wrong position.
* (b/123023410) If the stack is expanded while animating, it collapses to its original position even if not along the edge of the screen.
* (b/123023904) The expanded view doesn't animate out, it disappears instantly.
* (b/123026584) Bounds in landscape are a bit wonky.

Bug: 111236845
Test: atest SystemUITests
Test: physics-animation-testing.md
Change-Id: Icaca09e5db89c635c9bb7ca82d7d2714362e344e
2019-01-24 19:23:17 -05:00
Jason Monk
55fd968ac8 Add link to dagger user guide
Test: gitiles
Change-Id: I9c2ab16bf049ee1398d5761e06aa9c6f556d9722
2018-12-27 07:46:57 -05:00
Jason Monk
196d639875 Clean up DependencyProvider a bit
Create DependencyBinder which is abstract and can tell dagger how
to convert directly between interfaces and implementations without
requiring code for it.

Test: compile (which runs dagger)
Change-Id: I7013ee12d37172441e2c70cf2fe36f707975c821
2018-12-21 09:02:13 -05:00
Jason Monk
ea54e8a756 Sysui: Add support for view injection
Test: Existing tests pass
Change-Id: Ic6931ebec38ca9514e9368239dd9502ae2dee33c
2018-12-20 10:22:47 -05:00
Jason Monk
9424af7315 Add support for dagger injection with fragments
Convert NavigationBarFragment as a proof of concept and remove all
references to Dependency from NavigationBarFragment.

Test: atest SystemUITests
Change-Id: I0cdb5bc6ac455fce91e67b9e449cb7b78b1da9a4
2018-12-19 16:07:46 -05:00
Jason Monk
27d01a624d Start using some dagger 2
Early days as we start migration, so lots of duplication between
Dependency and dagger2, but can be removed when migration is done.

Test: existing tests.
Change-Id: I00c3da6ebbd46a26e512d8a7aa1e2b828e08f33f
2018-12-19 09:47:37 -05:00
Dan Sandler
aee10af5ea Fix link in plugin docs
Change-Id: I4f7ce3afaca111203126681b76f3f493b0a44faf
2018-10-04 14:27:11 -04:00
Jason Monk
ae7ced2f95 First kotlin
Convert one class to kotlin and provide a slight amount of guidance.

Test: existing tests
Change-Id: Ie8659765b674ac7b2d82ed3d343f387195c07d83
2018-08-23 12:49:08 -04:00
Kunhung Li
1b35253f58 Add clock plugin interface
More flexible to test any clock plugin in the future

Bug: 111971817
Test: manual test
Change-Id: I45fa2d1ca99446abdb315cc28b58956d8e409283
2018-08-08 18:23:35 +08:00
Jason Monk
ba055f8f9d Import some plugin documentation into the tree
In the spirit of writing things down

Test: none
Change-Id: I93371eab99721ace1fd32d07739b861d492e4be6
2018-02-23 14:52:37 -05:00
Evan Laird
706d9684af Status bar size tweaks
++1dp for Data saver and Hotspot
--1dp for Total silence
>>1dp for Battery lightning bolt

Also implemented keyword "powersave" for `dispatchDemoCommand()` in
BatteryControllerImpl

Test: visual
Bug: 37013523
Change-Id: I027fd18aadeef5c49826c37db9f681c14175a3aa
2017-06-05 10:58:36 -04:00
John Spurlock
cf053c13b8 SysUI Demo Mode: Ensure we have plenty of sims.
And update some docs.

Bug: 21157785
Change-Id: I8e44e160377e66f15c6348a87326998c98cea787
2015-05-18 09:38:07 -04:00
Andrew Flynn
a47a6609d6 Demo Mode instructions for Carrier Network Change icon
Bug: 11392659
Change-Id: I8ca15a51d8079e83dc87bfe90d274a17cbe04c25
2015-04-23 09:16:18 -07:00
Andrew Flynn
56aa4cfcc2 Add SystemUI demo mode README to tree.
Change-Id: I3c22a8b53d7f71881633c456b1fce5758eec9678
2015-04-21 18:11:12 -07:00