Commit Graph

3874 Commits

Author SHA1 Message Date
Anna Malova
242def4269 Use Network object instead of network handle and expand documentation.
Bug: 165192953
Bug: 165307632
Test: N/A
Change-Id: I5e2d22d3c332debe33d0cc617f86071b5926c50a
2020-08-19 13:46:02 +01:00
Felipe Leme
b07b092f9e Refactored some UserManager.getUsers(excludeDying) calls.
Replaced by getUsers() when exlcudeDying was hardcoded to false, or
getUsers(true,  excludeDying, true) when it was a variable.

This refactoring will help replacing getUsers(true) to getAliveUsers().

Bug: 157921703

Test: m
Test: atest atest LockscreenFrpTest LockSettingsServiceTests SyntheticPasswordTests

Change-Id: I139462ab329fe46d8136eae0a39ac071a7e019db
2020-08-12 15:03:37 -07:00
Anna Malova
1d0dede72d Add new methods to PacProcessor to
- allow multiple PacProcessors
- allow network-aware DNS lookups in PAC scripts

Bug: 162785263
Test: n/a

Change-Id: I39432d8f6358e386527b00b58d92e74ef32763d1
2020-08-06 14:44:32 +01:00
Nate Fischer
36f0f45750 WebView: remove non-inclusive terminology from docs
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
2020-07-23 10:53:27 -07:00
John Reck
ee26d1ef65 Merge "Remove legacy callDrawGlFunction2 from HWUI" 2020-06-30 19:09:37 +00:00
John Reck
aa4c982294 Remove legacy callDrawGlFunction2 from HWUI
Bug: 151439970
Test: CtsUiRenderingTestCases passes

Change-Id: I1c29df17bb6e8b078467edf73cb3547db6948cdd
2020-06-26 13:49:05 -07:00
Changwan Ryu
47c0a48089 [WebView] Listen to window insets change
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
2020-06-25 17:15:26 -07:00
TreeHugger Robot
b1837c419f Merge "webkit: add a note regarding FLAG_SECURE for default dialogs" into rvc-dev am: f7484457cd am: bedf7e5161 am: ed9855498f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11617993

Change-Id: Id04faa91cf3c8f614ad5197506ef3e658569ffd1
2020-06-03 18:09:22 +00:00
Changwan Ryu
a9e2ed7bbd webkit: add a note regarding FLAG_SECURE for default dialogs
Child windows do not inherit FLAG_SECURE from parent windows, and
therefore, the default dialogs for JS callbacks do not have this flag
even when the app window has it.

This CL adds a note warning about this behavior to mitigate the
potential vulnerability.

Bug: 120086187
Test: m -j offline-sdk-docs seems not broken
Change-Id: I12f12befd1f303d26ebc866f4817f5184279caeb
2020-06-01 13:56:47 -07:00
TreeHugger Robot
55deb7e9f8 Merge "webkit: Update documentation for onJsBeforeUnload callback" into rvc-dev am: a203c27aa9 am: 346676a352 am: 52451f3b71
Change-Id: I131ad095a2ad012a56d6b7acc6bbd759054e3655
2020-05-27 21:18:14 +00:00
Changwan Ryu
a56c69eae0 webkit: Update documentation for onJsBeforeUnload callback
Fix documentation to clearly indicate that the default behavior is to
show WebView's own default dialog, and also describe the default
behavior more clearly and how to customize it.

Bug: 154014645
Test: m -j offline-sdk-docs seems not broken
Change-Id: I7d1e10c5d406ed739fb3963b9099791cfce95063
2020-05-27 12:09:32 -07:00
TreeHugger Robot
bc5dbbaa83 Merge "webkit: Update documentation for onJsConfirm, onJsPrompt callbacks" into rvc-dev am: a0b41154fe am: c82858208b am: 08b24a4d1c
Change-Id: I0c6e831a6fc98b014d705e69ced0397ba21d2af7
2020-05-20 06:17:48 +00:00
TreeHugger Robot
a0b41154fe Merge "webkit: Update documentation for onJsConfirm, onJsPrompt callbacks" into rvc-dev 2020-05-20 05:44:33 +00:00
Changwan Ryu
dd4f03d419 webkit: Update documentation for onJsConfirm, onJsPrompt callbacks
Fix documentation to clearly indicate that the default behavior is to
show WebView's own default dialog, and also describing clearly default
dialog behavior and how to customize it.

