Reproduction:
1. HEAD code (and probably earlier); JellyBean/4.1 (emulator okay).
2. Enter URL into Zirco address bar. Hit arrow button or "Done" on keyboard.
3. Null pointer exception, CustomWebViewClient.java:145
The problem is this if statement:
} else if (view.getHitTestResult().getType() == HitTestResult.EMAIL_TYPE) {
In Jelly Bean, unlike earlier Android versions, apparently, getHitTestResult()
returns null if it wasn't a touch action that triggered the new URL load. So
the above test fails when an address is entered into the bar.
I believe that the fix will be to add a null check, like so:
} else if (view.getHitTestResult() != null && view.getHitTestResult().getType() == HitTestResult.EMAIL_TYPE) {
Original issue reported on code.google.com by a.pritch...@psiphon.ca on 18 Jul 2012 at 6:14
Original issue reported on code.google.com by
a.pritch...@psiphon.ca
on 18 Jul 2012 at 6:14