summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/WebViewClient.java
Commit message (Collapse)AuthorAgeFilesLines
* WebView: remove non-inclusive terminology from docsNate Fischer2020-07-231-4/+6
| | | | | | | | | | | | | 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
* Merge "onPageFinished javadoc cleanup" into pi-dev am: dfd3a1b852Shimi Zhang2019-03-111-3/+5
|\ | | | | | | | | | | am: d4eed7352d Change-Id: I0d405bad9ead8e1cd814c5634b5e0f69ead8956b
| * onPageFinished javadoc cleanupShimi Zhang2019-03-111-3/+5
| | | | | | | | | | | | | | | | | | PictureListener was deprecated, we need to replace its mentioning in onPageFinished() javadoc with postVisualStateCallback(). Bug: 125939241 Test: make ds-docs Change-Id: I7c1641c86632bb6c8214fd701e052096952deeec
* | WebView: clean up onReceivedSslError docs am: 9f726cd280Nate Fischer2019-01-181-4/+9
|\| | | | | | | | | | | am: f85e6546e6 Change-Id: I05296f1e7c4b400b1111eed312d55741cffd4617
| * WebView: clean up onReceivedSslError docsNate Fischer2019-01-181-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | No change to logic, only docs. This adds {@link}'s for references to SslErrorHandler methods, improving readability. This also clarifies this API is only called for recoverable errors. Fixes: 123042566 Test: m offline-sdk-docs Change-Id: I0e94c9903e638e2fce59f35ec76eb5566e7ad875
| * Clarify WebViewClient.shouldOverrideUrlLoading docsPaul Miller2018-08-081-27/+33
| | | | | | | | | | | | | | | | | | | | | | | | Call out more explicitly the antipattern of calling loadUrl with the same URL and returning true, and repeat this on the deprecated version. Simplify the wording about returning true v.s. false. Switch to the "note" style used elsewhere on the page. BUG:111843379 Change-Id: I36c31a8e0f4754c314b8a4d72cc497c9c3a3e242 Test: make docs (cherry picked from commit 3819a6467b984119fd48ac54ae9a24d59e9ade95)
* | WebView: fix mistaken wording in API docNate Fischer2018-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In http://ag/5298658, I said this constant is only used when apps have a targetSdkVersion (strictly) greater than Q. I actually meant "greater than or equal to." This CL changes the wording to "is at least," which is both correct and concise. Bug: 117470538 Test: N/A Change-Id: I8c2e016a7b26ce2ff406c433cc6071eb9d887753
* | WebView: add new integer for billing threatsNate Fischer2018-10-171-5/+14
| | | | | | | | | | | | | | | | | | | | | | No change to logic, this adds a new integer constant for Safe Browsing billing threats. This also adds ending periods in the docs for existing threat types. Bug: 117470538 Test: N/A Change-Id: I5368601efc7d587af1f530b7bf2825f277424082
* | Clarify WebViewClient.shouldOverrideUrlLoading docsPaul Miller2018-07-271-27/+33
|/ | | | | | | | | | | Call out more explicitly the antipattern of calling loadUrl with the same URL and returning true, and repeat this on the deprecated version. Simplify the wording about returning true v.s. false. Switch to the "note" style used elsewhere on the page. BUG:111843379 Change-Id: I36c31a8e0f4754c314b8a4d72cc497c9c3a3e242 Test: make docs
* Update security-related WebView documentation.Torne (Richard Coles)2018-05-221-0/+9
| | | | | | | | | | 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
* WebView: clarify shouldInterceptRequest docsNate Fischer2018-03-261-0/+16
| | | | | | | | | | | No change to logic, this only changes documentation. This clarifies how shouldInterceptRequest behaves for various URL schemes as well as other edge cases (e.g., redirects). Bug: 74841041 Test: make docs (manually verify) Change-Id: Id59033590ea6025a00ae39c7b05486be082973e7
* Add more IntDef prefixes for auto-documenting.Jeff Sharkey2017-12-131-5/+5
| | | | | | | Test: builds, boots Bug: 70177949 Exempt-From-Owner-Approval: annotation-only changes Change-Id: I76dde6054e06f52240bd4b1a0f196dcb74623608
* WebView: linkify ClientCertRequest method namesNate Fischer2017-11-291-7/+7
| | | | | | | | | | No change to behavior, only docs changes. No change to wording. This linkifies ClientCertRequest method names in the docs for WebViewClient#onReceivedClientCertRequest. Test: make docs (looks good, no errors) Change-Id: I1de855e8cdf91b3aace3a188aafaa9ac9f90ed2a
* Merge "WebView: misc docs changes in WebViewClient"TreeHugger Robot2017-10-311-18/+19
|\
| * WebView: misc docs changes in WebViewClientNate Fischer2017-10-311-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | No change to logic. This CL has miscellaneous docs changes for WebViewClient.java: * Spelling * Codify some terms ({@code } annotations) * Linkify references to other methods Test: make docs (all links work, things look better) Change-Id: Ia748a258a29b467b9655c018b5783b5b22fad0eb
* | Merge "WebView: make notes in docs stand out"TreeHugger Robot2017-10-311-8/+12
|\ \
| * | WebView: make notes in docs stand outNate Fischer2017-10-261-8/+12
| |/ | | | | | | | | | | | | | | | | | | | | | | This CL rewrites notes to use the 'note' CSS class, to help them stand out. This isn't every instance of 'note', but it catches the handful where I think there's a readability benefit to the new format. This changes a few other non-public notes for the sake of consistency. Change-Id: Icf62e34a719c79f74e74abdb55f1be42939c2f9e Fixes: 68324591 Test: make -j40 docs (and manually verify it looks good)
* | Merge "WebView: add @Nullable and @NonNull annotations"TreeHugger Robot2017-09-261-1/+4
|\ \ | |/ |/|
| * WebView: add @Nullable and @NonNull annotationsNate Fischer2017-09-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds @Nullable and @NonNull annotations where the docs previously stated this. This change should be safe, since we already disallowed null values for the @NonNull parameters via documentation. I verified that documentation changes for APIs which previously did not mention null-ness in @param or @return Javadocs (if the API already mentioned it in these spots, then DroidDoc prefers the hand-written description). This also fixes various lint errors. Bug: 65465498 Test: make update-api and manually verify docs Change-Id: I4751508d0e72be8ddfc3d6b601db8c307c9df60e
* | Merge "WebView: document Safe Browsing and shouldInterceptRequest" into ↵Nate Fischer2017-09-141-0/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | oc-mr1-dev am: 563cd2d3ca am: ffbb5666d4 Change-Id: Ida56b201e8a00e0b968736ee29ee40b1d71b87d1
| * | WebView: document Safe Browsing and shouldInterceptRequestNate Fischer2017-09-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No change to logic, docs only. This documents shouldInterceptRequest request behavior when Safe Browsing is enabled, with recommendations for how this can be avoided depending on the application's needs. Bug: 65555402 Test: make docs (manually verify links all work) Change-Id: I055254bfae3a06061402c519e8740ec4d9779e8f
* | | Merge "WebView: remove "</p>" tags from docs"Nate Fischer2017-09-141-5/+4
|\ \ \ | |_|/ |/| |
| * | WebView: remove "</p>" tags from docsNate Fischer2017-09-111-5/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Docs change only, no change to logic. This removes closing "</p>" tags from WebView API docs, as per API guidelines. This also adds a trailing newline to a <pre> block for consistency. Other than the modified <pre> block, this has no reader-visible change, it merely complies with best practices from Android API guidelines. Bug: 65381884 Test: make docs (and manually compare before/after for differences) Change-Id: I2f911a43b88a8897d9d1b5c7945360580491883d
* / WebView: wrap Java literals with {@code}Nate Fischer2017-09-051-22/+22
|/ | | | | | | | | | | | | | | | Docs change only. This wraps some Java literals (true, false, null) with {@code} blocks, as per Android API guidelines. This also addresses other presubmit errors: * fix lines that have become too long * fix broken import order and unused imports Bug: 65213517 Test: make docs (and manually verify things look better) Change-Id: Idc7fe28d40bea7bd1edcad539b75fa9c689b8d46
* WebView: add IntDef for SafeBrowsingThreatNate Fischer2017-07-131-2/+16
| | | | | | | | | This adds an @IntDef for WebViewClient#onSafeBrowsingHit()'s threatType argument. Bug: 62723291, 63655766 Test: N/A Change-Id: I71fb51753c461d1efa9de123bde977721c8da515
* Add SafeBrowsingResponse abstract classNate Fischer2017-07-111-13/+5
| | | | | | | | | | | | | This adds a new class called SafeBrowsingResponse to replace the ValueCallback parameter for WebViewClient#onSafeBrowsingHit. This class contains specific methods for each of the available actions. This also removes the SAFE_BROWSING_ACTION_* constants from the WebViewClient class. Bug: 62723291 Test: N/A Change-Id: Ie4fe878ea470f7aea7a716ae9edb80b53b73e172
* Add WebViewClient#onSafeBrowsingHit() APINate Fischer2017-06-161-0/+37
| | | | | | | | | | | | | This adds the WebViewClient#onSafeBrowsingHit() API and its default implementation. This also adds the relevant constants. This includes SAFE_BROWSING_THREAT_UNKNOWN, in case we expose new threat types in the future. Bug: 62723291 Test: N/A Change-Id: I0b424a952466b23db4cf296573680a0a6c61b981
* Add WebView Safe Browsing error codeNate Fischer2017-03-061-0/+2
| | | | | | | | | | | | | | | This adds a Safe Browsing specific network error code for WebView. This will be returned when we cancel page load because the end user has clicked "Back to safety" on an interstitial page, the WebView is too small to display a readable interstitial page, or other similar cases. When this is used due to an unsafe subresource, the error passed to WebViewClient#OnReceivedError() will be associated with that specific resource, not the main frame. Bug: 36007752 Test: N/A Change-Id: I8b149a9d6e4ed113de0dd8ee051a2934af477128
* WebView: Revise the behavior of crash handle APITao Bai2017-01-311-1/+2
| | | | | | | | | To make backward compatible, kills application when render process is killed by system. Bug: 30824898 Test: No test, this is document revision. Change-Id: I12862ee9ed1986ec274fe627782542e8d8414856
* WebView: Add the definition of crash API.Tao Bai2016-12-161-0/+27
| | | | | | | | Bug: 30824898 Test: There is no test yet, this patch just add the defintion of API, and make it easy to work on chromium side. Change-Id: I7fdaf894f18cc8bad8e84465e4a0390b22f8bba8
* Remove onUhandledInputEvent API.Michael Wright2016-04-271-2/+1
| | | | | | | | | | | | | | | This callback was never used by WebView and anyone that overrides it is going to just be broken since we never actually call into it from the method that WebView does call. Furthermore, the WebView team has decided that the API has too many complications to ever implement, the most notable of which is that MotionEvents tend to come in streams that would need to be buffered in order to detect the event before it can be determined whether they were handled or not which means that any uses of the API are inevitably going to be janky experiences. Bug: 14279909 Change-Id: I068601ce947bccacabfe55b86b06005449b65bcf
* Better document the ignore behavior for client cert apiSelim Gurun2016-02-161-1/+3
| | | | | | | | | | Bug: 26361557 When the embedded app requests a ignore of a client cert request, webview does not cache the response of the app. However, underlying layers could. Clarify the document. Change-Id: I43e6a4c91727f71c88ca69e1334f64de9f66905a
* Add new version of WebViewClient.shouldOverrideUrlLoading callbackMikhail Naganov2015-10-281-0/+30
| | | | | | | | | The new version provides more information about the origin of the load, which helps making more secure decision on how to proceed with it. Bug: 22346196 Change-Id: I27f591bf5e846bde14335a2c929758a2b48d0763
* am 37c68894: am a78c0e0b: Merge "Fixed Javadoc typos"Narayan Kamath2015-06-251-1/+1
|\ | | | | | | | | * commit '37c688948d4464d636cd64c537b98697cb4b795d': Fixed Javadoc typos
| * Fixed Javadoc typosPhilipp Hasper2015-06-251-1/+1
| | | | | | | | | | | | Simple single character typos Change-Id: I17660dbb3b7ee6597637e8d76770f434ebf202ea
* | Clarify handling client certificatesSelim Gurun2015-06-221-4/+17
| | | | | | | | | | | | | | | | | | Bug: 21910771 Clarify handling client certificates when using a webview. This is a documentation change only. Change-Id: Ida78bd89aa8867c99b4b9e4433e342767e9bac0d
* | Clean remaining API related issues.Selim Gurun2015-05-211-8/+0
| | | | | | | | | | Bug:21063767 Change-Id: Ifb6936699367b4cc1641b74c890856c0b51978d2
* | Update the new error reporting API in android.webkitMikhail Naganov2015-05-131-2/+11
| | | | | | | | | | | | | | | | | | | | - minor changes in WebResourceError; - prepare to remove WebResourceResponseBase; - add immutable mode to WebResourceResponse. Bug: 21063767 Change-Id: Iaf5f92e3850732c7a888453468e108809b3b782a
* | Improve documentation and rename insertVisualStateCallback to ↵Tobias Sargeant2015-05-131-17/+21
| | | | | | | | | | | | | | postVisualStateCallback. Bug: 21043955 Change-Id: I077cad68fb519581387d1b474f27d43222f68e3b
* | Remove unnecessary codeSelim Gurun2015-03-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | Bug: 19313118 As part of the "better error reporting for Webview" work, a new public API was defined for MNC release to report blocked loads. However, we decided to use WebChromeClient.onConsoleMessage for this case. Removing the API. Change-Id: I1a599385f1ecdd10ba5a774b0b2a6b9f4bdcbd95
* | Add visual state callbacks to the WebView.Tobias Sargeant2015-03-171-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Registering a visual state callback allows the caller to be notified after the commit, activation and swap of the current (or future) state of the DOM tree has occurred. At the point at which the callback is called, the caller can be sure that any DOM updates made prior to the registration are ready to be drawn in the next WebView#onDraw. We also provide a convenience callback related to the visual state: * WebViewClient.onPageCommitVisible; called at the earliest point at which the next draw will not render contents from the previously loaded page. Bug: 6375170 Change-Id: I17e706b6e6ba4a8c28c835552687c9f7a4623024
* | Provide better error reporting for WebViewMikhail Naganov2015-03-061-0/+35
| | | | | | | | | | | | | | | | Add new callbacks into WebViewClient that will provide notifications about subresource loading errors and HTTP errors received from servers. Bug: 19313118 Change-Id: Idb47f53ef7e72cb95f3e9b89d1e238d69e896b8b
* | Remove unused imports in frameworks/base.John Spurlock2015-02-281-2/+0
| | | | | | | | Change-Id: I031443de83f93eb57a98863001826671b18f3b17
* | Update docs to say onPageStarted is not called for fragment navigations.Marcin Kosiba2015-01-271-1/+3
|/ | | | | BUG: 5014122 Change-Id: I264f99cb01496895f5ed77bfb3a5a45329bca53e
* Add more params to WebViewClient.shouldInterceptRequest.Marcin Kosiba2014-07-151-0/+23
| | | | | | | | | | This changes shouldInterceptRequest to take an object containing the following new parameters: isMainFrame, hasUserGesture, method, headers. This also lets the embedder specify the following additional properties of the response: status code, response phrase, headers. BUG: 7589347 Change-Id: Id922c5e7023eb067db871e6f782f599492a2428f
* Unhide Client Cert APISSelim Gurun2014-05-021-2/+0
| | | | | Bug:12983007 Change-Id: I9ae23be110ff036ce64271841e1ba69122ce6caa
* Fix WebViewClient docsMichael Wright2014-05-011-4/+5
| | | | Change-Id: I960701a49be66fccfd03a8876779a5f7917642ea
* Merge "Add unhandledInputEvent API to ViewRoot"Michael Wright2014-05-011-1/+33
|\
| * Add unhandledInputEvent API to ViewRootMichael Wright2014-04-291-1/+33
| | | | | | | | | | | | | | | | | | | | Update WebViewClient to use it instead, and add a new public API, onUnhandledInputEvent. Note that WebViewClients won't receive this call back until WebView is updated to use it. Bug: 14279909 Change-Id: Ied49791b469849f5c4cf4471f2b26c56b03f4961
* | fix buildColin Cross2014-04-241-24/+0
| | | | | | | | | | | | | | | | When commit 4e48f40b0384110082bec52caf38d2d47ce505f5 merged from AOSP it added a hunk that was already present. Remove the second copy. Change-Id: I48b30fd5fe21d6668cc904744fed7d5044fae91d