Commit Graph

3703 Commits

Author SHA1 Message Date
Toby Sargeant
7dee65518e Merge "[webview] Add a force dark WebSetting" 2018-12-06 23:04:51 +00:00
Tobias Sargeant
fec405a35a [webview] Add a force dark WebSetting
Force dark mode is a tristate:

- never invert colours for webview content
- always invert colours
- follow the parent view behaviour

Test: CTS test, after WebView implementation.
Bug: 120599879
Change-Id: Ib11358bc3a3cbc5e55c0ec184084c7d205acf60c
2018-12-06 18:57:32 +00:00
Nate Fischer
7198156c27 Merge "WebView: remove unused Token Binding system APIs" 2018-12-06 03:57:54 +00:00
Nate Fischer
eb667e66eb WebView: remove unused Token Binding system APIs
These APIs never really launched, and the Token Binding protocol is no
longer supported by the chromium team (which means these APIs have been
broken for some time).

This removes most of the TokenBinding API surface, keeping (and
deprecating) just enough to allow us to still compile and run WebView
APKs.

Bug: 119576150
Test: make update-api
Change-Id: Ia5a4258aac5ed21691ea36a428b4aa7195ff21ca
2018-12-04 17:32:12 -08:00
Felipe Leme
bf01eeafa0 Set WebView as important for Content Capture.
Test: echo 'In TreeHugger we trust!'
Bug: 111276913

Change-Id: I28c4691c9b4adb8163eaff15f7e498f637a162ad
2018-11-26 15:54:08 -08:00
Felipe Leme
92ab3857b0 Simplified View.onProvideContentCaptureStructure()
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
2018-11-16 09:19:37 -08:00
Felipe Leme
1b0e7e816c Implemented WebView.onProvideContentCaptureStructure()
Bug: 117944706
Test: m -j update-api

Change-Id: I2ad56873bae314b7bf66aa123a8ae47eecb7af2e
2018-11-13 16:22:25 -08:00
John Reck
8884cfc13e Merge "Rename & package shuffle" 2018-10-23 20:02:00 +00:00
Nate Fischer
69d7e2e9e1 WebView: fix mistaken wording in API doc
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
2018-10-18 19:20:26 -07:00
TreeHugger Robot
dc315fd243 Merge "WebView: add new integer for billing threats" 2018-10-18 19:50:08 +00:00
Nate Fischer
f9a235316c WebView: add new integer for billing threats
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
2018-10-17 20:30:54 -07:00
John Reck
32f140aa67 Rename & package shuffle
Rename DisplayListCanvas -> RecordingCanvas
Move RecordingCanvas to android.graphics
Move RenderNode to android.graphics

Bug: 112709971
Test: make & boot
Change-Id: Iddeb6a89f8923ea81a1f37bbee4e9b1db8ede238
2018-10-04 16:18:12 -07:00
Nate Fischer
1e13fae31c WebView: deprecate accidentally-exposed constructors
This deprecates public-exposed constructors. These constructors were
exposed by accident. These classes shouldn't be instantiated by
applications, but should only be instantiated by WebView.

In some cases, the app should get a singleton instance using
a #getInstance method. In these cases, we document this explicitly in
the deprecation note.

Bug: 110807530
Test: make docs, manually verify docs look good.
Change-Id: Ibe73b3399c9ced0cf4fbb01e1df13564476df252
2018-09-25 19:13:57 -07:00
Nate Fischer
c1de7208ba Merge "WebView: fix TracingController example usage" into pi-dev am: 679e58a8d3
am: fc5c86fda8

Change-Id: Ib44310caef4c52c697307f345dbbf95d30647b0f
2018-09-20 14:02:58 -07:00
Nate Fischer
fc5c86fda8 Merge "WebView: fix TracingController example usage" into pi-dev
am: 679e58a8d3

Change-Id: I72c29fdc11925668a781bbff355fc1c429c2a888
2018-09-20 13:30:49 -07:00
TreeHugger Robot
679e58a8d3 Merge "WebView: fix TracingController example usage" into pi-dev 2018-09-20 18:57:55 +00:00
Nate Fischer
9e39bf1067 WebView: fix TracingController example usage
This fixes a minor mistake in the TracingController class usage. The
example previously used a bare `CATEGORIES_WEB_DEVELOPER` instead of
`TracingConfig.CATEGORIES_WEB_DEVELOPER`.

Bug: 116227333
Test: make docs
Change-Id: I648dd0d5e61666e61adb27303c185013bd80b0ea
2018-09-20 18:17:05 +00:00
Nate Fischer
d75020c65f Merge "WebView: fix SafeBrowsingResponse javadoc bug" into pi-dev am: 62348dad3e
am: 14b2b5f1da

Change-Id: I01e89bf78921bda60ecb100e8d0b45a2c8599688
2018-09-13 15:52:31 -07:00
Nate Fischer
14b2b5f1da Merge "WebView: fix SafeBrowsingResponse javadoc bug" into pi-dev
am: 62348dad3e

