summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Winson Chung <winsonc@google.com> 2020-06-11 00:04:53 -0700
committer Winson Chung <winsonc@google.com> 2020-06-11 07:08:13 +0000
commitabea3c89ac298dc6c8cf900b23b14c13c50b69de (patch)
treecab00c3e523eb90fd1dc34d30c6fa81093f72506
parente6c5d04a218d3fd2dffce71058254798f509bbce (diff)
Add temporary logging for stuck nav button feedback
Bug: 156744680 Test: Just adding logging Change-Id: I80fce215cb335d39f8c22a790fb8da10bf514874
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java1
2 files changed, 10 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java
index 0db76ecf67fb..c929243085d6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java
@@ -28,6 +28,7 @@ import android.graphics.PixelFormat;
import android.graphics.RecordingCanvas;
import android.graphics.drawable.Drawable;
import android.os.Handler;
+import android.util.Log;
import android.view.RenderNodeAnimator;
import android.view.View;
import android.view.ViewConfiguration;
@@ -220,7 +221,7 @@ public class KeyButtonRipple extends Drawable {
@Override
public void jumpToCurrentState() {
- cancelAnimations();
+ cancelAnimations("jumpToCurrentState");
}
@Override
@@ -234,6 +235,7 @@ public class KeyButtonRipple extends Drawable {
}
public void setPressed(boolean pressed) {
+ Log.d("b/63783866", "KeyButtonRipple.setPressed: pressed=" + pressed);
if (mDark != mLastDark && pressed) {
mRipplePaint = null;
mLastDark = mDark;
@@ -253,7 +255,8 @@ public class KeyButtonRipple extends Drawable {
mHandler.removeCallbacksAndMessages(null);
}
- private void cancelAnimations() {
+ private void cancelAnimations(String reason) {
+ Log.d("b/63783866", "KeyButtonRipple.cancelAnimations: reason=" + reason);
mVisible = false;
mTmpArray.addAll(mRunningAnimations);
int size = mTmpArray.size();
@@ -284,7 +287,7 @@ public class KeyButtonRipple extends Drawable {
}
private void enterSoftware() {
- cancelAnimations();
+ cancelAnimations("enterSoftware");
mVisible = true;
mGlowAlpha = getMaxGlowAlpha();
ObjectAnimator scaleAnimator = ObjectAnimator.ofFloat(this, "glowScale",
@@ -370,7 +373,8 @@ public class KeyButtonRipple extends Drawable {
}
private void enterHardware() {
- cancelAnimations();
+ Log.d("b/63783866", "enterHardware");
+ cancelAnimations("enterHardware");
mVisible = true;
mDrawingHardwareGlow = true;
setExtendStart(CanvasProperty.createFloat(getExtendSize() / 2));
@@ -422,6 +426,7 @@ public class KeyButtonRipple extends Drawable {
}
private void exitHardware() {
+ Log.d("b/63783866", "exitHardware");
mPaintProp = CanvasProperty.createPaint(getRipplePaint());
final RenderNodeAnimator opacityAnim = new RenderNodeAnimator(mPaintProp,
RenderNodeAnimator.PAINT_ALPHA, 0);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
index 0ca8ef009173..8d7ecd09e760 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
@@ -441,6 +441,7 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
@Override
public void abortCurrentGesture() {
+ Log.d("b/63783866", "KeyButtonView.abortCurrentGesture");
setPressed(false);
mRipple.abortDelayedRipple();
mGestureAborted = true;