diff options
| author | 2020-04-24 12:00:49 -0400 | |
|---|---|---|
| committer | 2020-04-30 12:52:20 -0400 | |
| commit | 2ff6df973bfda043f410aca35d09426d6af4aad2 (patch) | |
| tree | 8ddfa80a70db771ec764750a6f50086d640f099a /packages/SystemUI/plugin | |
| parent | 8e47f58e6bbeaa3f3f75d88562e7849202beea51 (diff) | |
Add new QS Ui EVents
This CL adds events for:
* QS interactions
* StatusBarState changes
* User Switcher interaction
* DND panel interaction
The new QS events that refer to particular tiles attach the following:
* spec (if framework tile) or package (if CustomTile)
* instanceId associated with the QSTile object on creation
Test: atest SystemUITests (including new tests)
Test: manual using statsd_testdrive
Fixes: 147508235
Change-Id: I43d8fe1fdb2aec1f16032da61a599ebc29809afc
Diffstat (limited to 'packages/SystemUI/plugin')
| -rw-r--r-- | packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/DetailAdapter.java | 15 | ||||
| -rw-r--r-- | packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java | 13 |
2 files changed, 28 insertions, 0 deletions
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/DetailAdapter.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/DetailAdapter.java index f6f8f53c07f2..d43aaf07c6be 100644 --- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/DetailAdapter.java +++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/DetailAdapter.java @@ -19,6 +19,7 @@ import android.content.Intent; import android.view.View; import android.view.ViewGroup; +import com.android.internal.logging.UiEventLogger; import com.android.systemui.plugins.annotations.ProvidesInterface; @ProvidesInterface(version = DetailAdapter.VERSION) @@ -44,4 +45,18 @@ public interface DetailAdapter { default boolean hasHeader() { return true; } + + default UiEventLogger.UiEventEnum openDetailEvent() { + return INVALID; + } + + default UiEventLogger.UiEventEnum closeDetailEvent() { + return INVALID; + } + + default UiEventLogger.UiEventEnum moreSettingsEvent() { + return INVALID; + } + + UiEventLogger.UiEventEnum INVALID = () -> 0; } diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java index e586c38a286a..aeedc16ffbd4 100644 --- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java +++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java @@ -20,6 +20,7 @@ import android.graphics.drawable.Drawable; import android.metrics.LogMaker; import android.service.quicksettings.Tile; +import com.android.internal.logging.InstanceId; import com.android.systemui.plugins.annotations.DependsOn; import com.android.systemui.plugins.annotations.ProvidesInterface; import com.android.systemui.plugins.qs.QSTile.Callback; @@ -81,6 +82,18 @@ public interface QSTile { return logMaker; } + /** + * Return a string to be used to identify the tile in UiEvents. + */ + default String getMetricsSpec() { + return getClass().getSimpleName(); + } + + /** + * Return an {@link InstanceId} to be used to identify the tile in UiEvents. + */ + InstanceId getInstanceId(); + @ProvidesInterface(version = Callback.VERSION) public interface Callback { public static final int VERSION = 1; |