Change-Id: Id256658eb343fee58eb4cce2435b03a325d7c3ec
2018-09-13 15:41:35 -07:00
Nate Fischer
211d6159b9 WebView: fix SafeBrowsingResponse javadoc bug
No change to logic, only minor javadoc change.

This fixes javadoc in SafeBrowsingResponse.java. Previously, the first
(and only) sentence did not end in a period (it ended with a quote
character). The Android javadoc parser doesn't handle this well--it
requires a period followed immediately by some whitespace character.

This wasn't a big issue because this was the only sentence. However, if
we ever add a second sentence, both sentences will appear as the
one-line "synopsis doc" for the methods.

See http://go/android-api-guidelines#heading=h.teqny5h9ohqc for details.

Bug: 115441402
Test: make docs
Change-Id: Ic363ed1ecf3d169d598ae85d55297d0a520a6604
2018-09-12 17:26:41 -07:00
TreeHugger Robot
94da778113 Merge "Simplify WebView RELRO creation and handle more cases." 2018-09-12 21:36:36 +00:00
Mathew Inwood
4ef06935d8 Merge "Add @UnsupportedAppUsage annotations" am: 9513a9e215
am: 5e2a54ab19

Change-Id: Iab4a59a3cdc6aa5387b015f749713538ad66c9db
2018-08-20 11:44:32 -07:00
Mathew Inwood
5e2a54ab19 Merge "Add @UnsupportedAppUsage annotations"
am: 9513a9e215

Change-Id: I347d6893209c55b6e6029034db1b42957f27306a
2018-08-20 11:32:10 -07:00
Mathew Inwood
42afea26b8 Add @UnsupportedAppUsage annotations
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
2018-08-16 19:18:28 +01:00
Mathew Inwood
62d83fb3f4 Add @UnsupportedAppUsage annotations
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
2018-08-16 19:09:48 +01:00
TreeHugger Robot
b76b6c5a43 Merge "Update WebView#clearClientCertPreferences docs." into pi-dev 2018-08-14 18:22:49 +00:00
TreeHugger Robot
0d75830053 Merge "Update WebBackForwardList javadoc." into pi-dev 2018-08-14 14:09:20 +00:00
Torne (Richard Coles)
7def66c676 Clarify WebView's lack of plugin support.
Update docs to clarify that plugins are in fact not supported from K
onward and that enabling them doesn't do anything.

Bug: 112579915
Test: m offline-sdk-docs
Change-Id: I8678ea716be0adc4cd3a6fae1b4776e312ec29e0
(cherry picked from commit 1676c95ddc)
2018-08-14 13:43:29 +00:00
Torne (Richard Coles)
5326772106 Update WebView#clearClientCertPreferences docs.
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 01eb128213)
2018-08-13 21:30:34 +00:00
Torne (Richard Coles)
e4b86644bb Update WebBackForwardList javadoc.
Update javadoc for WebBackForwardList and WebHistoryItem. Remove
references to history items being updated as this no longer occurs, and
clarify in clone() that there's no need to acutally do this any more.

Also remove a bunch of implementation notes about
atomicity/synchronisation that are being rendered attached to the return
value and likely aren't even true any more, let alone relevant to
developers.

Bug: 74593032
Test: make offline-sdk-docs
Change-Id: I4ce33133d2ff18e7376d768c7a2e076ecd2a8b95
(cherry picked from commit 8949046528)
2018-08-13 21:30:23 +00:00
Paul Miller
f2043b4af5 Clarify WebViewClient.shouldOverrideUrlLoading docs
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 3819a6467b)
2018-08-08 21:56:31 +00:00
Torne (Richard Coles)
5abeed5e7f Simplify WebView RELRO creation and handle more cases.
Instead of having the system server search for the absolute path to the
WebView's native .so file, simply pass the package name and library
filename to the RELRO creation process. The RELRO creation process can
then request a classloader that corresponds to that package, and use
that classloader to let the system search for the library itself using
the standard platform library search path logic.

This significantly simplifies the WebView code, but more importantly
enables the library to be found even if it's not actually present in the
main WebView APK and is instead stored in a shared library APK: our
previous code was never updated to handle this new case when the
platform introduced it.

As a side effect of no longer searching for the library, we also no
longer discover the size of the library, and thus cannot use the size to
calculate the amount of address space to reserve. This has been replaced
with a fixed size: 100MB for 32-bit processes (the previous default size
for when the size had not yet been calculated), and 1GB for 64-bit
processes. We do not anticipate WebView ever needing more than 100MB of
virtual address space for its native library on 32-bit platforms; it
currently uses about 44MB.

The unit tests covering the complex library searching logic have been
removed, as the functionality they are testing no longer exists.

Bug: 110790153
Test: WebView-related CTS and GTS tests
Change-Id: Icc7bcd0a2b33f4dbf26d0d663e098c9e207281a5
2018-08-07 17:29:07 -04:00
Paul Miller
3819a6467b Clarify WebViewClient.shouldOverrideUrlLoading docs
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
2018-07-27 19:15:15 -07:00
Laura Davis
f764754dbb Merge "Docs: Removed narrative content." into pi-dev am: b4f7c414a6
am: 7f05ea78dd

