summaryrefslogtreecommitdiffstats
path: root/java/com/android/incallui
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-03-16 11:07:39 -0700
committerEric Erfanian <erfanian@google.com>2017-03-16 11:12:53 -0700
commit1019500220518fb5fb023fcb7d370ab3cbf12307 (patch)
treef638cd81db6951acb34f20caf68d1e5d26191adb /java/com/android/incallui
parentd5e47f6da5b08b13ecdfa7f1edc7e12aeb83fab9 (diff)
downloadandroid_packages_apps_Dialer-1019500220518fb5fb023fcb7d370ab3cbf12307.tar.gz
android_packages_apps_Dialer-1019500220518fb5fb023fcb7d370ab3cbf12307.tar.bz2
android_packages_apps_Dialer-1019500220518fb5fb023fcb7d370ab3cbf12307.zip
Update dialer to tap green cl 150332012.
Test: Treehugger Change-Id: If2baab1d3fc2dee602a4f784bba532182e7174f5
Diffstat (limited to 'java/com/android/incallui')
-rw-r--r--java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java4
-rw-r--r--java/com/android/incallui/calllocation/impl/GoogleLocationSettingHelper.java3
-rw-r--r--java/com/android/incallui/calllocation/impl/HttpFetcher.java2
-rw-r--r--java/com/android/incallui/incall/impl/FakeDragAnimation.java62
-rw-r--r--java/com/android/incallui/incall/impl/InCallFragment.java15
5 files changed, 10 insertions, 76 deletions
diff --git a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
index 6e8e1f7bf..587b923c4 100644
--- a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
+++ b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
@@ -388,10 +388,6 @@ 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.
diff --git a/java/com/android/incallui/calllocation/impl/GoogleLocationSettingHelper.java b/java/com/android/incallui/calllocation/impl/GoogleLocationSettingHelper.java
index 18a80b8ce..bcb3e8dbb 100644
--- a/java/com/android/incallui/calllocation/impl/GoogleLocationSettingHelper.java
+++ b/java/com/android/incallui/calllocation/impl/GoogleLocationSettingHelper.java
@@ -28,8 +28,7 @@ import android.provider.Settings.SettingNotFoundException;
import com.android.dialer.common.LogUtil;
/**
- * Helper class to check if Google Location Services is enabled. This class is based on
- * https://docs.google.com/a/google.com/document/d/1sGm8pHgGY1QmxbLCwTZuWQASEDN7CFW9EPSZXAuGQfo
+ * Helper class to check if Google Location Services is enabled.
*/
public class GoogleLocationSettingHelper {
diff --git a/java/com/android/incallui/calllocation/impl/HttpFetcher.java b/java/com/android/incallui/calllocation/impl/HttpFetcher.java
index 7bfbaa6ef..c4aaa2257 100644
--- a/java/com/android/incallui/calllocation/impl/HttpFetcher.java
+++ b/java/com/android/incallui/calllocation/impl/HttpFetcher.java
@@ -223,8 +223,6 @@ public class HttpFetcher {
/**
* Lookup up url re-write rules from gServices and apply to the given url.
*
- * <p>https://wiki.corp.google.com/twiki/bin/view/Main/AndroidGservices#URL_Rewriting_Rules
- *
* @return The new url.
*/
private static URL reWriteUrl(Context context, String url) {
diff --git a/java/com/android/incallui/incall/impl/FakeDragAnimation.java b/java/com/android/incallui/incall/impl/FakeDragAnimation.java
deleted file mode 100644
index c84c3c409..000000000
--- a/java/com/android/incallui/incall/impl/FakeDragAnimation.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.incallui.incall.impl;
-
-import android.animation.ValueAnimator;
-import android.animation.ValueAnimator.AnimatorUpdateListener;
-import android.support.v4.view.ViewPager;
-import android.support.v4.view.animation.FastOutSlowInInterpolator;
-
-/**
- * An animation that controls the fake drag of a {@link ViewPager}. See {@link
- * ViewPager#fakeDragBy(float)} for more details.
- */
-public class FakeDragAnimation implements AnimatorUpdateListener {
-
- /** The view to animate. */
- private final ViewPager pager;
-
- private final ValueAnimator animator;
- private int oldDragPosition;
-
- public FakeDragAnimation(ViewPager pager) {
- this.pager = pager;
- animator = ValueAnimator.ofInt(0, pager.getWidth());
- animator.addUpdateListener(this);
- animator.setInterpolator(new FastOutSlowInInterpolator());
- animator.setDuration(600);
- }
-
- public void start() {
- animator.start();
- }
-
- @Override
- public void onAnimationUpdate(ValueAnimator animation) {
- if (!pager.isFakeDragging()) {
- pager.beginFakeDrag();
- }
- int dragPosition = (Integer) animation.getAnimatedValue();
- int dragOffset = dragPosition - oldDragPosition;
- oldDragPosition = dragPosition;
- pager.fakeDragBy(-dragOffset);
-
- if (animation.getAnimatedFraction() == 1) {
- pager.endFakeDrag();
- }
- }
-}
diff --git a/java/com/android/incallui/incall/impl/InCallFragment.java b/java/com/android/incallui/incall/impl/InCallFragment.java
index 3f31651a0..b6ae4902a 100644
--- a/java/com/android/incallui/incall/impl/InCallFragment.java
+++ b/java/com/android/incallui/incall/impl/InCallFragment.java
@@ -253,13 +253,16 @@ public class InCallFragment extends Fragment
if (!stateRestored) {
new Handler()
.postDelayed(
- () -> {
- // In order to prevent user confusion and educate the user on our UI, we animate
- // the view pager to the button grid after a short period to show them where the
- // UI that they are more familiar with is located.
- new FakeDragAnimation(pager).start();
+ new Runnable() {
+ @Override
+ public void run() {
+ // In order to prevent user confusion and educate the user on our UI, we animate
+ // the view pager to the button grid after 2 seconds show them when the UI is
+ // that they are more familiar with.
+ pager.setCurrentItem(adapter.getButtonGridPosition());
+ }
},
- 333);
+ 2000);
}
} else {
tabLayout.setVisibility(View.GONE);