Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +3 −0 Original line number Diff line number Diff line Loading @@ -458,6 +458,8 @@ public class BubbleController implements ConfigurationController.ConfigurationLi mSavedBubbleKeysPerUser = new SparseSetArray<>(); mCurrentUserId = mNotifUserManager.getCurrentUserId(); mBubbleData.setCurrentUserId(mCurrentUserId); mNotifUserManager.addUserChangedListener( new NotificationLockscreenUserManager.UserChangedListener() { @Override Loading @@ -466,6 +468,7 @@ public class BubbleController implements ConfigurationController.ConfigurationLi mBubbleData.dismissAll(DISMISS_USER_CHANGED); BubbleController.this.restoreBubbles(newUserId); mCurrentUserId = newUserId; mBubbleData.setCurrentUserId(newUserId); } }); Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java +10 −1 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import com.android.internal.annotations.VisibleForTesting; import com.android.systemui.R; import com.android.systemui.bubbles.BubbleController.DismissReason; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.shared.system.SysUiStatsLog; import com.android.systemui.statusbar.notification.NotificationEntryManager; import com.android.systemui.statusbar.notification.collection.NotificationEntry; Loading @@ -61,6 +62,8 @@ public class BubbleData { private BubbleLoggerImpl mLogger = new BubbleLoggerImpl(); private int mCurrentUserId; private static final String TAG = TAG_WITH_CLASS_NAME ? "BubbleData" : TAG_BUBBLES; private static final Comparator<Bubble> BUBBLES_BY_SORT_KEY_DESCENDING = Loading Loading @@ -617,6 +620,10 @@ public class BubbleData { mStateChange.selectionChanged = true; } void setCurrentUserId(int uid) { mCurrentUserId = uid; } /** * Logs the bubble UI event. * Loading @@ -634,7 +641,9 @@ public class BubbleData { if (provider == null) { mLogger.logStackUiChanged(packageName, action, bubbleCount, normalX, normalY); } else if (provider.getKey().equals(BubbleOverflow.KEY)) { mLogger.logShowOverflow(packageName, action, bubbleCount, normalX, normalY); if (action == SysUiStatsLog.BUBBLE_UICHANGED__ACTION__EXPANDED) { mLogger.logShowOverflow(packageName, mCurrentUserId); } } else { mLogger.logBubbleUiChanged((Bubble) provider, packageName, action, bubbleCount, normalX, normalY, bubbleIndex); Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleLogger.java +4 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,10 @@ public interface BubbleLogger extends UiEventLogger { BUBBLE_OVERFLOW_REMOVE_BACK_TO_STACK(489), @UiEvent(doc = "User blocked notification from bubbling, remove bubble from overflow.") BUBBLE_OVERFLOW_REMOVE_BLOCKED(490); BUBBLE_OVERFLOW_REMOVE_BLOCKED(490), @UiEvent(doc = "User selected the overflow.") BUBBLE_OVERFLOW_SELECTED(600); private final int mId; Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleLoggerImpl.java +6 −19 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.systemui.bubbles; import android.os.UserHandle; import com.android.internal.logging.UiEventLoggerImpl; import com.android.systemui.shared.system.SysUiStatsLog; Loading @@ -31,11 +33,7 @@ public class BubbleLoggerImpl extends UiEventLoggerImpl implements BubbleLogger * @param e UI event */ public void log(Bubble b, UiEventEnum e) { if (b.getInstanceId() == null) { // Added from persistence -- TODO log this with specific event? return; } logWithInstanceId(e, b.getAppUid(), b.getPackageName(), b.getInstanceId()); super.log(e, b.getUser().getIdentifier(), b.getPackageName()); } /** Loading Loading @@ -82,20 +80,9 @@ public class BubbleLoggerImpl extends UiEventLoggerImpl implements BubbleLogger 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 logShowOverflow(String packageName, int currentUserId) { super.log(BubbleLogger.Event.BUBBLE_OVERFLOW_SELECTED, currentUserId, packageName); } void logBubbleUiChanged(Bubble bubble, String packageName, int action, int bubbleCount, Loading Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +3 −0 Original line number Diff line number Diff line Loading @@ -458,6 +458,8 @@ public class BubbleController implements ConfigurationController.ConfigurationLi mSavedBubbleKeysPerUser = new SparseSetArray<>(); mCurrentUserId = mNotifUserManager.getCurrentUserId(); mBubbleData.setCurrentUserId(mCurrentUserId); mNotifUserManager.addUserChangedListener( new NotificationLockscreenUserManager.UserChangedListener() { @Override Loading @@ -466,6 +468,7 @@ public class BubbleController implements ConfigurationController.ConfigurationLi mBubbleData.dismissAll(DISMISS_USER_CHANGED); BubbleController.this.restoreBubbles(newUserId); mCurrentUserId = newUserId; mBubbleData.setCurrentUserId(newUserId); } }); Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java +10 −1 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import com.android.internal.annotations.VisibleForTesting; import com.android.systemui.R; import com.android.systemui.bubbles.BubbleController.DismissReason; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.shared.system.SysUiStatsLog; import com.android.systemui.statusbar.notification.NotificationEntryManager; import com.android.systemui.statusbar.notification.collection.NotificationEntry; Loading @@ -61,6 +62,8 @@ public class BubbleData { private BubbleLoggerImpl mLogger = new BubbleLoggerImpl(); private int mCurrentUserId; private static final String TAG = TAG_WITH_CLASS_NAME ? "BubbleData" : TAG_BUBBLES; private static final Comparator<Bubble> BUBBLES_BY_SORT_KEY_DESCENDING = Loading Loading @@ -617,6 +620,10 @@ public class BubbleData { mStateChange.selectionChanged = true; } void setCurrentUserId(int uid) { mCurrentUserId = uid; } /** * Logs the bubble UI event. * Loading @@ -634,7 +641,9 @@ public class BubbleData { if (provider == null) { mLogger.logStackUiChanged(packageName, action, bubbleCount, normalX, normalY); } else if (provider.getKey().equals(BubbleOverflow.KEY)) { mLogger.logShowOverflow(packageName, action, bubbleCount, normalX, normalY); if (action == SysUiStatsLog.BUBBLE_UICHANGED__ACTION__EXPANDED) { mLogger.logShowOverflow(packageName, mCurrentUserId); } } else { mLogger.logBubbleUiChanged((Bubble) provider, packageName, action, bubbleCount, normalX, normalY, bubbleIndex); Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleLogger.java +4 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,10 @@ public interface BubbleLogger extends UiEventLogger { BUBBLE_OVERFLOW_REMOVE_BACK_TO_STACK(489), @UiEvent(doc = "User blocked notification from bubbling, remove bubble from overflow.") BUBBLE_OVERFLOW_REMOVE_BLOCKED(490); BUBBLE_OVERFLOW_REMOVE_BLOCKED(490), @UiEvent(doc = "User selected the overflow.") BUBBLE_OVERFLOW_SELECTED(600); private final int mId; Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleLoggerImpl.java +6 −19 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.systemui.bubbles; import android.os.UserHandle; import com.android.internal.logging.UiEventLoggerImpl; import com.android.systemui.shared.system.SysUiStatsLog; Loading @@ -31,11 +33,7 @@ public class BubbleLoggerImpl extends UiEventLoggerImpl implements BubbleLogger * @param e UI event */ public void log(Bubble b, UiEventEnum e) { if (b.getInstanceId() == null) { // Added from persistence -- TODO log this with specific event? return; } logWithInstanceId(e, b.getAppUid(), b.getPackageName(), b.getInstanceId()); super.log(e, b.getUser().getIdentifier(), b.getPackageName()); } /** Loading Loading @@ -82,20 +80,9 @@ public class BubbleLoggerImpl extends UiEventLoggerImpl implements BubbleLogger 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 logShowOverflow(String packageName, int currentUserId) { super.log(BubbleLogger.Event.BUBBLE_OVERFLOW_SELECTED, currentUserId, packageName); } void logBubbleUiChanged(Bubble bubble, String packageName, int action, int bubbleCount, Loading