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
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/DataSaverTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/DataSaverTile.java
index 412fe3d..7a25140 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/DataSaverTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DataSaverTile.java
@@ -24,17 +24,19 @@
import com.android.systemui.Dependency;
import com.android.systemui.Prefs;
import com.android.systemui.R;
-import com.android.systemui.qs.QSTile;
+import com.android.systemui.qs.QSHost;
+import com.android.systemui.plugins.qs.QSTile.BooleanState;
+import com.android.systemui.qs.tileimpl.QSTileImpl;
import com.android.systemui.statusbar.phone.SystemUIDialog;
import com.android.systemui.statusbar.policy.DataSaverController;
import com.android.systemui.statusbar.policy.NetworkController;
-public class DataSaverTile extends QSTile<QSTile.BooleanState> implements
+public class DataSaverTile extends QSTileImpl<BooleanState> implements
DataSaverController.Listener{
private final DataSaverController mDataSaverController;
- public DataSaverTile(Host host) {
+ public DataSaverTile(QSHost host) {
super(host);
mDataSaverController = Dependency.get(NetworkController.class).getDataSaverController();
}
@@ -104,8 +106,7 @@
state.contentDescription = state.label;
state.icon = ResourceIcon.get(state.value ? R.drawable.ic_data_saver
: R.drawable.ic_data_saver_off);
- state.minimalAccessibilityClassName = state.expandedAccessibilityClassName
- = Switch.class.getName();
+ state.expandedAccessibilityClassName = Switch.class.getName();
}
@Override