Status Update
Comments
ku...@google.com <ku...@google.com>
bo...@google.com <bo...@google.com> #2
Doc changes when unhiding the API:
- WebMessageListener does not support ARRAY_BUFFER, review docs to make sure it clearly documented.
- WebMessageCompat: document
getData
andgetArrayBuffer
will return null, unlessgetType
is equal to string or array buffer. - WebMessagePortCompat: review docs and make sure new type is updated.
bo...@google.com <bo...@google.com> #3
Branch: androidx-main
commit ab44a8fb40979c6790385beeb83e7d52378a0212
Author: Richard He <linyhe@microsoft.com>
Date: Thu Sep 29 17:58:19 2022
Add ArrayBuffer support in WebMessageCompat.
This add a new type (ArrayBuffer) in WebMessageCompat, which can be
send from App to Chromium and vice versa. A transferable ArrayBuffer
from JavaScript is also supported.
Since the new type is not supported by framework,
`WebMessagePort#setWebMessageCallback` changed the behavior to use
WebView impl first.
And the following PostMessage API uses WebView impl if the
WebMessage typs is not support by framework:
- WebMessagePort#postMessage
- WebViewCompat#postWebMessage
To keep backwords competibility, the following APIs do not throw
exception when the type is not correct.
- String WebMessageCompat#getData
- Byte[] WebMessageCompat#getArrayBuffer
Design doc:
Test: Added WebViewWebMessageCompatTest
Change-Id: I705512d2be14315831599ceb98e37be300fa5591
Bug: 251152171
M webkit/webkit/src/main/java/androidx/webkit/internal/WebMessageListenerAdapter.java
A webkit/webkit/src/main/java/androidx/webkit/internal/WebMessagePayloadAdapter.java
A webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/WebMessageCompatActivity.java
M webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/JsJavaInteractionActivity.java
M webkit/webkit/src/main/java/androidx/webkit/WebMessageCompat.java
A webkit/integration-tests/testapp/src/main/assets/www/web_message_compat.html
M webkit/integration-tests/testapp/src/main/AndroidManifest.xml
M webkit/webkit/src/main/java/androidx/webkit/internal/WebMessageAdapter.java
M webkit/webkit/src/main/java/androidx/webkit/internal/WebViewFeatureInternal.java
M webkit/webkit/src/main/java/androidx/webkit/WebViewCompat.java
M webkit/webkit/src/main/java/androidx/webkit/internal/WebMessageCallbackAdapter.java
A webkit/webkit/src/androidTest/java/androidx/webkit/WebViewWebMessageCompatTest.java
M webkit/webkit/src/main/java/androidx/webkit/internal/WebMessagePortImpl.java
A webkit/integration-tests/testapp/src/main/res/layout/activity_web_message_compat.xml
M webkit/webkit/src/main/java/androidx/webkit/WebViewFeature.java
M webkit/integration-tests/testapp/src/main/res/values/donottranslate-strings.xml
ad...@gmail.com <ad...@gmail.com> #4
The following release(s) address this bug:
androidx.webkit:webkit:1.6.0-alpha02
tr...@gmail.com <tr...@gmail.com> #5
Branch: androidx-main
commit f0be00e0c911751fe832ea99d88f6b30e25e124e
Author: Richard He <linyhe@microsoft.com>
Date: Fri Apr 21 13:56:44 2023
Add ArrayBuffer support in WebMessageListener
This CL adds ArrayBuffer type support in WebMessageListener,
which can be send from App to Chromium and vice versa.
A new public API in JavaScriptReplyProxy is added to post
ArrayBuffer to Web. For receiving ArrayBuffer from Web,
WebMessageListener#onPostMessage reuses `WebMessageCompat`, which
added ArrayBuffer support in previous CL, see:
I705512d2be14315831599ceb98e37be300fa5591.
This CL also rename feature flag from
`WEB_MESSAGE_GET_MESSAGE_PAYLOAD` to `WEB_MESSAGE_ARRAY_BUFFER`.
Design doc:
Test: Add in WebViewWebMessageListenerTest
Bug: 251152171
Change-Id: I3e30d6524187b508b714e41844cfbb3c4e36d75b
M webkit/integration-tests/testapp/src/main/assets/www/web_message_listener.html
M webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/WebMessageCompatActivity.java
M webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/WebMessageListenerActivity.java
M webkit/webkit/src/androidTest/java/androidx/webkit/WebViewWebMessageCompatTest.java
M webkit/webkit/src/androidTest/java/androidx/webkit/WebViewWebMessageListenerTest.java
M webkit/webkit/src/main/java/androidx/webkit/JavaScriptReplyProxy.java
M webkit/webkit/src/main/java/androidx/webkit/WebMessageCompat.java
M webkit/webkit/src/main/java/androidx/webkit/WebViewCompat.java
M webkit/webkit/src/main/java/androidx/webkit/WebViewFeature.java
M webkit/webkit/src/main/java/androidx/webkit/internal/JavaScriptReplyProxyImpl.java
M webkit/webkit/src/main/java/androidx/webkit/internal/WebMessageAdapter.java
M webkit/webkit/src/main/java/androidx/webkit/internal/WebMessageListenerAdapter.java
M webkit/webkit/src/main/java/androidx/webkit/internal/WebMessagePayloadAdapter.java
M webkit/webkit/src/main/java/androidx/webkit/internal/WebViewFeatureInternal.java
wd...@google.com <wd...@google.com> #6
tr...@gmail.com <tr...@gmail.com> #7
Branch: androidx-main
commit bf75ca82f3a2182d583436a85f466396cf2f4f72
Author: Richard He <linyhe@microsoft.com>
Date: Thu May 18 14:47:22 2023
Unhide API for WEB_MESSAGE_ARRAY_BUFFER feature.
This CL unhides the public API related to ArrayBuffer support in
WebMessageCompat, WebMessagePortCompat and JsReplyProxy.
Lint baseline: Like WebMessageCompat String constructor, this
change still use WebMessagePortCompat array as parameter.
Fixes: 251152171
Test: ./gradlew :webkit:webkit:checkApi
Test: ./gradlew :webkit:webkit:verifyDependencyVersions
Relnote: "Add support for passing ArrayBuffer over
`WebMessagePortCompat#postMessage`, `JsReplyProxy#postMessage`
and `WebViewCompat#postWebMessage`, receiving ArrayBuffer from
JavaScript over `WebMessagePortCompat` and `WebMessageListener`,
and receiving transferable ArrayBuffer from JavaScript over
`WebMessagePortCompat`."
Change-Id: Ie756728c63c528c3e36417f7719cead78d7c99eb
M webkit/webkit/api/api_lint.ignore
M webkit/webkit/api/current.txt
M webkit/webkit/api/restricted_current.txt
A webkit/webkit/src/androidTest/java/androidx/webkit/WebMessageCompatUnitTest.java
M webkit/webkit/src/main/java/androidx/webkit/JavaScriptReplyProxy.java
M webkit/webkit/src/main/java/androidx/webkit/WebMessageCompat.java
M webkit/webkit/src/main/java/androidx/webkit/WebMessagePortCompat.java
M webkit/webkit/src/main/java/androidx/webkit/WebViewCompat.java
M webkit/webkit/src/main/java/androidx/webkit/WebViewFeature.java
wd...@google.com <wd...@google.com> #8
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.webkit:webkit:1.8.0-alpha01
bo...@google.com <bo...@google.com> #9
could be related to the linux flavor regarding address resolution.
my machine has almost the same config, and the getaddrinfo just works.
I wonder if there is some sys log you can put up here regarding that error.
bo...@google.com <bo...@google.com> #10
tr...@gmail.com <tr...@gmail.com> #11
OpenSUSE Tumbleweed has a toggle in it's network settings for "Enable IPv6". I don't have IPv6 on my internet connection and none of my local devices need it, so I usually leave it disabled.
I tried enabling it and viola, the emulator is starting for me again (without needing the ModemSimulator flag).
It looks like that toggle adds net.ipv6.conf.all.disable_ipv6 = 1
to /etc/sysctl.conf.
bo...@google.com <bo...@google.com> #12
that is very helpful information.
I was surprised that emulator does not even try ipv4 when ipv6 failed;
error_setg should be just a warning instead of quitting.
ad...@gmail.com <ad...@gmail.com> #13
Yes,turning IPv6 on worked for me too.
wd...@google.com <wd...@google.com> #14
bohu@, shall we close this bug?
wd...@google.com <wd...@google.com>
jo...@gmail.com <jo...@gmail.com> #15
wd...@google.com <wd...@google.com> #16
@bohu It is probably a good idea to make sure that emulator keeps going when the name service resolution fails in ipv6 for at line
if ((rc = getaddrinfo(addr, port, &ai, &local)) != 0) {
error_setg(errp, "address resolution failed for %s:%s: %s", addr, port,
gai_strerror(rc));
goto err;
}
wd...@google.com <wd...@google.com>
bo...@google.com <bo...@google.com> #17
there should ahve been more attempts before erroing out
ra...@google.com <ra...@google.com> #20
This bug has been verified as fixed with the latest Emulator Stable 32.1.13-10086546 on my Linux workstation. Following steps are followed to reproduce and verify the issue
- Disabled Network connectivity on my machine
- Launch API 30/31/32 AVDs using older Emulator[API 30 worked and 31/32 failed]
- Installed Latest Emulator 32.1.13-10086546
- Launch API 30/31/32 AVDs using new Emulator[API 30/31/32 works]
Description
AI-203.7717.56.2031.7935034, JRE 11.0.10+0-b96-7249189x64 JetBrains s.r.o., OS Linux(amd64) v5.15.0-051500-generic, screens 1366.0x768.0
Emulator version:31.1.4
Android SDK platform tools version:31.0.3
Host cpu:12th Gen Intel(R) Core(TM) i5-12600K
Device name:Pixel 5
Emulator with system image android 11 is working properly but Android 12(31) and 12L(32) is not even loading in my PC.
It was working perfectly in my previous PC with Ryzen 3200G processor,So I believe that the issue is with intel 12th gen processor.FYI I'm not using any external GPU.running emulator in cpu.