diff options
| author | Cary Clark <cary@android.com> | 2010-11-22 15:20:02 -0500 |
|---|---|---|
| committer | Cary Clark <cary@android.com> | 2010-11-23 13:12:32 -0500 |
| commit | c5cd5e9079955fa43ba4b75d3d2d5935419df61b (patch) | |
| tree | 1b4948d4bdaaf4aa671675157365644b6509769d /core | |
| parent | 693c99ffdca44336134be635677371ceac3fae4b (diff) | |
| download | frameworks_base-c5cd5e9079955fa43ba4b75d3d2d5935419df61b.zip frameworks_base-c5cd5e9079955fa43ba4b75d3d2d5935419df61b.tar.gz frameworks_base-c5cd5e9079955fa43ba4b75d3d2d5935419df61b.tar.bz2 | |
cancel text selection on rotate
Rotating the screen may cause it to layout differently. The
selected text may be hard to match or may not be visible at
all. Cancel the text selection mode when a rotate is detected.
bug:3205291
Change-Id: If7e8f98a1cc396bf21f8261f2a7b4a342907ef2f
Diffstat (limited to 'core')
| -rw-r--r-- | core/java/android/webkit/WebView.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 3cb9084..2b4284d 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -29,6 +29,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; +import android.content.res.Configuration; import android.content.res.Resources; import android.database.DataSetObserver; import android.graphics.Bitmap; @@ -3733,6 +3734,16 @@ public class WebView extends AbsoluteLayout return false; } + private int mOrientation = Configuration.ORIENTATION_UNDEFINED; + + @Override + protected void onConfigurationChanged(Configuration newConfig) { + if (mSelectingText && mOrientation != newConfig.orientation) { + selectionDone(); + } + mOrientation = newConfig.orientation; + } + /** * Keep track of the Callback so we can end its ActionMode or remove its * titlebar. |
