summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/systemui/PluginInflateContainer.java
AgeCommit message (Collapse)Author
2022-03-15Merge SP2A.220305.013Haamed Gheibi
Bug: 220074017 Change-Id: Idfdd94e902f656ac65a2a75dfdd199f6f85ba472
2018-11-14Fixes import ordering.Gus Prevas
Test: n/a Change-Id: I432e11b52deb7974e50f62076af3b7aa07e364b6
2018-09-28Move plugin support to shared libTony Wickham
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
2017-02-09New system for versioning sysui pluginsJason Monk
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-02Fix leaks in sysuiJason Monk
Add support for testing for PluginManager and TunerService leaks and add tests for the known leaks and fix them. Also port PluginManager and TunerService to Dependency to make them easier to handle in tests. Test: runtest systemui Change-Id: I5642539ee24dd72f802905106decd0c87b41b4eb Fixes: 34846972
2017-01-23SysUI fragments: Integrate new support for constructingJason Monk
Use a new system for constructing fragments so they can be swapped out in place maintaining state. This will allow easier integration with plugin lifecycle as parents who have child plugin fragments can depend on the class existing and won't have to listen to the lifecycle. Test: runtest systemui Change-Id: I517f4ce3d114abd49b1b5baca388d19e929b8f90
2016-09-20Add PluginInflateContainerJason Monk
PluginInflateContainer extends AutoReinflateContainer, except that it also uses the plugin interface to allow the view to be swapped out with something else. Define an interface or abstract class as follows that includes the version and action. public interface MyInterface { public static final String ACTION = "com.android.systemui.action.PLUGIN_MYINTERFACE"; public static final int VERSION = 1; void myImportantInterface(); } Then put in a PluginInflateContainer to use and specify the interface or class that will be implemented as viewType. The layout specified will be used by default and whenever a plugin is not present. <com.android.systemui.PluginInflateContainer android:id="@+id/some_id" android:layout_width="match_parent" android:layout_height="match_parent" android:layout="@layout/my_default_component" systemui:viewType="com.android.systemui.plugins.MyInterface" /> Test: Manual Change-Id: I2ef3fa8dbe344c4635df20056182c1c0b3846fdf