summaryrefslogtreecommitdiffstats
path: root/core/java/android/app
diff options
context:
space:
mode:
authorClara Bayarri <clarabayarri@google.com>2015-04-14 15:51:38 +0100
committerClara Bayarri <clarabayarri@google.com>2015-04-14 15:51:38 +0100
commit0433ae61e2a1dd3dd765aa517fecd94479601ec3 (patch)
treeddd03bc0a7d3e1540be7644e43fbc2d22d8217c2 /core/java/android/app
parent4c42bc045daccb293198559334df6fc6232fff6a (diff)
downloadframeworks_base-0433ae61e2a1dd3dd765aa517fecd94479601ec3.zip
frameworks_base-0433ae61e2a1dd3dd765aa517fecd94479601ec3.tar.gz
frameworks_base-0433ae61e2a1dd3dd765aa517fecd94479601ec3.tar.bz2
Enable Text Selection Action Mode for seach boxes and action bar components.
Pre-M, these were disabled as the ActionMode would be rendered in the ActionBar, obscuring the originating view. Now that we have Floating Toolbars, this is no longer the case. Also the TextViews in this situation used to show the paste popup which has now been removed, so they require the floating toolbar to avoid regressions. BUG: 20205351 Change-Id: Ifdc96c3b0db5b40c890ae807c26b76aa2992edbc
Diffstat (limited to 'core/java/android/app')
-rw-r--r--core/java/android/app/SearchDialog.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java
index c719a0e..b1a5d21 100644
--- a/core/java/android/app/SearchDialog.java
+++ b/core/java/android/app/SearchDialog.java
@@ -643,6 +643,10 @@ public class SearchDialog extends Dialog {
@Override
public ActionMode startActionModeForChild(
View child, ActionMode.Callback callback, int type) {
+ // Disable Primary Action Modes in the SearchBar, as they overlap.
+ if (type != ActionMode.TYPE_PRIMARY) {
+ return super.startActionModeForChild(child, callback, type);
+ }
return null;
}
}