Change-Id: Ibfff8f72707a41936a4259a90d20eda559b44b0d
2018-07-17 11:50:10 -07:00
Laura Davis
b444e2d99e Docs: Removed narrative content.
Test: make ds-docs

Bug: 110268338
Change-Id: Ifaa4096d075500f1c7a53b1eec9e1944ed2ddda6
2018-07-16 16:02:47 -07:00
Torne (Richard Coles)
1676c95ddc Clarify WebView's lack of plugin support.
Update docs to clarify that plugins are in fact not supported from K
onward and that enabling them doesn't do anything.

Test: m offline-sdk-docs
Change-Id: I8678ea716be0adc4cd3a6fae1b4776e312ec29e0
2018-06-28 19:34:17 -04:00
Laura Davis
e9c5471942 Merge "docs: fixed broken link" into pi-dev am: 0f949c4f9c
am: c52a161253

Change-Id: I26c4ad4c02ffcd6f7eed37d23bfa5b227a313b87
2018-06-25 13:29:52 -07:00
Torne (Richard Coles)
01eb128213 Update WebView#clearClientCertPreferences docs.
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
2018-06-20 15:33:37 -04:00
Torne (Richard Coles)
8949046528 Update WebBackForwardList javadoc.
Update javadoc for WebBackForwardList and WebHistoryItem. Remove
references to history items being updated as this no longer occurs, and
clarify in clone() that there's no need to acutally do this any more.

Also remove a bunch of implementation notes about
atomicity/synchronisation that are being rendered attached to the return
value and likely aren't even true any more, let alone relevant to
developers.

Bug: 74593032
Test: make offline-sdk-docs
Change-Id: I4ce33133d2ff18e7376d768c7a2e076ecd2a8b95
2018-06-19 16:29:54 -04:00
Laura Davis
3311624d54 docs: fixed broken link
Test: make ds-docs

Bug: 110243990
Change-Id: Ia6f487ce88d59def5d6974c0d63d67c29ec5cf34
2018-06-18 14:49:23 -07:00
Torne (Richard Coles)
90f8c0f042 Merge "Update security-related WebView documentation." into pi-dev am: 4611a2e1bc
am: 1e31c1fbde

Change-Id: I5f9674deec3c5816ce2bfb085a22b459381eaf3f
2018-05-23 12:57:54 -07:00
Torne (Richard Coles)
97bf0beaf3 Update security-related WebView documentation.
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
2018-05-22 15:32:47 -04:00
Tim Volodine
13b129a225 Merge "[WebView Tracing API] documentation fixes." into pi-dev am: 4800d9a9e7
am: 234d296360

Change-Id: I69f1e212c2727bf81e40ab239013c977c2f1e3ff
2018-04-11 08:14:03 -07:00
TreeHugger Robot
4800d9a9e7 Merge "[WebView Tracing API] documentation fixes." into pi-dev 2018-04-11 14:38:02 +00:00
Tim Volodine
90980b4208 [WebView Tracing API] documentation fixes.
Some fixes to the WebView Tracing API related documentation.
In particular this patch makes sure that:
- the defaults are correct,
- the examples are correct,
- the formatting is ok,
- the text for parameters etc.. is formatted consistently,
- the documentation is spellchecked and typos corrected.

BUG: 63750258
Test: manual inspection of the generated html documentation
Change-Id: I53ac1a1d003e519739464b8d8554f3d8262c46e4
2018-04-11 02:48:56 +01:00
Torne (Richard Coles)
905fad520c Merge "Only match addresses without zip codes if at the end." into pi-dev am: 2946fba398
am: 935210c8d5

Change-Id: I4ebf09353235d989b90260df56827ddcde862c43
2018-04-09 06:21:00 -07:00
Torne (Richard Coles)
cfaf8a1e5b Only match addresses without zip codes if at the end.
The old native implementation of findAddress only accepted addresses
without zip codes if they appeared at the end of the string. This was
probably a bug as the documentation implies this should work in all
cases, but fixing this bug has caused a lot of false positives while not
fixing very many false negatives and this functionality is being
deprecated anyway, so change it back.

Fixes: 75409267
Test: tested upstream in chromium; direct copy of that code
Change-Id: I3f3c300035cf02a23284737431bc6f94f542cbe7
2018-04-06 15:26:36 -04:00
Jan Althaus
92556299ff Merge "Add deprecation notice to Linkify MAP_ADDRESSES" into pi-dev am: 28709538fe
am: 44249c227f

Change-Id: I778ae94b99cf88ec0f6d943195f0074bdbdca5b2
2018-04-06 08:11:06 -07:00
TreeHugger Robot
28709538fe Merge "Add deprecation notice to Linkify MAP_ADDRESSES" into pi-dev 2018-04-06 14:55:00 +00:00
Gustav Sennton
afc4b118a4 Merge "Remove WebView.getLooper()." into pi-dev am: fffec6ea9d
am: 46256efbec

Change-Id: I8c612d4ed2990a886c7703e530d9c8de5e8a098a
2018-04-06 06:02:24 -07:00