diff options
author | Eric Erfanian <erfanian@google.com> | 2017-03-15 14:41:07 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-03-15 16:24:23 -0700 |
commit | d5e47f6da5b08b13ecdfa7f1edc7e12aeb83fab9 (patch) | |
tree | b54abbb51fb7d66e7755a1fbb5db023ff601090b /java/com/android/incallui/answer/impl/answermethod | |
parent | 30436e7e6d3f2c8755a91b2b6222b74d465a9e87 (diff) |
Update Dialer source from latest green build.
* Refactor voicemail component
* Add new enriched calling components
Test: treehugger, manual aosp testing
Change-Id: I521a0f86327d4b42e14d93927c7d613044ed5942
Diffstat (limited to 'java/com/android/incallui/answer/impl/answermethod')
-rw-r--r-- | java/com/android/incallui/answer/impl/answermethod/AnswerMethodHolder.java | 2 | ||||
-rw-r--r-- | java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java | 15 |
2 files changed, 12 insertions, 5 deletions
diff --git a/java/com/android/incallui/answer/impl/answermethod/AnswerMethodHolder.java b/java/com/android/incallui/answer/impl/answermethod/AnswerMethodHolder.java index 4052281b7..afa194f2e 100644 --- a/java/com/android/incallui/answer/impl/answermethod/AnswerMethodHolder.java +++ b/java/com/android/incallui/answer/impl/answermethod/AnswerMethodHolder.java @@ -44,4 +44,6 @@ public interface AnswerMethodHolder { * @return true iff the current call is a video call. */ boolean isVideoCall(); + + boolean isVideoUpgradeRequest(); } diff --git a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java index 0bc65818c..6e8e1f7bf 100644 --- a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java +++ b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java @@ -60,7 +60,7 @@ import com.android.incallui.answer.impl.answermethod.FlingUpDownTouchHandler.OnP import com.android.incallui.answer.impl.classifier.FalsingManager; import com.android.incallui.answer.impl.hint.AnswerHint; import com.android.incallui.answer.impl.hint.AnswerHintFactory; -import com.android.incallui.answer.impl.hint.EventPayloadLoaderImpl; +import com.android.incallui.answer.impl.hint.PawImageLoaderImpl; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -228,7 +228,7 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged touchHandler = FlingUpDownTouchHandler.attach(view, this, falsingManager); answerHint = - new AnswerHintFactory(new EventPayloadLoaderImpl()) + new AnswerHintFactory(new PawImageLoaderImpl()) .create(getContext(), ANIMATE_DURATION_LONG_MILLIS, BOUNCE_ANIMATION_DELAY); answerHint.onCreateView( layoutInflater, @@ -319,7 +319,7 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged if (contactPuckIcon == null) { return; } - if (getParent().isVideoCall()) { + if (getParent().isVideoCall() || getParent().isVideoUpgradeRequest()) { contactPuckIcon.setImageResource(R.drawable.quantum_ic_videocam_white_24); } else { contactPuckIcon.setImageResource(R.drawable.quantum_ic_call_white_24); @@ -348,7 +348,8 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged } private boolean shouldShowPhotoInPuck() { - return getParent().isVideoCall() && contactPhoto != null; + return (getParent().isVideoCall() || getParent().isVideoUpgradeRequest()) + && contactPhoto != null; } @Override @@ -387,6 +388,10 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged // Since the animation progression is controlled by user gesture instead of real timeline, the // spec timeline can be divided into 9 slots. Each slot is equivalent to 83ms in the spec. // Therefore, we use 9 slots of 83ms to map user gesture into the spec timeline. + // + // See specs - + // Accept: https://direct.googleplex.com/#/spec/8510001 + // Decline: https://direct.googleplex.com/#/spec/3850001 final float progressSlots = 9; // Fade out the "swipe up to answer". It only takes 1 slot to complete the fade. @@ -414,7 +419,7 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged contactPuckBackground.setColorFilter(destPuckColor); // Animate decline icon - if (isAcceptingFlow || getParent().isVideoCall()) { + if (isAcceptingFlow || getParent().isVideoCall() || getParent().isVideoUpgradeRequest()) { rotateToward(contactPuckIcon, 0f); } else { rotateToward(contactPuckIcon, positiveAdjustedProgress * ICON_END_CALL_ROTATION_DEGREES); |