diff options
author | Mike Reed <reed@google.com> | 2010-01-13 14:40:52 -0800 |
---|---|---|
committer | Mike Reed <reed@google.com> | 2010-01-13 16:13:45 -0800 |
commit | 9b78e1d1e0bd819ae03df5594d4a56519e5d87c7 (patch) | |
tree | 6c60c2074280c77d9911e86abd8348b37844c5d1 /src | |
parent | 121dffcfe7f0569cc8cf4c7fb2468ff2272acfea (diff) | |
download | packages_apps_Browser-9b78e1d1e0bd819ae03df5594d4a56519e5d87c7.zip packages_apps_Browser-9b78e1d1e0bd819ae03df5594d4a56519e5d87c7.tar.gz packages_apps_Browser-9b78e1d1e0bd819ae03df5594d4a56519e5d87c7.tar.bz2 |
refactor draghandler dispatch in about:debug.drag#
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/browser/BrowserActivity.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java index 43e6758..8795594 100644 --- a/src/com/android/browser/BrowserActivity.java +++ b/src/com/android/browser/BrowserActivity.java @@ -515,12 +515,13 @@ public class BrowserActivity extends Activity current.getWebView().dumpRenderTree(true); } else if ("about:debug.display".equals(urlData.mUrl)) { current.getWebView().dumpDisplayTree(); - } else if ("about:debug.drag0".equals(urlData.mUrl)) { - current.getWebView().setDragTracker(null); - } else if ("about:debug.drag1".equals(urlData.mUrl)) { - current.getWebView().setDragTracker(new MeshTracker(1)); - } else if ("about:debug.drag2".equals(urlData.mUrl)) { - current.getWebView().setDragTracker(new MeshTracker(2)); + } else if (urlData.mUrl.startsWith("about:debug.drag")) { + int index = urlData.mUrl.codePointAt(16) - '0'; + if (index <= 0 || index > 9) { + current.getWebView().setDragTracker(null); + } else { + current.getWebView().setDragTracker(new MeshTracker(index)); + } } else { mSettings.toggleDebugSettings(); } |