diff options
author | Victoria Lease <violets@android.com> | 2013-04-26 17:17:39 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-04-26 17:17:39 +0000 |
commit | b0e0e54d9dbef720ac653ed87d8ed6b46e1abdbe (patch) | |
tree | 335b2eb882fd716081d363312d7f5ac17eb85b71 /core | |
parent | a643652680486bd1009248d1bd8fcea7da92d661 (diff) | |
parent | 2b3cef0dd74cb9470e5387b015ee7a13af1fff7b (diff) | |
download | frameworks_base-b0e0e54d9dbef720ac653ed87d8ed6b46e1abdbe.zip frameworks_base-b0e0e54d9dbef720ac653ed87d8ed6b46e1abdbe.tar.gz frameworks_base-b0e0e54d9dbef720ac653ed87d8ed6b46e1abdbe.tar.bz2 |
Merge "Can not mark the same content of browser page after copy"
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/webkit/SelectActionModeCallback.java | 2 | ||||
-rw-r--r-- | core/java/android/webkit/WebViewClassic.java | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/core/java/android/webkit/SelectActionModeCallback.java b/core/java/android/webkit/SelectActionModeCallback.java index f9f5b03..215467b 100644 --- a/core/java/android/webkit/SelectActionModeCallback.java +++ b/core/java/android/webkit/SelectActionModeCallback.java @@ -137,7 +137,7 @@ class SelectActionModeCallback implements ActionMode.Callback { @Override public void onDestroyActionMode(ActionMode mode) { - mWebView.selectionDone(); + mWebView.clearSelection(); } private void setMenuVisibility(Menu menu, boolean visible, int resourceId) { diff --git a/core/java/android/webkit/WebViewClassic.java b/core/java/android/webkit/WebViewClassic.java index 4db9f6c..c576546 100644 --- a/core/java/android/webkit/WebViewClassic.java +++ b/core/java/android/webkit/WebViewClassic.java @@ -4478,6 +4478,13 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc return selectText(x, y); } + public void clearSelection() { + selectionDone(); + if (mWebViewCore != null) { + mWebViewCore.sendMessage(EventHub.SELECT_TEXT, null); + } + } + /** * Select the word at the indicated content coordinates. */ @@ -4495,7 +4502,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc public void onConfigurationChanged(Configuration newConfig) { mCachedOverlappingActionModeHeight = -1; if (mSelectingText && mOrientation != newConfig.orientation) { - selectionDone(); + clearSelection(); } mOrientation = newConfig.orientation; if (mWebViewCore != null && !mBlockWebkitViewMessages) { |