Note that onJsBeforeUnload is not updated at the moment as I could not
find a way to reproduce it.

Bug: 154014645
Test: m -j offline-sdk-docs seems not broken

Change-Id: I5ee09ea35340eb8d17353eda1786dcebcff4a29e
2020-05-19 14:30:44 -07:00
TreeHugger Robot
58eb2d8c64 Merge "Update deprecation note for Application Cache." into rvc-dev am: 6da69cadba
Change-Id: I298b276efe0bbe78aa7c4f6feb84f58c7cc7ff91
2020-05-18 19:18:17 +00:00
Torne (Richard Coles)
fc23be81bd Update deprecation note for Application Cache.
Update the deprecation note for WebSettings.setAppCacheEnabled and
related to mention the public blog post about the feature being removed.

Fixes: 156409857
Test: m offline-sdk-docs
Change-Id: I0481937d665f3f16b61b921aa19e306ba8bb16e0
2020-05-18 13:40:40 -04:00
TreeHugger Robot
94a9640197 Merge "webkit: Update documentation for onJsAlert callback method" into rvc-dev am: e0a73b1bb6
Change-Id: I558dcc2c3f5f093d27fccd6b54ad12f746c9bed9
2020-05-13 18:20:09 +00:00
Changwan Ryu
31e2db92ce webkit: Update documentation for onJsAlert callback method
Fix documentation to clearly indicate that the default behavior is to
show WebView's own default dialog.

Also, change some wording to avoid confusion.

Bug: 154014645
Test: m -j offline-sdk-docs seems unbroken
Change-Id: I3f6676094e5472aa99bb014cf2b489f59133d094
2020-05-13 16:52:24 +00:00
TreeHugger Robot
02027c3a3d Merge "Deprecate WebSettings.setAppCacheEnabled and related." into rvc-dev am: 291cf5d293
Change-Id: I14d91abc884fecfc0c92c7fd4ffac56324de79a6
2020-05-12 19:28:29 +00:00
Torne (Richard Coles)
76752c8f02 Deprecate WebSettings.setAppCacheEnabled and related.
Chrome will be removing the Application Cache API in future; deprecate
the APIs in WebView which allow Android apps to enable it.

Test: make offline-sdk-docs
Fixes: 156266477
Change-Id: I0feff5289706b5f7985013a18d9cf0e3e6b3ba78
2020-05-12 11:57:30 -04:00
Automerger Merge Worker
6cbf2ff3eb Merge "Move yesterday/today Strings from LocaleData into a new ICU class" am: 05f3bf50d6 am: c1130c259b
Change-Id: I896db229cc70105a79687becd1d79a3c1d77553c
2020-03-12 18:46:44 +00:00
vichang
05f3bf50d6 Merge "Move yesterday/today Strings from LocaleData into a new ICU class" 2020-03-12 18:17:06 +00:00
Victor Chang
b8fd6681b5 Move yesterday/today Strings from LocaleData into a new ICU class
Note that the strings are no longer cached here to avoid permanent
app Java heap growth due to strong cache. Consider that no user of DateSorter
exists in the platform, and the API is legacy. The impact on app performance
is expected to be very low.

Bug: 144560585
Bug: 138994281
Test: atest CtsWebkitTestCases:android.webkit.cts.DateSorterTest
Change-Id: I659d430901cf1838befc0a35f5188d069169e824
2020-03-10 18:51:21 +00:00
Hazem Ashmawy
7536c2bda0 Android WebView: Deprecate unsafe file urls APIs
Deprecate unsafe:
- WebSettings#setAllowUniversalAccessFromFileURLs
- WebSettings#setAllowFileAccessFromFileURLs
- CookieManager#setAcceptFileSchemeCookies

