Loading packages/SystemUI/src/com/android/systemui/bubbles/Bubble.java +0 −16 Original line number Diff line number Diff line Loading @@ -712,22 +712,6 @@ class Bubble implements BubbleViewProvider { return Objects.hash(mKey); } @Override public void logUIEvent(int bubbleCount, int action, float normalX, float normalY, int index) { SysUiStatsLog.write(SysUiStatsLog.BUBBLE_UI_CHANGED, mPackageName, mChannelId, mNotificationId, index, bubbleCount, action, normalX, normalY, showInShade(), false /* isOngoing (unused) */, false /* isAppForeground (unused) */); } @Nullable private static String getTitle(@NonNull final NotificationEntry e) { final CharSequence titleCharSeq = e.getSbn().getNotification().extras.getCharSequence( Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java +26 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import androidx.annotation.Nullable; import com.android.internal.annotations.VisibleForTesting; import com.android.systemui.R; import com.android.systemui.bubbles.BubbleController.DismissReason; import com.android.systemui.shared.system.SysUiStatsLog; import com.android.systemui.statusbar.notification.NotificationEntryManager; import com.android.systemui.statusbar.notification.collection.NotificationEntry; Loading @@ -59,7 +60,7 @@ import javax.inject.Singleton; @Singleton public class BubbleData { private BubbleLogger mLogger = new BubbleLoggerImpl(); private BubbleLoggerImpl mLogger = new BubbleLoggerImpl(); private static final String TAG = TAG_WITH_CLASS_NAME ? "BubbleData" : TAG_BUBBLES; Loading Loading @@ -610,6 +611,30 @@ public class BubbleData { mStateChange.selectionChanged = true; } /** * Logs the bubble UI event. * * @param provider The bubble view provider that is being interacted on. Null value indicates * that the user interaction is not specific to one bubble. * @param action The user interaction enum * @param packageName SystemUI package * @param bubbleCount Number of bubbles in the stack * @param bubbleIndex Index of bubble in the stack * @param normalX Normalized x position of the stack * @param normalY Normalized y position of the stack */ void logBubbleEvent(@Nullable BubbleViewProvider provider, int action, String packageName, int bubbleCount, int bubbleIndex, float normalX, float normalY) { if (provider == null) { mLogger.logStackUiChanged(packageName, action, bubbleCount, normalX, normalY); } else if (provider.getKey().equals(BubbleOverflow.KEY)) { mLogger.logShowOverflow(packageName, action, bubbleCount, normalX, normalY); } else { mLogger.logBubbleUiChanged((Bubble) provider, packageName, action, bubbleCount, normalX, normalY, bubbleIndex); } } /** * Requests a change to the expanded state. * Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleLoggerImpl.java +49 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.bubbles; import com.android.internal.logging.UiEventLoggerImpl; import com.android.systemui.shared.system.SysUiStatsLog; /** * Implementation of UiEventLogger for logging bubble UI events. Loading Loading @@ -64,4 +65,52 @@ public class BubbleLoggerImpl extends UiEventLoggerImpl implements BubbleLogger log(b, Event.BUBBLE_OVERFLOW_ADD_USER_GESTURE); } } void logStackUiChanged(String packageName, int action, int bubbleCount, float normalX, float normalY) { SysUiStatsLog.write(SysUiStatsLog.BUBBLE_UI_CHANGED, packageName, null /* notification channel */, 0 /* notification ID */, 0 /* bubble position */, bubbleCount, action, normalX, normalY, false /* unread bubble */, false /* on-going bubble */, false /* isAppForeground (unused) */); } void logShowOverflow(String packageName, int action, int bubbleCount, float normalX, float normalY) { SysUiStatsLog.write(SysUiStatsLog.BUBBLE_UI_CHANGED, packageName, BubbleOverflow.KEY /* notification channel */, 0 /* notification ID */, 0 /* bubble position */, bubbleCount, action, normalX, normalY, false /* unread bubble */, false /* on-going bubble */, false /* isAppForeground (unused) */); } void logBubbleUiChanged(Bubble bubble, String packageName, int action, int bubbleCount, float normalX, float normalY, int index) { SysUiStatsLog.write(SysUiStatsLog.BUBBLE_UI_CHANGED, packageName, bubble.getChannelId() /* notification channel */, bubble.getNotificationId() /* notification ID */, index, bubbleCount, action, normalX, normalY, bubble.showInShade() /* isUnread */, false /* isOngoing (unused) */, false /* isAppForeground (unused) */); } } No newline at end of file packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflow.java +0 −6 Original line number Diff line number Diff line Loading @@ -162,12 +162,6 @@ public class BubbleOverflow implements BubbleViewProvider { mExpandedView.setContentVisibility(visible); } @Override public void logUIEvent(int bubbleCount, int action, float normalX, float normalY, int index) { // TODO(b/149133814) Log overflow UI events. } @Override public View getIconView() { return mOverflowBtn; Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +7 −17 Original line number Diff line number Diff line Loading @@ -2891,23 +2891,13 @@ public class BubbleStackView extends FrameLayout * @param action the user interaction enum. */ private void logBubbleEvent(@Nullable BubbleViewProvider provider, int action) { if (provider == null || provider.getKey().equals(BubbleOverflow.KEY)) { SysUiStatsLog.write(SysUiStatsLog.BUBBLE_UI_CHANGED, mBubbleData.logBubbleEvent(provider, action, mContext.getApplicationInfo().packageName, provider == null ? null : BubbleOverflow.KEY /* notification channel */, 0 /* notification ID */, 0 /* bubble position */, getBubbleCount(), action, getBubbleIndex(provider), getNormalizedXPosition(), getNormalizedYPosition(), false /* unread bubble */, false /* on-going bubble */, false /* isAppForeground (unused) */); return; } provider.logUIEvent(getBubbleCount(), action, getNormalizedXPosition(), getNormalizedYPosition(), getBubbleIndex(provider)); getNormalizedYPosition()); } /** Loading Loading
packages/SystemUI/src/com/android/systemui/bubbles/Bubble.java +0 −16 Original line number Diff line number Diff line Loading @@ -712,22 +712,6 @@ class Bubble implements BubbleViewProvider { return Objects.hash(mKey); } @Override public void logUIEvent(int bubbleCount, int action, float normalX, float normalY, int index) { SysUiStatsLog.write(SysUiStatsLog.BUBBLE_UI_CHANGED, mPackageName, mChannelId, mNotificationId, index, bubbleCount, action, normalX, normalY, showInShade(), false /* isOngoing (unused) */, false /* isAppForeground (unused) */); } @Nullable private static String getTitle(@NonNull final NotificationEntry e) { final CharSequence titleCharSeq = e.getSbn().getNotification().extras.getCharSequence( Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java +26 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import androidx.annotation.Nullable; import com.android.internal.annotations.VisibleForTesting; import com.android.systemui.R; import com.android.systemui.bubbles.BubbleController.DismissReason; import com.android.systemui.shared.system.SysUiStatsLog; import com.android.systemui.statusbar.notification.NotificationEntryManager; import com.android.systemui.statusbar.notification.collection.NotificationEntry; Loading @@ -59,7 +60,7 @@ import javax.inject.Singleton; @Singleton public class BubbleData { private BubbleLogger mLogger = new BubbleLoggerImpl(); private BubbleLoggerImpl mLogger = new BubbleLoggerImpl(); private static final String TAG = TAG_WITH_CLASS_NAME ? "BubbleData" : TAG_BUBBLES; Loading Loading @@ -610,6 +611,30 @@ public class BubbleData { mStateChange.selectionChanged = true; } /** * Logs the bubble UI event. * * @param provider The bubble view provider that is being interacted on. Null value indicates * that the user interaction is not specific to one bubble. * @param action The user interaction enum * @param packageName SystemUI package * @param bubbleCount Number of bubbles in the stack * @param bubbleIndex Index of bubble in the stack * @param normalX Normalized x position of the stack * @param normalY Normalized y position of the stack */ void logBubbleEvent(@Nullable BubbleViewProvider provider, int action, String packageName, int bubbleCount, int bubbleIndex, float normalX, float normalY) { if (provider == null) { mLogger.logStackUiChanged(packageName, action, bubbleCount, normalX, normalY); } else if (provider.getKey().equals(BubbleOverflow.KEY)) { mLogger.logShowOverflow(packageName, action, bubbleCount, normalX, normalY); } else { mLogger.logBubbleUiChanged((Bubble) provider, packageName, action, bubbleCount, normalX, normalY, bubbleIndex); } } /** * Requests a change to the expanded state. * Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleLoggerImpl.java +49 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.bubbles; import com.android.internal.logging.UiEventLoggerImpl; import com.android.systemui.shared.system.SysUiStatsLog; /** * Implementation of UiEventLogger for logging bubble UI events. Loading Loading @@ -64,4 +65,52 @@ public class BubbleLoggerImpl extends UiEventLoggerImpl implements BubbleLogger log(b, Event.BUBBLE_OVERFLOW_ADD_USER_GESTURE); } } void logStackUiChanged(String packageName, int action, int bubbleCount, float normalX, float normalY) { SysUiStatsLog.write(SysUiStatsLog.BUBBLE_UI_CHANGED, packageName, null /* notification channel */, 0 /* notification ID */, 0 /* bubble position */, bubbleCount, action, normalX, normalY, false /* unread bubble */, false /* on-going bubble */, false /* isAppForeground (unused) */); } void logShowOverflow(String packageName, int action, int bubbleCount, float normalX, float normalY) { SysUiStatsLog.write(SysUiStatsLog.BUBBLE_UI_CHANGED, packageName, BubbleOverflow.KEY /* notification channel */, 0 /* notification ID */, 0 /* bubble position */, bubbleCount, action, normalX, normalY, false /* unread bubble */, false /* on-going bubble */, false /* isAppForeground (unused) */); } void logBubbleUiChanged(Bubble bubble, String packageName, int action, int bubbleCount, float normalX, float normalY, int index) { SysUiStatsLog.write(SysUiStatsLog.BUBBLE_UI_CHANGED, packageName, bubble.getChannelId() /* notification channel */, bubble.getNotificationId() /* notification ID */, index, bubbleCount, action, normalX, normalY, bubble.showInShade() /* isUnread */, false /* isOngoing (unused) */, false /* isAppForeground (unused) */); } } No newline at end of file
packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflow.java +0 −6 Original line number Diff line number Diff line Loading @@ -162,12 +162,6 @@ public class BubbleOverflow implements BubbleViewProvider { mExpandedView.setContentVisibility(visible); } @Override public void logUIEvent(int bubbleCount, int action, float normalX, float normalY, int index) { // TODO(b/149133814) Log overflow UI events. } @Override public View getIconView() { return mOverflowBtn; Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +7 −17 Original line number Diff line number Diff line Loading @@ -2891,23 +2891,13 @@ public class BubbleStackView extends FrameLayout * @param action the user interaction enum. */ private void logBubbleEvent(@Nullable BubbleViewProvider provider, int action) { if (provider == null || provider.getKey().equals(BubbleOverflow.KEY)) { SysUiStatsLog.write(SysUiStatsLog.BUBBLE_UI_CHANGED, mBubbleData.logBubbleEvent(provider, action, mContext.getApplicationInfo().packageName, provider == null ? null : BubbleOverflow.KEY /* notification channel */, 0 /* notification ID */, 0 /* bubble position */, getBubbleCount(), action, getBubbleIndex(provider), getNormalizedXPosition(), getNormalizedYPosition(), false /* unread bubble */, false /* on-going bubble */, false /* isAppForeground (unused) */); return; } provider.logUIEvent(getBubbleCount(), action, getNormalizedXPosition(), getNormalizedYPosition(), getBubbleIndex(provider)); getNormalizedYPosition()); } /** Loading