summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebView.java
Commit message (Collapse)AuthorAgeFilesLines
* Add dispatchRequestTranslation() in WebViewProvider.Joanne Chung2021-05-121-0/+12
| | | | | | | | | | | | | This change doesn't introduce a new API, the change is just pushing down an existing API from View that we are missing to add for the webview. We should also provide this method to allow webview provider to provide their implementation if needed. Bug: 186617107 Test: manual CTS-Coverage-Bug: 177960696 Change-Id: If75285b3aafdb1f2a3d7c307a90bb783edf029b5
* API feedback: Translation View API refinement.Joanne Chung2021-04-201-5/+6
| | | | | | | | | Bug: 178046780 Test: manual Test: atest android.translation.cts.UiTranslationManagerTest CTS-Coverage-Bug: 177960696 Change-Id: I557ca4b3b4e7324af12e81dd8b5ac8a04a17b6b8
* Add translation APIs for virtual views.Joanne Chung2021-03-291-0/+19
| | | | | | | | | Bug: 178046780 Test: manual Test: atest CtsTranslationTestCases CTS-Coverage-Bug: 177960696 Change-Id: I99caed0d42b3a164a25c2707eba7057c42c19140
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-291-3/+3
| | | | | | | | | | | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. This is a resubmit of ag/12929664 with some APIs excluded that caused test failures; see bugs 171886397, 171888296, 171864568. APIs excluded: Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord; Landroid/os/Process;->myPpid()I Landroid/os/SharedMemory;->getFd()I Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I Bug: 170729553 Test: Treehugger Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
* Revert "Add maxTargetSdk restriction to unused APIs."Hongwei Wang2020-10-281-3/+3
| | | | | | | | | This reverts commit 72f07d6a8a32db4a0dedd7682a0b3385be2b9cd6. Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397 Bug: 171886397 Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-271-3/+3
| | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. Bug: 170729553 Test: Treehugger Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
* WebView: update loadUrl documentationLaís Minchillo2020-10-011-8/+10
| | | | | | | | | | No change to logic, only docs. Updates loadUrl documentation to make it clear that some WebView versions require the Map parameter to be mutable. Bug: 145881245 Test: m offline-sdk-docs -j4 Change-Id: I15f3c48f02090b8855880ff5d39c02aa28d4dfa8
* WebView: remove non-inclusive terminology from docsNate Fischer2020-07-231-1/+1
| | | | | | | | | | | | | No change to logic, only docs. This removes non-inclusive terminology ("whitelist") from our API javadoc, with the exception of references to setSafeBrowsingWhitelist() (which we plan to deprecate soon, in favor of an inclusively named API). This rephrases one paragraph to be a bit clearer as well. Bug: 160928306 Test: m offline-sdk-docs -j4 Change-Id: If249be8a70b01c01390ebfeb418fd7c5e119f1f2
* [WebView] Listen to window insets changeChangwan Ryu2020-06-251-0/+16
| | | | | | | | | | | | | | | | | | | | | Overriding these methods in preparation for notch and safe area implementation for WebView. A corresponding implementation for Chrome app does this: https://source.chromium.org/chromium/chromium/src/+/master:components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/InsetObserverView.java;l=179;drc=b17e62321db0f69a9131d3bb87ab9cef502a0eaf?originalUrl=https:%2F%2Fcs.chromium.org%2F An alternative would be to call View#setOnApplyWindowInsetsListener(), but that might not be as straightforward and might conflict with app's own usage around windowinsets. Returning null from a default implementation and use super method until we can actually implement it in the chromium repo. (Note: I would like to merge this to R if possible.) Bug: 159610496 Test: CL does not break build/test. Change-Id: Ic0421d7347e8091e02af6c9d5a24fdb334f37c47
* Use new UnsupportedAppUsage annotation.Artur Satayev2019-12-181-1/+1
| | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I5be7335b23a92b8ac80d2fd890198273b66ad644
* [webview] Annotate API parameters as @Nullable or @NonNullLaís Minchillo2019-12-031-37/+54
| | | | | | | | | | | Annotate WebView API parameters as either @Nullable or @NonNull. When a method returns a nullable type, add this to the javadoc as well. Deprecated methods were ignored. Bug: 119254822 Test: none (only changes annotations, no change in logic) Change-Id: I701108240fd5905e1085a9e8bcce44567e517892
* Add missing nullability annotations.Aurimas Liutikas2019-08-291-1/+1
| | | | | | | | | | | | | | To prepare for enabling MissingNullability Metalava check this CL works on adding missing nullability issues that metalava flags if we tell it to flag new things since API 29. This is not a complete CL, mostly addresses public api and toString/equals for @SystemApi Exempt-From-Owner-Approval: Large scale nullability clean up Bug: 124515653 Test: make -j checkapi Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
* Merge "aw: Correct doc of addJavascriptInterface()" into qt-dev am: ↵Shimi Zhang2019-08-271-2/+7
|\ | | | | | | | | | | | | | | 62c764e29b am: d081f1064d am: 0922cc17be am: 3446691be1 Change-Id: I8d7b836d8582fd63cc5bedfa4c7961f2c6603672
| * Merge "aw: Correct doc of addJavascriptInterface()" into qt-dev am: 62c764e29bShimi Zhang2019-08-271-2/+7
| |\ | | | | | | | | | | | | | | | am: d081f1064d Change-Id: I2c02ba4da3494dfda62f13e5891a9a24e474abc7
| | * aw: Correct doc of addJavascriptInterface()Shimi Zhang2019-08-261-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Javadoc of addJavascriptInterface() mentioned that the injected Java object will be injected to main frame, but this is not telling a full picture. The current implementation will inject the Java object to all the frames actually. This CL corrected the misleading wording and add a new warning to explicitly call it out as a security risk. Bug: 113336656 Test: make ds-docs Change-Id: Ia79381d1ab38afa963ea7365526749c14e25238c
* | | Merge "WebView: prettyprint docs" into qt-dev am: 20f2f0b5ea am: 6201d28952 ↵Nate Fischer2019-08-191-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | am: e838a0353f am: 095e1c1328 Change-Id: Ia247d0f5467886faea98d9055899a33daa8fe170
| * | Merge "WebView: prettyprint docs" into qt-devNate Fischer2019-08-191-2/+2
| |\| | | | | | | | | | | | | | | | am: 20f2f0b5ea Change-Id: Iad51d33c434a42272c448ba7a807bdcbe6cb51d0
| | * WebView: prettyprint docsNate Fischer2019-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No change to logic, only docs. Use class=prettyprint so docs are syntax highlighted. This also fixes a section which should have been an ordered list but abused <pre> instead. Bug: 125526827 Test: make -j4 docs Change-Id: Iac780ace066be35620d5121b1977df404eaf18c1
| * | Merge "Clarify problems with Linkify.MAP_ADDRESSES." into qt-devTorne (Richard Coles)2019-06-061-4/+12
| |\| | | | | | | | | | | | | | | | am: a0d66cf3f6 Change-Id: I264a589322b87b09a5d250f1a7e71b7f1795f3dd
* | | Merge "Clarify problems with Linkify.MAP_ADDRESSES." into qt-dev am: ↵Torne (Richard Coles)2019-06-061-4/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | a0d66cf3f6 am: 0f0173f9e1 am: c2ed59a2da Change-Id: Ibc2165020ad583db1c4488e68f8d688e9d7a8fe5
| * \ \ Merge "Clarify problems with Linkify.MAP_ADDRESSES." into qt-dev am: a0d66cf3f6Torne (Richard Coles)2019-06-061-4/+12
| |\ \ \ | | |/ / | |/| / | | |/ | | | | | | am: 0f0173f9e1 Change-Id: Ib8f8c29444f9cf6e1c4de4c15d3a0b4d12632556
| | * Clarify problems with Linkify.MAP_ADDRESSES.Torne (Richard Coles)2019-06-041-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the documentation for WebView.findAddress, as well as the related functionality in Linkify and TextView, to clarify why the method is deprecated, why it should not be used, and that it can cause unexpected exceptions to be thrown from several places on older OS versions. Fixes: 24676033 Test: m offline-sdk-docs Change-Id: I45d82b9a4c9cf62d9566898dd21cd2139ad98f37
| * | DO NOT MERGE - Re-add ContentCapture support from standard SDK toolkit.Felipe Leme2019-05-161-0/+9
| |/ | | | | | | | | | | | | | | | | | | | | This reverts commit ef1c0b36ab402c9f936220dd4f64f4ac96f52e37. Test: atest CtsContentCaptureServiceTestCases Test: m update-api Bug: 130726495 Change-Id: Iecda9df96722ac8a3184710796032b6c01bd8ea3
| * DO NOT MERGE - Removed ContentCapture support from standard SDK toolkit.Felipe Leme2019-04-151-8/+0
| | | | | | | | | | | | | | | | | | | | Test: atest CtsContentCaptureServiceTestCases Test: m update-api Test: make ds-docs Fixes: 129982633 Change-Id: I5a0fa4231d0222638830c1abd8015d9f2635996a
* | Revert "Temporarily hide some APIs."Felipe Leme2019-05-171-1/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit 4e574efe28ba0e6c59e82641ee26c5cd910f96b1. Test: m update-api ds-docs Test: atest CtsContentCaptureServiceTestCases Fixes: 130726495 Change-Id: I65e04d454afe552a34fa15ca8ce30f33db566770
* | Temporarily hide some APIs.Felipe Leme2019-04-191-0/+1
|/ | | | | | | | | Test: m update-api ds-docs Test: atest CtsContentCaptureServiceTestCases Bug: 130726495 Change-Id: I3b74c1370f6b6b102e440b65c4cdf6f225296856
* Rename @EnumEntry and @FlagEntryAshley Rose2019-03-181-3/+3
| | | | | | | Test: atest CtsViewInspectorAnnotationProcessorTestCases Bug: 127531820 Exempt-From-Owner-Approval: Annotation-only change Change-Id: Id293e2b2ac9cf7bf2aaeb28645471ea227bb587b
* [webview] rename unresponsive renderer APIsTobias Sargeant2019-03-111-22/+25
| | | | | | | | | | | | | Followup from API council review: * Rename Renderer to RenderProcess for consistency with existing APIs. * Make WebViewRenderProcess constructor public. * Document 5 second minimum interval between successive callbacks. Bug: 124767616 Bug: 123629980 Test: atest 'CtsWebkitTestCases' Change-Id: I4416a97e8bb449c4a14a3617ef72a49c92aa3a83
* Update WebView.loadData docs for Q targetSdk quirk.Torne (Richard Coles)2019-02-131-3/+8
| | | | | | | | | | Apps targeting Q+ will not get the backward compatibility quirk for loadData content using a # character applied and will instead get the documented/spec-compliant behaviour; document this. Bug: 124371734 Test: m offline-sdk-docs Change-Id: I05a3b4e951f4b3b051e94a22ba3eeae486228fbb
* @InspectableProperty annotations for WebViewAshley Rose2019-02-081-0/+13
| | | | | | Test: m framework Bug: 120492712 Change-Id: I087e5d40e362171cce71e56755b72cad789a87ae
* [wv] Add WebView unresponsive renderer APIs.Tobias Sargeant2019-01-161-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | WebViewRendererClient is a callback class responsible for informing applications about renderer state changes. Specifically, these callbacks added as part of this feature are: onRendererUnresponsive(renderer) - called when the renderer associated with a webview does not ack an input event, or a navigation does not commit within 5 seconds. The callback will continue to be called at 5 second intervals until the renderer is killed or the unresponsiveness resolves. |renderer| may be null if webview is operating in single process mode. onRendererResponsive(renderer) - called once when an unresponsive renderer becomes responsive again. This CL also adds the ability to get a webview renderer handle from a WebView instance, and then terminate that renderer. This allows recovery from unresponsive renderer situations when webview is in multiprocess mode and termination is correctly handled via WebViewClient.onRendererUnresponsive(). Bug: 111332462 Test: CTS test TBD Change-Id: I0ec026f539a70f412c5567dd87a86a0d851b39ae
* Merge "WebView: no bars in javadoc" into pi-dev am: 002c637337Nate Fischer2019-01-021-1/+1
|\ | | | | | | | | | | am: 23a006b6e2 Change-Id: I8882626eeefce0b2a5e483b8612b45b05ce4faa6
| * Merge "WebView: no bars in javadoc" into pi-devNate Fischer2019-01-021-1/+1
| |\ | | | | | | | | | | | | | | | am: 002c637337 Change-Id: I093585bdc5beaff3f6479b660d9d6d7b5577a5d2
| | * WebView: no bars in javadocNate Fischer2018-12-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No change to logic, only docs change. The bar/pipe symbols have no meaning in javadoc. We should mark this with {@code} instead. Bug: 122046530 Test: None Change-Id: I594480ea3bf4fec9c87a48275364c7c616a0e3ea
| * | Merge "Add @UnsupportedAppUsage annotations" am: 9513a9e215Mathew Inwood2018-08-201-0/+25
| |\ \ | | |/ | |/| | | | | | | | | | am: 5e2a54ab19 Change-Id: Iab4a59a3cdc6aa5387b015f749713538ad66c9db
| | * Merge "Add @UnsupportedAppUsage annotations"Mathew Inwood2018-08-201-0/+25
| | |\ | | | | | | | | | | | | | | | | | | | | am: 9513a9e215 Change-Id: I347d6893209c55b6e6029034db1b42957f27306a
| | | * Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-161-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For packages: android.webkit This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: Ic22415d3e70a3b75a6418f96beb371d0445c7484 Merged-In: I41643e1e47391a12b0aed3058b3d9987a8e6ee2f
| * | | Update WebView#clearClientCertPreferences docs.Torne (Richard Coles)2018-08-131-4/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the reference to the specific ACTION_STORAGE_CHANGED intent as other intents are used instead on newer OS versions; just note that it's cleared automatically when the keychain is updated and don't specify the exact mechanism. Change-Id: Ic677832a1384e0eb2498d06e7aa34507fd2e7278 Fixes: 30371615 Test: make offline-sdk-docs (cherry picked from commit 01eb1282138b8c06351efa7e91baac6f98c54660)
* | | Set WebView as important for Content Capture.Felipe Leme2018-11-261-0/+3
| | | | | | | | | | | | | | | | | | | | | Test: echo 'In TreeHugger we trust!' Bug: 111276913 Change-Id: I28c4691c9b4adb8163eaff15f7e498f637a162ad
* | | Simplified View.onProvideContentCaptureStructure()Felipe Leme2018-11-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That method was returning a boolean to indicate whether the IntelligenceManager should be notify, so views with virtual hierarchy could return false. But now it returns void and always notify, which makes the API easier to understand and use. Bug: 117944706 Test: m -j update-api doc-comment-check-docs Test: atest CtsAutoFillServiceTestCases Change-Id: I216cacb6edb144239b6eabe56ab177fc2582e1aa
* | | Implemented WebView.onProvideContentCaptureStructure()Felipe Leme2018-11-131-0/+5
| | | | | | | | | | | | | | | | | | | | | Bug: 117944706 Test: m -j update-api Change-Id: I2ad56873bae314b7bf66aa123a8ae47eecb7af2e
* | | Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-161-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For packages: android.webkit This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: I41643e1e47391a12b0aed3058b3d9987a8e6ee2f
* | | Merge "Docs: Removed narrative content." into pi-dev am: b4f7c414a6Laura Davis2018-07-171-268/+13
|\| | | | | | | | | | | | | | | | | am: 7f05ea78dd Change-Id: Ibfff8f72707a41936a4259a90d20eda559b44b0d
| * | Docs: Removed narrative content.Laura Davis2018-07-161-268/+13
| | | | | | | | | | | | | | | | | | | | | Test: make ds-docs Bug: 110268338 Change-Id: Ifaa4096d075500f1c7a53b1eec9e1944ed2ddda6
* | | Merge "docs: fixed broken link" into pi-dev am: 0f949c4f9cLaura Davis2018-06-251-1/+1
|\| | | | | | | | | | | | | | | | | am: c52a161253 Change-Id: I26c4ad4c02ffcd6f7eed37d23bfa5b227a313b87
| * | docs: fixed broken linkLaura Davis2018-06-181-1/+1
| |/ | | | | | | | | | | | | Test: make ds-docs Bug: 110243990 Change-Id: Ia6f487ce88d59def5d6974c0d63d67c29ec5cf34
* | Update WebView#clearClientCertPreferences docs.Torne (Richard Coles)2018-06-201-4/+2
| | | | | | | | | | | | | | | | | | | | | | Remove the reference to the specific ACTION_STORAGE_CHANGED intent as other intents are used instead on newer OS versions; just note that it's cleared automatically when the keychain is updated and don't specify the exact mechanism. Change-Id: Ic677832a1384e0eb2498d06e7aa34507fd2e7278 Fixes: 30371615 Test: make offline-sdk-docs
* | Merge "Update security-related WebView documentation." into pi-dev am: ↵Torne (Richard Coles)2018-05-231-1/+27
|\| | | | | | | | | | | | | | | 4611a2e1bc am: 1e31c1fbde Change-Id: I5f9674deec3c5816ce2bfb085a22b459381eaf3f
| * Update security-related WebView documentation.Torne (Richard Coles)2018-05-221-1/+27
| | | | | | | | | | | | | | | | | | | | Add a number of notes for application developers related to using the WebView securely. Change-Id: I7dba78d35bc36dd719ed0629224fe3a1d197f52c Bug: 80095507, 79169416, 79169397, 79170052, 79170398 Fixes: 78941917 Test: m offline-sdk-docs
* | Merge "Add deprecation notice to Linkify MAP_ADDRESSES" into pi-dev am: ↵Jan Althaus2018-04-061-0/+4
|\| | | | | | | | | | | | | | | 28709538fe am: 44249c227f Change-Id: I778ae94b99cf88ec0f6d943195f0074bdbdca5b2