summaryrefslogtreecommitdiffstats
path: root/docs/html/about
diff options
context:
space:
mode:
authorScott Main <smain@google.com>2013-02-20 15:32:30 -0800
committerScott Main <smain@google.com>2013-02-20 16:10:32 -0800
commit488c81aebb24b2cde7a0878b2d8bab88484544ca (patch)
tree01c8737d75d7d00b461a167d9faa699a7daebf11 /docs/html/about
parente61116b9a1f2d92fbda3d23d35a3742d0661c2be (diff)
downloadframeworks_base-488c81aebb24b2cde7a0878b2d8bab88484544ca.zip
frameworks_base-488c81aebb24b2cde7a0878b2d8bab88484544ca.tar.gz
frameworks_base-488c81aebb24b2cde7a0878b2d8bab88484544ca.tar.bz2
docs: add note about javascript interface to 4.2 overview
Change-Id: I19454c481061b27197399d63abc466810b9e1ff8
Diffstat (limited to 'docs/html/about')
-rw-r--r--docs/html/about/versions/android-4.2.jd14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/html/about/versions/android-4.2.jd b/docs/html/about/versions/android-4.2.jd
index 13ee872..b02c1d1 100644
--- a/docs/html/about/versions/android-4.2.jd
+++ b/docs/html/about/versions/android-4.2.jd
@@ -111,6 +111,20 @@ android:targetSdkVersion}</a> and <a href="{@docRoot}guide/topics/manifest/uses-
android:minSdkVersion}</a> is lower than 17, your app is not able to modify the settings that have
moved to {@link android.provider.Settings.Global} when running on Android 4.2 and higher.</p>
</li>
+
+ <li>If your app uses {@link android.webkit.WebView}, Android 4.2 adds an additional layer of
+ security so you can more safely <b>bind JavaScript to your
+ Android code</b>. If you set your
+ <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targetSdkVersion}</a>
+ to 17 or higher, you must now add the {@code @JavascriptInterface} annotation to any method that you
+ want available to your JavaScript (the method must also be public). If you do not provide the
+ annotation, the method is not accessible by a web page in your {@link android.webkit.WebView}
+ when running on Android 4.2 or higher. If you set the
+ <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targetSdkVersion}</a>
+ to 16 or lower, the annotation is not required, but we recommend that you update your target version
+ and add the annotation for additional security.
+ <p>Read more about <a href="{@docRoot}guide/webapps/webview.html#BindingJavaScript">binding
+ JavaScript code to Android code</a>.</p></li>
</ul>