diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/widget/SearchEditTextLayout.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/dialer/widget/SearchEditTextLayout.java b/src/com/android/dialer/widget/SearchEditTextLayout.java index 919f65c3c..f22a3be9e 100644 --- a/src/com/android/dialer/widget/SearchEditTextLayout.java +++ b/src/com/android/dialer/widget/SearchEditTextLayout.java @@ -101,6 +101,17 @@ public class SearchEditTextLayout extends FrameLayout { mExpandedSearchBox = findViewById(R.id.search_box_expanded); mClearButtonView = findViewById(R.id.search_close_button); + // Convert a long click into a click to expand the search box, and then long click on the + // search view. This accelerates the long-press scenario for copy/paste. + mCollapsedSearchBox.setOnLongClickListener(new OnLongClickListener() { + @Override + public boolean onLongClick(View view) { + mCollapsedSearchBox.performClick(); + mSearchView.performLongClick(); + return false; + } + }); + mSearchView.setOnFocusChangeListener(new OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { |