diff options
author | Nancy Chen <nancychen@google.com> | 2014-08-19 18:18:06 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-08-19 18:18:06 +0000 |
commit | 45f7fc96eea66ee1974cf40cc659586c36fa1bcc (patch) | |
tree | 256019e781b711810ab4e14dfe5a2d3e8fc72795 | |
parent | 1aeb312866fc844fae80b9e6e8d1f84361befbaf (diff) | |
parent | 09700fed9efc750696a5a6f48c924e956120ef18 (diff) |
am 09700fed: am 5fc53d00: am e78797f8: Merge "Reveal InCallUI from touch point in Dialer. COMPLETED." into lmp-dev
* commit '09700fed9efc750696a5a6f48c924e956120ef18':
Reveal InCallUI from touch point in Dialer. COMPLETED.
-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); |