And direct the users to use WebViewAssetLoader instead.

Bug: 148841999
Test: m offline-sdk-docs -j20
Change-Id: I607d1343cb2aa5baead49ceff6dbac4a4474009c
2020-03-05 19:56:07 +00:00
Hazem Ashmawy
ee824f006b WebView: Update setAllowFileAccess doc to reflect new default value
Update setAllowFileAccess java docs to reflect that it's now disabled by
default after merging crrev.com/c/2056824. Also add a note to use
androidx WebViewAssetLoader instead.

Bug: 148840827
Test: m offline-sdk-docs -j20
Change-Id: I15866ab63818771fd91f40828846d6b4c39d278e
(cherry picked from commit 47a4c2da51)
2020-02-26 12:26:36 +00:00
TreeHugger Robot
d73f4e387c Merge "WebView: deprecate 'Secure' cookies for insecure schemes" 2020-02-17 10:56:03 +00:00
Nate Fischer
bc22d8638b WebView: deprecate 'Secure' cookies for insecure schemes
No change to logic, only docs. This announces 'Secure' cookies are
deprecated for insecure URL schemes (only "https://" is considered
secure). This doesn't mention target SDK, because apps should follow
this guidance for all WebView versions, target SDKs, and OS levels.

Bug: 149589092
Test: m offline-sdk-docs -j4
Change-Id: I07c2b5341588d354f7f8219ce71a3d2ca04bc982
2020-02-14 15:04:56 -08:00
Anna Malova
4454e20081 Switch to WebViewFactoryProviderForR.
Test: n/a
Change-Id: I855463395044045b0ad1c7904a9aeb6fd32eaf54
2020-02-13 17:45:09 +00:00
Torne (Richard Coles)
51c221ab4e Mark nullability in WebViewProviderResponse.
The packageInfo can be null when the system is in a bad state and has no
WebView implementation; mark it @Nullable to make this clear.

Test: m
Change-Id: I9f87adf46809b9f1d4d6e68f35ec0fa18617834d
2020-02-12 13:39:14 +00:00
Torne (Richard Coles)
a528189652 Clarify WebResourceRequest.isForMainFrame docs.
Make it more explicit that isForMainFrame() returns true only for the
actual main frame document, and not for any subresources, even if they
are subresources of the main frame.

Test: make ds-docs
Change-Id: I942cbe6a8f50d2f3af00b99b14a8503c8c4556de
2020-02-07 13:36:44 +00:00
Anna Malova
113d302b49 Rename PacProcessor#makeProxyRequest to PacProcessor#findProxyForUrl.
This name corresponds to the name of PAC script function.

Bug: 148068051
Test: N/A
Change-Id: I722318988367d86d149ddd7d5020022f7734adff
2020-01-21 16:24:53 +00:00
Anna Malova
09f00a48c3 Add PacProcessor system API.
PacProcessor is intended to be used as an internal implementation detail of
com.android.pacprocessor.PacService, which in turn implements the java.net.ProxySelector interface.

Processing the PAC file requires starting up an instance of V8
so is expected to be handled by the central system service and queried over IPC (PacService),
not for apps to try to run it themselves.

Bug: 147578322
Test: N/A.

Change-Id: I857bb3616d7029fa0d42bf25def50f46094ec1d9
2020-01-13 13:57:59 +00:00
Automerger Merge Worker
bd4e71148a Merge "Use new UnsupportedAppUsage annotation." am: 39f329c52a am: 62169a75cc
Change-Id: Ib94ae7e9f19c543d0180e3a547fc02f55c055ca7
2020-01-10 15:16:49 +00:00
Artur Satayev
a900cb533f Use new UnsupportedAppUsage annotation.
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
Merged-In: I5be7335b23a92b8ac80d2fd890198273b66ad644
2020-01-09 14:59:34 +00:00
Artur Satayev
ad9254cb1d Use new UnsupportedAppUsage annotation.
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
2019-12-18 16:27:02 +00:00
Laís Minchillo
c1360b215e [webview] Annotate API parameters as @Nullable or @NonNull
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
2019-12-03 11:14:45 +00:00
Artur Satayev
751e55114c Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

