summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/SwipeHelper.java29
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSwipeHelper.java9
2 files changed, 36 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java
index 99d46629ad7a..c30a2146436c 100644
--- a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java
@@ -20,6 +20,7 @@ import static androidx.dynamicanimation.animation.DynamicAnimation.TRANSLATION_X
import static androidx.dynamicanimation.animation.FloatPropertyCompat.createFloatPropertyCompat;
import static com.android.systemui.classifier.Classifier.NOTIFICATION_DISMISS;
+import static com.android.systemui.statusbar.notification.NotificationUtils.logKey;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -54,9 +55,10 @@ import com.android.wm.shell.animation.FlingAnimationUtils;
import com.android.wm.shell.animation.PhysicsAnimator;
import com.android.wm.shell.animation.PhysicsAnimator.SpringConfig;
+import java.io.PrintWriter;
import java.util.function.Consumer;
-public class SwipeHelper implements Gefingerpoken {
+public class SwipeHelper implements Gefingerpoken, Dumpable {
static final String TAG = "com.android.systemui.SwipeHelper";
private static final boolean DEBUG_INVALIDATE = false;
private static final boolean CONSTRAIN_SWIPE = true;
@@ -844,6 +846,31 @@ public class SwipeHelper implements Gefingerpoken {
return false;
}
+ @Override
+ public void dump(@NonNull PrintWriter pw, @NonNull String[] args) {
+ pw.append("mTouchedView=").print(mTouchedView);
+ if (mTouchedView instanceof ExpandableNotificationRow) {
+ pw.append(" key=").println(logKey((ExpandableNotificationRow) mTouchedView));
+ } else {
+ pw.println();
+ }
+ pw.append("mIsSwiping=").println(mIsSwiping);
+ pw.append("mSnappingChild=").println(mSnappingChild);
+ pw.append("mLongPressSent=").println(mLongPressSent);
+ pw.append("mInitialTouchPos=").println(mInitialTouchPos);
+ pw.append("mTranslation=").println(mTranslation);
+ pw.append("mCanCurrViewBeDimissed=").println(mCanCurrViewBeDimissed);
+ pw.append("mMenuRowIntercepting=").println(mMenuRowIntercepting);
+ pw.append("mDisableHwLayers=").println(mDisableHwLayers);
+ pw.append("mDismissPendingMap: ").println(mDismissPendingMap.size());
+ if (!mDismissPendingMap.isEmpty()) {
+ mDismissPendingMap.forEach((view, animator) -> {
+ pw.append(" ").print(view);
+ pw.append(": ").println(animator);
+ });
+ }
+ }
+
public interface Callback {
View getChildAtPosition(MotionEvent ev);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSwipeHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSwipeHelper.java
index b956207190b7..7e327e66982c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSwipeHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSwipeHelper.java
@@ -34,6 +34,7 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.jank.InteractionJankMonitor;
import com.android.systemui.SwipeHelper;
import com.android.systemui.dagger.qualifiers.Main;
+import com.android.systemui.dump.DumpManager;
import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin;
@@ -545,14 +546,17 @@ class NotificationSwipeHelper extends SwipeHelper implements NotificationSwipeAc
private final FeatureFlags mFeatureFlags;
private NotificationCallback mNotificationCallback;
private NotificationMenuRowPlugin.OnMenuEventListener mOnMenuEventListener;
+ private DumpManager mDumpManager;
private NotificationRoundnessManager mNotificationRoundnessManager;
@Inject
Builder(@Main Resources resources, ViewConfiguration viewConfiguration,
+ DumpManager dumpManager,
FalsingManager falsingManager, FeatureFlags featureFlags,
NotificationRoundnessManager notificationRoundnessManager) {
mResources = resources;
mViewConfiguration = viewConfiguration;
+ mDumpManager = dumpManager;
mFalsingManager = falsingManager;
mFeatureFlags = featureFlags;
mNotificationRoundnessManager = notificationRoundnessManager;
@@ -570,9 +574,12 @@ class NotificationSwipeHelper extends SwipeHelper implements NotificationSwipeAc
}
NotificationSwipeHelper build() {
- return new NotificationSwipeHelper(mResources, mViewConfiguration, mFalsingManager,
+ NotificationSwipeHelper swipeHelper = new NotificationSwipeHelper(
+ mResources, mViewConfiguration, mFalsingManager,
mFeatureFlags, mNotificationCallback, mOnMenuEventListener,
mNotificationRoundnessManager);
+ mDumpManager.registerDumpable(swipeHelper);
+ return swipeHelper;
}
}
}