Revert "Make Notification long clickable"

Revert submission 21047384-b_264948201_make_notification_clickable

Reason for revert: Changes are not performant(perfetto_ft_systemui-missed_app_frames-mean).

Reverted changes: /q/submissionid:21047384-b_264948201_make_notification_clickable

Change-Id: Ic2810b3f09e477e2a1ca8f6641dbd4a75196813b
This commit is contained in:
Ibrahim Yilmaz
2023-02-06 18:04:04 +00:00
committed by Android (Google) Code Review
parent 4574b5fd59
commit 51f8ca7a49
2 changed files with 1 additions and 28 deletions

View File

@@ -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()) {

View File

@@ -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 */,