Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +17 −4 Original line number Diff line number Diff line Loading @@ -41,6 +41,9 @@ import android.view.accessibility.AccessibilityEvent; import android.widget.Chronometer; import android.widget.ImageView; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.MetricsProto; import com.android.internal.logging.MetricsProto.MetricsEvent; import com.android.internal.util.NotificationColorUtil; import com.android.systemui.R; import com.android.systemui.classifier.FalsingManager; Loading Loading @@ -138,11 +141,14 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { @Override public void onClick(View v) { if (!mShowingPublic && mGroupManager.isSummaryOfGroup(mStatusBarNotification)) { mGroupManager.toggleGroupExpansion(mStatusBarNotification); mOnExpandClickListener.onExpandClicked(mEntry, mGroupManager.isGroupExpanded(mStatusBarNotification)); final boolean wasExpanded = mGroupManager.isGroupExpanded(mStatusBarNotification); boolean nowExpanded = mGroupManager.toggleGroupExpansion(mStatusBarNotification); mOnExpandClickListener.onExpandClicked(mEntry, nowExpanded); mGroupExpansionChanging = true; updateBackgroundForGroupState(); MetricsLogger.action(mContext, MetricsEvent.ACTION_NOTIFICATION_GROUP_EXPANDER, nowExpanded); logExpansionEvent(true /* userAction */, wasExpanded); } else { boolean nowExpanded; if (isPinned()) { Loading @@ -154,6 +160,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } notifyHeightChanged(true); mOnExpandClickListener.onExpandClicked(mEntry, nowExpanded); MetricsLogger.action(mContext, MetricsEvent.ACTION_NOTIFICATION_EXPANDER, nowExpanded); } } }; Loading Loading @@ -1019,7 +1027,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { public void setUserExpanded(boolean userExpanded, boolean allowChildExpansion) { mFalsingManager.setNotificationExpanded(); if (mIsSummaryWithChildren && !mShowingPublic && allowChildExpansion) { final boolean wasExpanded = mGroupManager.isGroupExpanded(mStatusBarNotification); mGroupManager.setGroupExpanded(mStatusBarNotification, userExpanded); logExpansionEvent(true /* userAction */, wasExpanded); return; } if (userExpanded && !mExpandable) return; Loading Loading @@ -1505,7 +1515,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } private void logExpansionEvent(boolean userAction, boolean wasExpanded) { final boolean nowExpanded = isExpanded(); boolean nowExpanded = isExpanded(); if (mIsSummaryWithChildren) { nowExpanded = mGroupManager.isGroupExpanded(mStatusBarNotification); } if (wasExpanded != nowExpanded && mLogger != null) { mLogger.logNotificationExpansion(mLoggingKey, userAction, nowExpanded) ; } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java +4 −2 Original line number Diff line number Diff line Loading @@ -323,12 +323,14 @@ public class NotificationGroupManager implements HeadsUpManager.OnHeadsUpChanged : group.summary.row; } public void toggleGroupExpansion(StatusBarNotification sbn) { /** @return group expansion state after toggling. */ public boolean toggleGroupExpansion(StatusBarNotification sbn) { NotificationGroup group = mGroupMap.get(getGroupKey(sbn)); if (group == null) { return; return false; } setGroupExpanded(group, !group.expanded); return group.expanded; } private boolean isIsolated(StatusBarNotification sbn) { Loading proto/src/metrics_constants.proto +6 −0 Original line number Diff line number Diff line Loading @@ -2206,6 +2206,12 @@ message MetricsEvent { // Settings launched from expanded quick settings. ACTION_QS_EXPANDED_SETTINGS_LAUNCH = 406; // Notification expansion state toggled by the expand affordance. ACTION_NOTIFICATION_EXPANDER = 407; // Notification group expansion state toggled by the expand affordance. ACTION_NOTIFICATION_GROUP_EXPANDER = 408; // ---- End N Constants, all N constants go above this line ---- // ------- Begin N App Disambig Shade ----- Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +17 −4 Original line number Diff line number Diff line Loading @@ -41,6 +41,9 @@ import android.view.accessibility.AccessibilityEvent; import android.widget.Chronometer; import android.widget.ImageView; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.MetricsProto; import com.android.internal.logging.MetricsProto.MetricsEvent; import com.android.internal.util.NotificationColorUtil; import com.android.systemui.R; import com.android.systemui.classifier.FalsingManager; Loading Loading @@ -138,11 +141,14 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { @Override public void onClick(View v) { if (!mShowingPublic && mGroupManager.isSummaryOfGroup(mStatusBarNotification)) { mGroupManager.toggleGroupExpansion(mStatusBarNotification); mOnExpandClickListener.onExpandClicked(mEntry, mGroupManager.isGroupExpanded(mStatusBarNotification)); final boolean wasExpanded = mGroupManager.isGroupExpanded(mStatusBarNotification); boolean nowExpanded = mGroupManager.toggleGroupExpansion(mStatusBarNotification); mOnExpandClickListener.onExpandClicked(mEntry, nowExpanded); mGroupExpansionChanging = true; updateBackgroundForGroupState(); MetricsLogger.action(mContext, MetricsEvent.ACTION_NOTIFICATION_GROUP_EXPANDER, nowExpanded); logExpansionEvent(true /* userAction */, wasExpanded); } else { boolean nowExpanded; if (isPinned()) { Loading @@ -154,6 +160,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } notifyHeightChanged(true); mOnExpandClickListener.onExpandClicked(mEntry, nowExpanded); MetricsLogger.action(mContext, MetricsEvent.ACTION_NOTIFICATION_EXPANDER, nowExpanded); } } }; Loading Loading @@ -1019,7 +1027,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { public void setUserExpanded(boolean userExpanded, boolean allowChildExpansion) { mFalsingManager.setNotificationExpanded(); if (mIsSummaryWithChildren && !mShowingPublic && allowChildExpansion) { final boolean wasExpanded = mGroupManager.isGroupExpanded(mStatusBarNotification); mGroupManager.setGroupExpanded(mStatusBarNotification, userExpanded); logExpansionEvent(true /* userAction */, wasExpanded); return; } if (userExpanded && !mExpandable) return; Loading Loading @@ -1505,7 +1515,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } private void logExpansionEvent(boolean userAction, boolean wasExpanded) { final boolean nowExpanded = isExpanded(); boolean nowExpanded = isExpanded(); if (mIsSummaryWithChildren) { nowExpanded = mGroupManager.isGroupExpanded(mStatusBarNotification); } if (wasExpanded != nowExpanded && mLogger != null) { mLogger.logNotificationExpansion(mLoggingKey, userAction, nowExpanded) ; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java +4 −2 Original line number Diff line number Diff line Loading @@ -323,12 +323,14 @@ public class NotificationGroupManager implements HeadsUpManager.OnHeadsUpChanged : group.summary.row; } public void toggleGroupExpansion(StatusBarNotification sbn) { /** @return group expansion state after toggling. */ public boolean toggleGroupExpansion(StatusBarNotification sbn) { NotificationGroup group = mGroupMap.get(getGroupKey(sbn)); if (group == null) { return; return false; } setGroupExpanded(group, !group.expanded); return group.expanded; } private boolean isIsolated(StatusBarNotification sbn) { Loading
proto/src/metrics_constants.proto +6 −0 Original line number Diff line number Diff line Loading @@ -2206,6 +2206,12 @@ message MetricsEvent { // Settings launched from expanded quick settings. ACTION_QS_EXPANDED_SETTINGS_LAUNCH = 406; // Notification expansion state toggled by the expand affordance. ACTION_NOTIFICATION_EXPANDER = 407; // Notification group expansion state toggled by the expand affordance. ACTION_NOTIFICATION_GROUP_EXPANDER = 408; // ---- End N Constants, all N constants go above this line ---- // ------- Begin N App Disambig Shade ----- Loading