Merge "add metrics for gestural notification expansions" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cd9ea74659
@@ -1491,6 +1491,14 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
|
|||||||
mLoggingKey = key;
|
mLoggingKey = key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onExpandedByGesture(boolean userExpanded) {
|
||||||
|
int event = MetricsEvent.ACTION_NOTIFICATION_GESTURE_EXPANDER;
|
||||||
|
if (mGroupManager.isSummaryOfGroup(getStatusBarNotification())) {
|
||||||
|
event = MetricsEvent.ACTION_NOTIFICATION_GROUP_GESTURE_EXPANDER;
|
||||||
|
}
|
||||||
|
MetricsLogger.action(mContext, event, userExpanded);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getIncreasedPaddingAmount() {
|
public float getIncreasedPaddingAmount() {
|
||||||
if (mIsSummaryWithChildren) {
|
if (mIsSummaryWithChildren) {
|
||||||
|
|||||||
@@ -4339,6 +4339,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
|||||||
|
|
||||||
// ---------------------- DragDownHelper.OnDragDownListener ------------------------------------
|
// ---------------------- DragDownHelper.OnDragDownListener ------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
/* Only ever called as a consequence of a lockscreen expansion gesture. */
|
||||||
@Override
|
@Override
|
||||||
public boolean onDraggedDown(View startingChild, int dragLengthY) {
|
public boolean onDraggedDown(View startingChild, int dragLengthY) {
|
||||||
if (hasActiveNotifications()) {
|
if (hasActiveNotifications()) {
|
||||||
@@ -4349,6 +4351,10 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
|||||||
|
|
||||||
// We have notifications, go to locked shade.
|
// We have notifications, go to locked shade.
|
||||||
goToLockedShade(startingChild);
|
goToLockedShade(startingChild);
|
||||||
|
if (startingChild instanceof ExpandableNotificationRow) {
|
||||||
|
ExpandableNotificationRow row = (ExpandableNotificationRow) startingChild;
|
||||||
|
row.onExpandedByGesture(true /* drag down is always an open */);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|||||||
@@ -959,11 +959,13 @@ public class NotificationStackScrollLayout extends ViewGroup
|
|||||||
&& (mIsExpanded || !((ExpandableNotificationRow) v).isPinned());
|
&& (mIsExpanded || !((ExpandableNotificationRow) v).isPinned());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Only ever called as a consequence of an expansion gesture in the shade. */
|
||||||
@Override
|
@Override
|
||||||
public void setUserExpandedChild(View v, boolean userExpanded) {
|
public void setUserExpandedChild(View v, boolean userExpanded) {
|
||||||
if (v instanceof ExpandableNotificationRow) {
|
if (v instanceof ExpandableNotificationRow) {
|
||||||
((ExpandableNotificationRow) v).setUserExpanded(userExpanded,
|
ExpandableNotificationRow row = (ExpandableNotificationRow) v;
|
||||||
true /* allowChildrenExpansion */);
|
row.setUserExpanded(userExpanded, true /* allowChildrenExpansion */);
|
||||||
|
row.onExpandedByGesture(userExpanded);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2212,6 +2212,12 @@ message MetricsEvent {
|
|||||||
// Notification group expansion state toggled by the expand affordance.
|
// Notification group expansion state toggled by the expand affordance.
|
||||||
ACTION_NOTIFICATION_GROUP_EXPANDER = 408;
|
ACTION_NOTIFICATION_GROUP_EXPANDER = 408;
|
||||||
|
|
||||||
|
// Notification expansion state toggled by the expand gesture.
|
||||||
|
ACTION_NOTIFICATION_GESTURE_EXPANDER = 409;
|
||||||
|
|
||||||
|
// Notification group expansion state toggled by the expand gesture.
|
||||||
|
ACTION_NOTIFICATION_GROUP_GESTURE_EXPANDER = 410;
|
||||||
|
|
||||||
// Add new aosp constants above this line.
|
// Add new aosp constants above this line.
|
||||||
// END OF AOSP CONSTANTS
|
// END OF AOSP CONSTANTS
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user