DO NOT MERGE fix null check

Check to see if the WebChromeClient is null.

Checked into master in change 63008

Change-Id: If2ef1889ce3633c0b35c078a46bde84982dd1eb3
http://b/2945171
This commit is contained in:
Cary Clark
2010-08-25 16:22:15 -04:00
parent b8814dce28
commit d64f4a983d

View File

@@ -3338,7 +3338,8 @@ public class WebView extends AbsoluteLayout
setUpSelect();
if (mNativeClass != 0 && nativeWordSelection(x, y)) {
nativeSetExtendSelection();
getWebChromeClient().onSelectionStart(this);
WebChromeClient client = getWebChromeClient();
if (client != null) client.onSelectionStart(this);
return true;
}
notifySelectDialogDismissed();
@@ -4126,7 +4127,8 @@ public class WebView extends AbsoluteLayout
*/
public void selectionDone() {
if (mSelectingText) {
getWebChromeClient().onSelectionDone(this);
WebChromeClient client = getWebChromeClient();
if (client != null) client.onSelectionDone(this);
invalidate(); // redraw without selection
notifySelectDialogDismissed();
}