summaryrefslogtreecommitdiff
path: root/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java')
-rw-r--r--java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
index 5c1ee47e6..ea5956c8c 100644
--- a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
+++ b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
@@ -28,6 +28,7 @@ import android.content.res.ColorStateList;
import android.graphics.PorterDuff.Mode;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
+import android.os.Trace;
import android.support.annotation.ColorInt;
import android.support.annotation.FloatRange;
import android.support.annotation.IntDef;
@@ -157,6 +158,7 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged
@Override
public void onStart() {
+ Trace.beginSection("FlingUpDownMethod.onStart");
super.onStart();
falsingManager.onScreenOn();
if (getView() != null) {
@@ -170,22 +172,26 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged
startSwipeToAnswerEntryAnimation();
}
}
+ Trace.endSection();
}
@Override
public void onStop() {
+ Trace.beginSection("FlingUpDownMethod.onStop");
endAnimation();
falsingManager.onScreenOff();
if (getActivity().isFinishing()) {
setAnimationState(AnimationState.COMPLETED);
}
super.onStop();
+ Trace.endSection();
}
@Nullable
@Override
public View onCreateView(
LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, @Nullable Bundle bundle) {
+ Trace.beginSection("FlingUpDownMethod.onCreateView");
View view = layoutInflater.inflate(R.layout.swipe_up_down_method, viewGroup, false);
contactPuckContainer = view.findViewById(R.id.incoming_call_puck_container);
@@ -242,6 +248,7 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged
(ViewGroup) view.findViewById(R.id.hint_container),
contactPuckContainer,
swipeToAnswerText);
+ Trace.endSection();
return view;
}
@@ -400,6 +407,7 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged
}
private void updateSwipeTextAndPuckForTouch() {
+ Trace.beginSection("FlingUpDownMethod.updateSwipeTextAndPuckForTouch");
// Clamp progress value between -1 and 1.
final float clampedProgress = MathUtil.clamp(swipeProgress, -1 /* min */, 1 /* max */);
final float positiveAdjustedProgress = Math.abs(clampedProgress);
@@ -473,6 +481,7 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged
}
getParent().onAnswerProgressUpdate(clampedProgress);
+ Trace.endSection();
}
private void startSwipeToAnswerSwipeAnimation() {