Fixed the handling of the expand on the lockscreen
The user can now directly go to the unlockd shade
by doubletapping the expand button.
Change-Id: Id4c3c901eaa29482e7473480feee5701bbdf29af
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index 81e20aa..7a94a58 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -104,14 +104,20 @@
private boolean mIconAnimationRunning;
private boolean mShowNoBackground;
private ExpandableNotificationRow mNotificationParent;
+ private OnExpandClickListener mOnExpandClickListener;
private OnClickListener mExpandClickListener = new OnClickListener() {
@Override
public void onClick(View v) {
if (mGroupManager.isSummaryOfGroup(mStatusBarNotification)) {
mGroupManager.toggleGroupExpansion(mStatusBarNotification);
+ mOnExpandClickListener.onExpandClicked(ExpandableNotificationRow.this,
+ mGroupManager.isGroupExpanded(mStatusBarNotification));
} else {
- setUserExpanded(!isExpanded());
+ boolean nowExpanded = !isExpanded();
+ setUserExpanded(nowExpanded);
notifyHeightChanged(true);
+ mOnExpandClickListener.onExpandClicked(ExpandableNotificationRow.this,
+ nowExpanded);
}
}
};
@@ -421,6 +427,10 @@
mPrivateLayout.setSubTextVisible(visible);
}
+ public void setOnExpandClickListener(OnExpandClickListener onExpandClickListener) {
+ mOnExpandClickListener = onExpandClickListener;
+ }
+
public interface ExpansionLogger {
public void logNotificationExpansion(String key, boolean userAction, boolean expanded);
}
@@ -986,4 +996,8 @@
mLogger.logNotificationExpansion(mLoggingKey, userAction, nowExpanded) ;
}
}
+
+ public interface OnExpandClickListener {
+ void onExpandClicked(View clickedView, boolean nowExpanded);
+ }
}