This is partial merge of aosp/Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09. Telephony greylist cleanup has been done separately. Note that annotations outside of frameworks/base/ have been merged from AOSP.

Bug: 137350495
Test: m
Exempt-From-Owner-Approval: merge
Change-Id: I015c466e8b69cc0fed5e9d394ba865aad11d8ba6
2019-11-19 15:05:35 +00:00
Artur Satayev
756d3b447a Merge "Add @UnsupportedAppUsage annotations for greylist." am: 423c3a32d6
am: 7a565c45b1

Change-Id: I48075ef4296e0b55c0055f7364c5129bbd60e9ed
2019-11-11 09:33:13 -08:00
Artur Satayev
7a565c45b1 Merge "Add @UnsupportedAppUsage annotations for greylist."
am: 423c3a32d6

Change-Id: I5387b4742fdaf67ad3189356f2361f73969b53a8
2019-11-11 09:13:24 -08:00
Artur Satayev
fc46be7dbd Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Bug: 137350495
Test: m

Change-Id: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
Merged-In: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
2019-11-08 16:17:13 +00:00
Torne (Richard Coles)
ef3c3020b5 Merge "WebView: note deprecation of onscreen zoom controls." into qt-dev am: b0bcbb0c35 am: 016ee6777e am: 30c6079772
am: a9395a3a0b

Change-Id: If96046f0446e0f3f05ec605ce3cd33759401b19a
2019-11-05 15:32:34 -08:00
Torne (Richard Coles)
a9395a3a0b Merge "WebView: note deprecation of onscreen zoom controls." into qt-dev am: b0bcbb0c35 am: 016ee6777e
am: 30c6079772

Change-Id: I0fbdb26b176e4f30738923618dd063341017b7c1
2019-11-05 15:26:29 -08:00
Torne (Richard Coles)
016ee6777e Merge "WebView: note deprecation of onscreen zoom controls." into qt-dev
am: b0bcbb0c35

Change-Id: If316cbd120ac807313f4d89a212be01b5e4a313e
2019-11-05 15:14:34 -08:00
TreeHugger Robot
b0bcbb0c35 Merge "WebView: note deprecation of onscreen zoom controls." into qt-dev 2019-11-05 22:57:36 +00:00
Xin Li
6f48900f50 DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
Bug: 142003500
Change-Id: If5056a73ede668b0048ca107b686413695e5b3b6
2019-10-30 14:33:01 -07:00
Torne (Richard Coles)
c1661db644 Merge "Clarify CookieManager RFC reference." into qt-dev am: 7186df9e6f am: 45a9d4bc79 am: 04be94e23e
am: c1c1a5e7d7

Change-Id: I4dcb73c107e1c1a8e4f8c3fa68dc529f634df9ef
2019-10-30 10:11:11 -07:00
Torne (Richard Coles)
c1c1a5e7d7 Merge "Clarify CookieManager RFC reference." into qt-dev am: 7186df9e6f am: 45a9d4bc79
am: 04be94e23e

Change-Id: I4b40d40281753e10408d41114490794734002d72
2019-10-30 10:03:58 -07:00
Torne (Richard Coles)
45a9d4bc79 Merge "Clarify CookieManager RFC reference." into qt-dev
am: 7186df9e6f

Change-Id: I91a6a53d029b8ec2567eaac93056c91642b5177e
2019-10-30 09:51:40 -07:00
TreeHugger Robot
7186df9e6f Merge "Clarify CookieManager RFC reference." into qt-dev 2019-10-30 16:31:03 +00:00
Nate Fischer
502711d460 WebView: clarify docs for onShowCustomView am: aaaa660a44 am: 3ea1a6d6ff am: b2bc8ddcfb
am: a906395b9e

Change-Id: I3285728d0692fb16d611d6b18fc826c3ce87f238
2019-10-29 00:47:07 -07:00