diff options
-rw-r--r-- | res/layout/call_log_list_item.xml | 1 | ||||
-rwxr-xr-x | res/layout/phone_disambig_item.xml | 5 | ||||
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 25 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/CallLogActivity.java | 10 |
4 files changed, 23 insertions, 18 deletions
diff --git a/res/layout/call_log_list_item.xml b/res/layout/call_log_list_item.xml index 4dcffb19b..3fbe7e9ce 100644 --- a/res/layout/call_log_list_item.xml +++ b/res/layout/call_log_list_item.xml @@ -137,6 +137,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" + android:layout_marginEnd="@dimen/call_log_icon_margin" android:src="@drawable/ic_card_phone" android:tint="@color/recent_call_log_item_phone_icon_tint" android:alpha="0.3" diff --git a/res/layout/phone_disambig_item.xml b/res/layout/phone_disambig_item.xml index a097ce798..27bbda134 100755 --- a/res/layout/phone_disambig_item.xml +++ b/res/layout/phone_disambig_item.xml @@ -14,7 +14,8 @@ limitations under the License. --> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<view class="com.android.contacts.common.widget.ActivityTouchLinearLayout" + xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" @@ -39,4 +40,4 @@ android:textAppearance="?android:attr/textAppearanceSmall" android:textDirection="ltr" /> -</LinearLayout> +</view> diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index e5e708bc5..98512cd52 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -102,7 +102,6 @@ import java.util.Locale; * The dialer tab's title is 'phone', a more common name (see strings.xml). */ public class DialtactsActivity extends TransactionSafeActivity implements View.OnClickListener, - View.OnTouchListener, DialpadFragment.OnDialpadQueryChangedListener, OnListFragmentScrolledListener, DialpadFragment.HostInterface, @@ -338,6 +337,15 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O }; @Override + public boolean dispatchTouchEvent(MotionEvent ev) { + if (ev.getAction() == MotionEvent.ACTION_DOWN) { + TouchPointManager.getInstance().setPoint((int) ev.getRawX(), (int) ev.getRawY()); + } + return super.dispatchTouchEvent(ev); + + } + + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mFirstLaunch = true; @@ -386,7 +394,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O int floatingActionButtonWidth = resources.getDimensionPixelSize( R.dimen.floating_action_button_width); mFloatingActionButton.setOnClickListener(this); - mFloatingActionButton.setOnTouchListener(this); mFloatingActionButtonController = new FloatingActionButtonController(this, floatingActionButtonContainer); @@ -461,8 +468,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O if (!mIsDialpadShown) { maybeExitSearchUi(); } - - recordTouchEvent(v, event); return false; } }); @@ -564,18 +569,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O } @Override - public boolean onTouch(View view, MotionEvent event) { - recordTouchEvent(view, event); - return false; - } - - private void recordTouchEvent(View view, MotionEvent event) { - if (event.getAction() == MotionEvent.ACTION_DOWN) { - TouchPointManager.getInstance().setPoint((int) event.getRawX(), (int) event.getRawY()); - } - } - - @Override public boolean onMenuItemClick(MenuItem item) { switch (item.getItemId()) { case R.id.menu_history: diff --git a/src/com/android/dialer/calllog/CallLogActivity.java b/src/com/android/dialer/calllog/CallLogActivity.java index 0054ac08c..2a47271b7 100644 --- a/src/com/android/dialer/calllog/CallLogActivity.java +++ b/src/com/android/dialer/calllog/CallLogActivity.java @@ -29,7 +29,9 @@ import android.support.v4.view.ViewPager; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; +import android.view.MotionEvent; +import com.android.contacts.common.interactions.TouchPointManager; import com.android.contacts.common.list.ViewPagerTabs; import com.android.dialer.DialtactsActivity; import com.android.dialer.R; @@ -104,6 +106,14 @@ public class CallLogActivity extends AnalyticsActivity implements CallLogQueryHa } @Override + public boolean dispatchTouchEvent(MotionEvent ev) { + if (ev.getAction() == MotionEvent.ACTION_DOWN) { + TouchPointManager.getInstance().setPoint((int) ev.getRawX(), (int) ev.getRawY()); + } + return super.dispatchTouchEvent(ev); + } + + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); |