summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2010-08-25 14:56:00 -0400
committerCary Clark <cary@android.com>2010-08-25 16:12:03 -0400
commite60cb7f914acbfc7aca6cb9848b8247078d0b3ad (patch)
tree9d64e2ae88c8c253647fae5eb03062dc6ba15329
parent7a9f6faa3c1a058d27548a329df464f2eaf1f7d1 (diff)
downloadframeworks_base-e60cb7f914acbfc7aca6cb9848b8247078d0b3ad.zip
frameworks_base-e60cb7f914acbfc7aca6cb9848b8247078d0b3ad.tar.gz
frameworks_base-e60cb7f914acbfc7aca6cb9848b8247078d0b3ad.tar.bz2
simplify cursor ring draw state; fix null check
Rename jni call to note that, when pressing the dpad, the cursor ring is to shown for a short time. The old name suggested that this was tracking whether the link was followed. Fix an unrelated change (from gingerbread, automated merge unlikely to succeed) to check for a null WebChromeClient. Requires a companion change in external/webkit http://b/2135321 (rename jni call) http://b/2945171 (null check) Change-Id: I9d4a92dbba1f92da8dc8cde755a2066de59514f9
-rw-r--r--core/java/android/webkit/WebView.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 5d9ab90..da9a325 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -3355,7 +3355,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();
@@ -4088,7 +4089,7 @@ public class WebView extends AbsoluteLayout
return true;
}
clearTextEntry();
- nativeSetFollowedLink(true);
+ nativeShowCursorTimed();
if (!mCallbackProxy.uiOverrideUrlLoading(nativeCursorText())) {
mWebViewCore.sendMessage(EventHub.CLICK, data.mFrame,
nativeCursorNodePointer());
@@ -4175,7 +4176,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();
}
@@ -7327,9 +7329,9 @@ public class WebView extends AbsoluteLayout
private native void nativeSetExtendSelection();
private native void nativeSetFindIsEmpty();
private native void nativeSetFindIsUp(boolean isUp);
- private native void nativeSetFollowedLink(boolean followed);
private native void nativeSetHeightCanMeasure(boolean measure);
private native void nativeSetBaseLayer(int layer);
+ private native void nativeShowCursorTimed();
private native void nativeReplaceBaseContent(int content);
private native void nativeCopyBaseContentToPicture(Picture pict);
private native boolean nativeHasContent();