diff options
author | Nancy Chen <nancychen@google.com> | 2014-08-18 20:10:17 -0700 |
---|---|---|
committer | Nancy Chen <nancychen@google.com> | 2014-08-18 20:10:17 -0700 |
commit | 49db1addc0a5c8b111f810766a3f04d15747f49a (patch) | |
tree | eee1c6be3f25e36c1dfd28305dc73471c9e06d54 /src | |
parent | d10beab01c423061710909537597df44fc25c458 (diff) |
Reveal InCallUI from touch point in Dialer. COMPLETED.
Reveal now works from the favorites tiles, recent cards/call back,
search results, dialpad, and disambiguation dialog.
Bug: 15284651
Change-Id: I43ba1d7095b839ec24faa043de042048d36057b1
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 25 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/CallLogActivity.java | 10 |
2 files changed, 19 insertions, 16 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 12c52da9c..763632bcc 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, @@ -342,6 +341,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; @@ -390,7 +398,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); mFloatingActionButtonDialpadMarginBottomOffset = resources.getDimensionPixelOffset( @@ -467,8 +474,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O if (!mIsDialpadShown) { maybeExitSearchUi(); } - - recordTouchEvent(v, event); return false; } }); @@ -570,18 +575,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); |