Remove dismiss-rtl setters because dismiss is bidirectional

Fixes: 204127880
Test: dismiss notifs; change RTL; dismiss more
Merged-In: Ia3e0c80a1bfb81f039c6409718d5fbeced455939
Change-Id: Ia3e0c80a1bfb81f039c6409718d5fbeced455939
This commit is contained in:
Jeff DeCew
2021-09-10 20:10:11 +00:00
parent caf2293885
commit 53f489d7b0
5 changed files with 0 additions and 38 deletions

View File

@@ -182,12 +182,6 @@ public interface NotificationMenuRowPlugin extends Plugin {
*/ */
public boolean canBeDismissed(); public boolean canBeDismissed();
/**
* Informs the menu whether dismiss gestures are left-to-right or right-to-left.
*/
default void setDismissRtl(boolean dismissRtl) {
}
/** /**
* Determines whether the menu should remain open given its current state, or snap closed. * Determines whether the menu should remain open given its current state, or snap closed.
* @return true if the menu should remain open, false otherwise. * @return true if the menu should remain open, false otherwise.

View File

@@ -3201,13 +3201,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
} }
} }
/** Sets whether dismiss gestures are right-to-left (instead of left-to-right). */
public void setDismissRtl(boolean dismissRtl) {
if (mMenuRow != null) {
mMenuRow.setDismissRtl(dismissRtl);
}
}
private static class NotificationViewState extends ExpandableViewState { private static class NotificationViewState extends ExpandableViewState {
@Override @Override

View File

@@ -85,7 +85,6 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl
private ArrayList<MenuItem> mRightMenuItems; private ArrayList<MenuItem> mRightMenuItems;
private final Map<View, MenuItem> mMenuItemsByView = new ArrayMap<>(); private final Map<View, MenuItem> mMenuItemsByView = new ArrayMap<>();
private OnMenuEventListener mMenuListener; private OnMenuEventListener mMenuListener;
private boolean mDismissRtl;
private ValueAnimator mFadeAnimator; private ValueAnimator mFadeAnimator;
private boolean mAnimating; private boolean mAnimating;
@@ -790,14 +789,6 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl
return getParent().canViewBeDismissed(); return getParent().canViewBeDismissed();
} }
@Override
public void setDismissRtl(boolean dismissRtl) {
mDismissRtl = dismissRtl;
if (mMenuContainer != null) {
createMenuViews(true);
}
}
public static class NotificationMenuItem implements MenuItem { public static class NotificationMenuItem implements MenuItem {
View mMenuView; View mMenuView;
GutsContent mGutsContent; GutsContent mGutsContent;

View File

@@ -161,7 +161,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
private final Paint mBackgroundPaint = new Paint(); private final Paint mBackgroundPaint = new Paint();
private final boolean mShouldDrawNotificationBackground; private final boolean mShouldDrawNotificationBackground;
private boolean mHighPriorityBeforeSpeedBump; private boolean mHighPriorityBeforeSpeedBump;
private boolean mDismissRtl;
private float mExpandedHeight; private float mExpandedHeight;
private int mOwnScrollY; private int mOwnScrollY;
@@ -613,16 +612,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
addView(mFgsSectionView, -1); addView(mFgsSectionView, -1);
} }
void updateDismissRtlSetting(boolean dismissRtl) {
mDismissRtl = dismissRtl;
for (int i = 0; i < getChildCount(); i++) {
View child = getChildAt(i);
if (child instanceof ExpandableNotificationRow) {
((ExpandableNotificationRow) child).setDismissRtl(dismissRtl);
}
}
}
/** /**
* Set the overexpansion of the panel to be applied to the view. * Set the overexpansion of the panel to be applied to the view.
*/ */
@@ -2915,7 +2904,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
updateChronometerForChild(child); updateChronometerForChild(child);
if (child instanceof ExpandableNotificationRow) { if (child instanceof ExpandableNotificationRow) {
ExpandableNotificationRow row = (ExpandableNotificationRow) child; ExpandableNotificationRow row = (ExpandableNotificationRow) child;
row.setDismissRtl(mDismissRtl);
row.setDismissUsingRowTranslationX(mDismissUsingRowTranslationX); row.setDismissUsingRowTranslationX(mDismissUsingRowTranslationX);
} }

View File

@@ -783,9 +783,6 @@ public class NotificationStackScrollLayoutController {
mTunerService.addTunable( mTunerService.addTunable(
(key, newValue) -> { (key, newValue) -> {
switch (key) { switch (key) {
case Settings.Secure.NOTIFICATION_DISMISS_RTL:
mView.updateDismissRtlSetting("1".equals(newValue));
break;
case Settings.Secure.NOTIFICATION_HISTORY_ENABLED: case Settings.Secure.NOTIFICATION_HISTORY_ENABLED:
updateFooter(); updateFooter();
break; break;
@@ -795,7 +792,6 @@ public class NotificationStackScrollLayoutController {
} }
}, },
HIGH_PRIORITY, HIGH_PRIORITY,
Settings.Secure.NOTIFICATION_DISMISS_RTL,
Settings.Secure.NOTIFICATION_HISTORY_ENABLED); Settings.Secure.NOTIFICATION_HISTORY_ENABLED);
mKeyguardMediaController.setVisibilityChangedListener(visible -> { mKeyguardMediaController.setVisibilityChangedListener(visible -> {