commit | 8a4fd2f8e7f78538adad82f4c95e8746f880abcc | [log] [tgz] |
---|---|---|
author | Leon Scroggins <scroggo@google.com> | Thu Dec 16 18:17:23 2010 -0500 |
committer | Leon Scroggins <scroggo@google.com> | Fri Dec 17 11:04:14 2010 -0500 |
tree | 05b18c27ac6b5936ee27c853d4ac7410d896819f | |
parent | b67529b905440e2ba550742773b927abad882c19 [diff] [blame] |
Do not allow text selection if there is no ActionBar. Bug:3276538 Change-Id: I060f14471e26e4bc1bf9773b847e0dbac9228426
diff --git a/core/java/android/webkit/SelectActionModeCallback.java b/core/java/android/webkit/SelectActionModeCallback.java index 54c9d9a..86a67c7 100644 --- a/core/java/android/webkit/SelectActionModeCallback.java +++ b/core/java/android/webkit/SelectActionModeCallback.java
@@ -34,7 +34,11 @@ } void finish() { - mActionMode.finish(); + // It is possible that onCreateActionMode was never called, in the case + // where there is no ActionBar, for example. + if (mActionMode != null) { + mActionMode.finish(); + } } // ActionMode.Callback implementation