Merge "Revert "Make Notification long clickable"" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
324457d58a
@@ -591,7 +591,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
||||
}
|
||||
mShowingPublicInitialized = false;
|
||||
updateNotificationColor();
|
||||
updateLongClickable();
|
||||
if (mMenuRow != null) {
|
||||
mMenuRow.onNotificationUpdated(mEntry.getSbn());
|
||||
mMenuRow.setAppName(mAppName);
|
||||
@@ -1197,26 +1196,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
||||
return getShowingLayout().getVisibleWrapper();
|
||||
}
|
||||
|
||||
private boolean isNotificationRowLongClickable() {
|
||||
if (mLongPressListener == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!areGutsExposed()) { // guts is not opened
|
||||
return true;
|
||||
}
|
||||
|
||||
// if it is leave behind, it shouldn't be long clickable.
|
||||
return !isGutsLeaveBehind();
|
||||
}
|
||||
|
||||
private void updateLongClickable() {
|
||||
setLongClickable(isNotificationRowLongClickable());
|
||||
}
|
||||
|
||||
public void setLongPressListener(LongPressListener longPressListener) {
|
||||
mLongPressListener = longPressListener;
|
||||
updateLongClickable();
|
||||
}
|
||||
|
||||
public void setDragController(ExpandableNotificationRowDragController dragController) {
|
||||
@@ -2063,13 +2044,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
||||
void onGutsOpened() {
|
||||
resetTranslation();
|
||||
updateContentAccessibilityImportanceForGuts(false /* isEnabled */);
|
||||
updateLongClickable();
|
||||
}
|
||||
|
||||
void onGutsClosed() {
|
||||
updateContentAccessibilityImportanceForGuts(true /* isEnabled */);
|
||||
mIsSnoozed = false;
|
||||
updateLongClickable();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2968,10 +2947,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
||||
return (mGuts != null && mGuts.isExposed());
|
||||
}
|
||||
|
||||
private boolean isGutsLeaveBehind() {
|
||||
return (mGuts != null && mGuts.isLeavebehind());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isContentExpandable() {
|
||||
if (mIsSummaryWithChildren && !shouldShowPublic()) {
|
||||
|
||||
@@ -586,9 +586,7 @@ public class NotificationGutsManager implements NotifGutsViewManager {
|
||||
}
|
||||
|
||||
final ExpandableNotificationRow row = (ExpandableNotificationRow) view;
|
||||
if (view.isLongClickable()) {
|
||||
view.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
|
||||
}
|
||||
view.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
|
||||
if (row.areGutsExposed()) {
|
||||
closeAndSaveGuts(false /* removeLeavebehind */, false /* force */,
|
||||
true /* removeControls */, -1 /* x */, -1 /* y */,
|
||||
|
||||
Reference in New Issue
Block a user