From b98a81f86ab87f1d718f329f03256111fdabd8d1 Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Fri, 24 Feb 2012 11:09:07 -0800 Subject: Add support for optional titles in action modes Optional titles will only be displayed in the CAB if they entirely fit instead of ellipsizing. Fixes bug 5821883 Change-Id: I0cfd6d4fd34a4fa9f520499d577706da30606811 --- core/java/android/webkit/SelectActionModeCallback.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'core/java/android/webkit/SelectActionModeCallback.java') diff --git a/core/java/android/webkit/SelectActionModeCallback.java b/core/java/android/webkit/SelectActionModeCallback.java index cdf20f649c4a..2a770f5d986c 100644 --- a/core/java/android/webkit/SelectActionModeCallback.java +++ b/core/java/android/webkit/SelectActionModeCallback.java @@ -53,10 +53,8 @@ class SelectActionModeCallback implements ActionMode.Callback { mode.getMenuInflater().inflate(com.android.internal.R.menu.webview_copy, menu); final Context context = mWebView.getContext(); - boolean allowText = context.getResources().getBoolean( - com.android.internal.R.bool.config_allowActionMenuItemTextWithIcon); - mode.setTitle(allowText ? - context.getString(com.android.internal.R.string.textSelectionCABTitle) : null); + mode.setTitle(context.getString(com.android.internal.R.string.textSelectionCABTitle)); + mode.setTitleOptionalHint(true); // If the action mode UI we're running in isn't capable of taking window focus // the user won't be able to type into the find on page UI. Disable this functionality. -- cgit v1.2.3