Remove dismiss-rtl setters because dismiss is bidirectional
Test: dismiss notifs; change RTL; dismiss more Change-Id: Ia3e0c80a1bfb81f039c6409718d5fbeced455939
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -82,7 +82,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;
|
||||||
@@ -787,14 +786,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;
|
||||||
|
|||||||
@@ -163,7 +163,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;
|
||||||
@@ -620,16 +619,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.
|
||||||
*/
|
*/
|
||||||
@@ -2918,7 +2907,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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -762,9 +762,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;
|
||||||
@@ -774,7 +771,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 -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user