From 91ce7d2a476bd04fe525049a37a2f8b2824e9724 Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Mon, 5 Jun 2017 13:35:02 -0700 Subject: Update AOSP Dialer source from internal google3 repository at cl/158012278. Test: make, treehugger This CL updates the AOSP Dialer source with all the changes that have gone into the private google3 repository. This includes all the changes from cl/152373142 (4/06/2017) to cl/158012278 (6/05/2017). This goal of these drops is to keep the AOSP source in sync with the internal google3 repository. Currently these sync are done by hand with very minor modifications to the internal source code. See the Android.mk file for list of modifications. Our current goal is to do frequent drops (daily if possible) and eventually switched to an automated process. Change-Id: I4d3f14b5140e2e51bead9497bc118a205b3ebe76 --- .../dialer/app/list/PhoneFavoriteListView.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'java/com/android/dialer/app/list/PhoneFavoriteListView.java') diff --git a/java/com/android/dialer/app/list/PhoneFavoriteListView.java b/java/com/android/dialer/app/list/PhoneFavoriteListView.java index 9516f0611..f4f395ff0 100644 --- a/java/com/android/dialer/app/list/PhoneFavoriteListView.java +++ b/java/com/android/dialer/app/list/PhoneFavoriteListView.java @@ -1,6 +1,5 @@ /* - * Copyright (C) 2012 Google Inc. - * Licensed to The Android Open Source Project. + * 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. @@ -24,7 +23,6 @@ import android.content.res.Configuration; import android.graphics.Bitmap; import android.os.Handler; import android.util.AttributeSet; -import android.util.Log; import android.view.DragEvent; import android.view.MotionEvent; import android.view.View; @@ -33,6 +31,7 @@ import android.widget.GridView; import android.widget.ImageView; import com.android.dialer.app.R; import com.android.dialer.app.list.DragDropController.DragItemContainer; +import com.android.dialer.common.LogUtil; /** Viewgroup that presents the user's speed dial contacts in a grid. */ public class PhoneFavoriteListView extends GridView @@ -40,14 +39,14 @@ public class PhoneFavoriteListView extends GridView public static final String LOG_TAG = PhoneFavoriteListView.class.getSimpleName(); final int[] mLocationOnScreen = new int[2]; - private final long SCROLL_HANDLER_DELAY_MILLIS = 5; - private final int DRAG_SCROLL_PX_UNIT = 25; - private final float DRAG_SHADOW_ALPHA = 0.7f; + private static final long SCROLL_HANDLER_DELAY_MILLIS = 5; + private static final int DRAG_SCROLL_PX_UNIT = 25; + private static final float DRAG_SHADOW_ALPHA = 0.7f; /** * {@link #mTopScrollBound} and {@link mBottomScrollBound} will be offseted to the top / bottom by * {@link #getHeight} * {@link #BOUND_GAP_RATIO} pixels. */ - private final float BOUND_GAP_RATIO = 0.2f; + private static final float BOUND_GAP_RATIO = 0.2f; private float mTouchSlop; private int mTopScrollBound; @@ -67,7 +66,6 @@ public class PhoneFavoriteListView extends GridView } }; private boolean mIsDragScrollerRunning = false; - private int mTouchDownForDragStartX; private int mTouchDownForDragStartY; private Bitmap mDragShadowBitmap; private ImageView mDragShadowOverlay; @@ -98,7 +96,7 @@ public class PhoneFavoriteListView extends GridView } public PhoneFavoriteListView(Context context, AttributeSet attrs) { - this(context, attrs, -1); + this(context, attrs, 0); } public PhoneFavoriteListView(Context context, AttributeSet attrs, int defStyle) { @@ -121,7 +119,6 @@ public class PhoneFavoriteListView extends GridView @Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (ev.getAction() == MotionEvent.ACTION_DOWN) { - mTouchDownForDragStartX = (int) ev.getX(); mTouchDownForDragStartY = (int) ev.getY(); } @@ -287,7 +284,7 @@ public class PhoneFavoriteListView extends GridView try { bitmap = cache.copy(Bitmap.Config.ARGB_8888, false); } catch (final OutOfMemoryError e) { - Log.w(LOG_TAG, "Failed to copy bitmap from Drawing cache", e); + LogUtil.w(LOG_TAG, "Failed to copy bitmap from Drawing cache", e); bitmap = null; } } -- cgit v1.2.3