WebView, to ensure long-term
compatibility for your project.
The aforementioned change will be very important for apps whose
android:targetSdkVersion is set to 17 or higher, running on
Android 4.2+ devices. Methods without the
This is for security reasons. Previously, any
public method on the
classes usually have many inherited methods
public methods, including
access other stuff, beyond what you had in mind. By limiting access
The good news is that this improves security.
The bad news is that I missed hearing about this change, until this blog post showed up.
This change — a regression by some measures — was not
the Android 4.2 release notes.
the API differences report
does not make this change obvious. Since the method signature for
WebView itself does, the change in behavior is not
mentioned in the class-level JavaDocs. Only if you read the documentation
for the “un-modified”
mention of the new
report, would you have realized that this change was made.
Ideally, regressions like this would make it into the Android 4.2
release notes, as did the change in default
exported status, the changes to user location accuracy, and the changes
Settings.System read-write status, all of which were
covered in the release notes.
Need a speaker at your Android development meetup? Mark Murphy is available, in person in the Boston/Pittsburgh/DC triangle, or by remote anywhere in the world! Contact Mark for details!Tweet