Commit Graph

23 Commits

Author SHA1 Message Date
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
Dave Mankoff
fd2c695e05 Track when plugins are disabled due to crashes.
Bug: 120901833
Change-Id: I41e5c54d059b631befac235b1d3929200764860c
Test: atest SystemUITests
2018-12-14 13:33:03 -05:00
Selim Cinek
8736e95291 Disabled that wtfs crash when plugins are running
Since we have persistent plugins now, it doesn't
make sense to crash on each wtf.

Bug: 117607819
Change-Id: Ic00a75ed796cd71a36dc6f056cc92be5b190536b
Fixes: 117564930
Test: observe no crash on wtf
2018-10-15 14:25:05 -07:00
Tony Wickham
0406f853ae Add callback to handle wtf logs
TerribleFailureHandler is hidden API, so we abstract it out so only
sysui uses it.

Test: compiles

Bug: 115877296
Change-Id: Iec9ca5c22beffcd9a86edde8eb5bdba06ae6aea5
2018-10-09 17:02:17 -07:00
Tony Wickham
32c554373d Refactor code to PluginEnabler
SystemUI uses PackageManager to enable/disable plugin components.
Launcher cannot do this, so we abstract this logic into an interface;
Launcher will have a different implementation.

Test: "atest com.android.systemui.shared.plugins"
  build succeeds and all tests pass

Bug: 115877296
Change-Id: Ie6f11572026dafa369c99722d63d4daa0ea44fb5
2018-10-05 14:32:04 -07:00
Tony Wickham
023cb195be Move plugin support to shared lib
In addition to changing imports, this required some changes to use java
7, since that's what the shared lib needs to be for launcher.

See bug for more details on this project.

Test: "atest com.android.systemui.shared.plugins"
  build succeeds and all tests pass

Bug: 115877296
Change-Id: Ib79ede0a61664df0ba1a194632a345d2229777fc
2018-09-28 10:04:09 -07:00
Lucas Dupin
c293d8fe5b Allow whitelisted plugins on user builds
Plugins should only run on user builds if explicitly whitelisted.
It's also necessary to hold a signature permission:
  com.android.systemui.permission.PLUGIN

Test: atest PluginInstanceManagerTest
Test: atest PluginManagerTest
Test: manually try to install plugin on user build (whitelisted or not)
Bug: 111414690
Change-Id: If17b13f4caef677d641cba84b491b65c8135679b
2018-09-18 15:26:56 -07:00
Dan Sandler
c6dff3db61 Clean up DozeService plugin listeners.
Also adds some additional debugging:
`adb shell dumpsys activity service SystemUI` will now dump
the plugin map. This will help us discover leaks that happen
to interact with plugins, or leaks in the plugins themselves.

(Note that plugins only work on debuggable builds.)

Bug: 72138063
Test: adb shell dumpsys activity service SystemUI
Change-Id: I328aeb9a0940404760e9121ef26a0518371b8319
2018-02-15 21:39:35 +00:00
Jason Monk
1c3196398b Wrap all exceptions/crashes while plugins are active
To help differentiate them from real crashes.

Test: install crashing plugin
Change-Id: I88d991ab8d86f71bcc7042012d4d84d8a9af19f3
Fixes: 64527191
2017-08-31 12:46:15 -04:00
Dan Sandler
f6e33b1b33 Revert "Add plugin to swap out recents"
This reverts commit 0ea67d82e3.

Bug: 64345190
Change-Id: I353c064db7bfaf91e98b5fd0d3e7180381a1b2b8
Test: n/a
2017-08-15 16:45:07 -04:00
Jason Monk
0ea67d82e3 Add plugin to swap out recents
Adds new mechanism for activities in sysui to be replaced by plugins
and allows that to happen for recents.

Test: runtest systemui
Change-Id: I8b570ce7c57484c58a52afe5e247d24ebfa0c57f
2017-06-27 20:41:45 +00:00
Jason Monk
1642d7f26b Fix plugin reloading
Change-Id: I2209e98628b50416b910cda7ace10a06dbdceaa9
Test: manual
Fixes: 38424850
2017-06-01 15:21:18 -04:00
Jason Monk
365063f196 Fix crash in plugin settings
Test: Open plugin settings
Change-Id: I4c21505b95661d278f3129527df14dbfa3fbc271
Fixes: 37625271
2017-04-24 13:18:12 -04:00
TreeHugger Robot
157017c8a8 Merge "Make sure to synchronize on references to plugin dependencies" into oc-dev 2017-04-07 17:25:01 +00:00
Jason Monk
25f3db72a6 Make sure to synchronize on references to plugin dependencies
Test: make
Change-Id: I361cb3e4ac4ff5d19e2b0322531c8c614f5b7635
Fixes: 36867744
2017-04-06 14:41:00 -04:00
Jason Monk
d2e75262cc Tuner plugin settings updates
Test: manual
Fixes: 33446852
Change-Id: I05c046bb70dff66ea25531503216f121e6618a62
2017-04-06 11:24:20 -04:00
Jason Monk
6ab83ad110 Less cereal, more stable
Sometimes when the PluginManagerImpl got around to executing the
message it posts in the constructor, the next test would be initializing
the Dependencies and it would cause a crash. Clean up this whole
thing by making the looper injectable and the message runs at
a deterministic time.

Test: runtest systemui
Change-Id: I485d72aea22aa8f6c759012d54701af8a503681b
2017-03-23 14:52:17 -04: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
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
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
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
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