Remove dismiss-rtl setters because dismiss is bidirectional am: 53f489d7b0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16150087 Change-Id: I287508567fcaa7ecea1f90e682e334539359d1c7
This commit is contained in:
@@ -182,12 +182,6 @@ public interface NotificationMenuRowPlugin extends Plugin {
|
||||
*/
|
||||
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.
|
||||
* @return true if the menu should remain open, false otherwise.
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -85,7 +85,6 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl
|
||||
private ArrayList<MenuItem> mRightMenuItems;
|
||||
private final Map<View, MenuItem> mMenuItemsByView = new ArrayMap<>();
|
||||
private OnMenuEventListener mMenuListener;
|
||||
private boolean mDismissRtl;
|
||||
|
||||
private ValueAnimator mFadeAnimator;
|
||||
private boolean mAnimating;
|
||||
@@ -790,14 +789,6 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl
|
||||
return getParent().canViewBeDismissed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDismissRtl(boolean dismissRtl) {
|
||||
mDismissRtl = dismissRtl;
|
||||
if (mMenuContainer != null) {
|
||||
createMenuViews(true);
|
||||
}
|
||||
}
|
||||
|
||||
public static class NotificationMenuItem implements MenuItem {
|
||||
View mMenuView;
|
||||
GutsContent mGutsContent;
|
||||
|
||||
@@ -161,7 +161,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
||||
private final Paint mBackgroundPaint = new Paint();
|
||||
private final boolean mShouldDrawNotificationBackground;
|
||||
private boolean mHighPriorityBeforeSpeedBump;
|
||||
private boolean mDismissRtl;
|
||||
|
||||
private float mExpandedHeight;
|
||||
private int mOwnScrollY;
|
||||
@@ -613,16 +612,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
||||
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.
|
||||
*/
|
||||
@@ -2915,7 +2904,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
||||
updateChronometerForChild(child);
|
||||
if (child instanceof ExpandableNotificationRow) {
|
||||
ExpandableNotificationRow row = (ExpandableNotificationRow) child;
|
||||
row.setDismissRtl(mDismissRtl);
|
||||
row.setDismissUsingRowTranslationX(mDismissUsingRowTranslationX);
|
||||
|
||||
}
|
||||
|
||||
@@ -783,9 +783,6 @@ public class NotificationStackScrollLayoutController {
|
||||
mTunerService.addTunable(
|
||||
(key, newValue) -> {
|
||||
switch (key) {
|
||||
case Settings.Secure.NOTIFICATION_DISMISS_RTL:
|
||||
mView.updateDismissRtlSetting("1".equals(newValue));
|
||||
break;
|
||||
case Settings.Secure.NOTIFICATION_HISTORY_ENABLED:
|
||||
updateFooter();
|
||||
break;
|
||||
@@ -795,7 +792,6 @@ public class NotificationStackScrollLayoutController {
|
||||
}
|
||||
},
|
||||
HIGH_PRIORITY,
|
||||
Settings.Secure.NOTIFICATION_DISMISS_RTL,
|
||||
Settings.Secure.NOTIFICATION_HISTORY_ENABLED);
|
||||
|
||||
mKeyguardMediaController.setVisibilityChangedListener(visible -> {
|
||||
|
||||
Reference in New Issue
Block a user