Status Update
Comments
ja...@google.com <ja...@google.com>
ja...@google.com <ja...@google.com> #2
The ToT dependency was coming from compose:test-utils
. Jeremy raised aosp/2254837 to pin this to a prebuilt.
Alternatively, we could have added explicit androidTestImplementation
dependencies on ToT to ensure it's available during dependency resolution.
TL;DR If we express a constraint on androidx.thing:thing:$TOT_VERSION
which maps to the tip-of-tree version for :thing:thing
, then any occurrence of androidx.thing:thing:$VERSION
where the constraint is present must also include :thing:thing
somewhere in the transitive dependencies.
mt...@gmail.com <mt...@gmail.com> #3
My understanding of this issue is:
-
Project A's library code depends on prebuilt B.
-
Project A's test depends on prebuilt B and also library C.
-
Library C declares a constraint saying that B must be the same version as Library C.
-
When resolving dependencies for Project A's tests, these tests depend on prebuilt B and library C, so library C's dependency information is also considered.
-
Library C says it requires B of the same version.
-
To reconcile:
- these requirements:
- the dependency on prebuilt B
- the constraint for B to match the version of C
- Gradle looks for a prebuilt of B with version matching C.
- these requirements:
-
No prebuilt of B exists with the same version matching Library C, so Gradle fails to resolve the dependency.
Is this right?
The request in
ja...@google.com <ja...@google.com> #4
No prebuilt of B exists with the same version matching the prebuilt of C, so Gradle fails to resolve the dependency.
Just to make sure we're aligned, this should read "library C" rather than prebuilt? It's library C (e.g. project(C)
with version $X
) that expresses a constraint on prebuilt B at version $X
.
Assuming we're aligned...
Yes however if library B (e.g. project("B")
) exists in the set of dependencies and its version matches C, then Gradle will successfully resolve the dependency by "upgrading" prebuilt B to library B.
mt...@gmail.com <mt...@gmail.com> #5
No prebuilt of B exists with the same version matching the prebuilt of C, so Gradle fails to resolve the dependency.
Just to make sure we're aligned, this should read "library C" rather than prebuilt? It's library C (e.g. project(C) with version $X) that expresses a constraint on prebuilt B at version $X.
Yes! Fixed, thanks
ja...@google.com <ja...@google.com> #6
The request in
is that libraries should publish this constraint information (rather than that Gradle should know how to automatically update prebuilt dependencies into project dependencies), so I think this issue is probably different b/146802533
Slightly different. Fixing
Given that this was caused by tests using different dependency versions than the library's runtime dependencies, though, maybe this is broken-as-intended? The fix that Jeremy implemented was to pin the tests to the same version.
mt...@gmail.com <mt...@gmail.com> #7
Marking as Fixed
even though the general problem can still occur. Unclear that we need a systemic fix.
ja...@google.com <ja...@google.com> #8
Thank you for reporting this issue. For us to further investigate this issue, please go over the data below carefully and provide the following additional information:
Important: all information is helpful and relevant
- Please provide a simple sample project that reproduces the issue (this gives us the closest test environment to yours which will help analyze your issue) by uploading the exported zip file of the project from Android Studio or a sample apk file. Note: Please upload to google drive and share the folder to
android-bugreport@google.com , then share the link here.
Once this information is provided we will pass this along to our product and engineering teams for inspection, thank you.
mt...@gmail.com <mt...@gmail.com> #9
Sure we will work on sample project and will let you know.
Meanwhile when we go through the below link, the order of selection in WIFI network on android device, this could be the reason for connecting back to “blizzard” network.
1. Saved unmetered networks
2. Suggested unmetered networks
3. Saved metered networks
4. Suggested metered networks
We feel "blizzard" is come under the " Saved unmetered networks" so it is always getting preferable to connect first than other type of available networks.
Could you please confirm whether this order impact our flow and this is reason for the issue ?
And is there any way/APIs available to increase the priority level for suggested network to connect first rather than from other mode of networks?
Kindly let us know your comments.
ja...@google.com <ja...@google.com> #10
Thank you for the update. We will share the sample app once it is shared.
Thank you for reporting this issue. We’ve shared this with our product and engineering teams and will continue to provide updates as more information becomes available.
ja...@google.com <ja...@google.com> #11
Thanks again for the feedback! Our product and engineering teams have evaluated the issue and responded:
This is WAI (working as intended) and no there is no API to change the order. The rationale is that user saved networks are always preferred to suggested networks when both are free.
sh...@gmail.com <sh...@gmail.com> #12
Is this change is newly introduced in Android 11 ? We don't see this behavior in Android 10, although for android 10 our app is built on SDK 28. Android 11 app is on SDK 30.
Please let us know when was this change introduced, we are trying to find a way to make our app suggested network get connected towards the end of the flow instead of all other networks.
Thanks
ja...@google.com <ja...@google.com> #13
Thank you for the update. We’ve shared this with our product and engineering teams and will continue to provide updates as more information becomes available.
ja...@google.com <ja...@google.com> #14
Thanks again for the feedback! Our product and engineering teams have evaluated the issue and responded:
No API or behavior changes in this area in Android 11. To clarify: are you saying that your app on Android was built with SDK 28 but was using the Suggestion API? The Suggestion API was introduced with Android 10 - SDK 29
sh...@gmail.com <sh...@gmail.com> #15
Got it, behavior is introduced as part of Suggestion API in SDK 29, not specific to android 11.
Is there any way to prioritize APP suggested network, otherwise, it will be not be good user experience for us.
ja...@google.com <ja...@google.com> #16
Thank you for the update. We’ve shared this with our product and engineering teams and will continue to provide updates as more information becomes available.
ja...@google.com <ja...@google.com> #17
Thanks again for the feedback! Our product and engineering teams have evaluated the issue and responded:
There is no way for an app to override user networks. The rationale is to focus on the user experience and prefer the networks which they provisioned. Please provide more information about why in your case prioritizing the app networks will provide the user with better experience?
Note that these tradeoffs are hard and sometimes to avoid the potential for abusive behavior by apps we make these tradeoffs. But we are always interested in hearing about specific use-cases which may help us to make changes in the long term.
sh...@gmail.com <sh...@gmail.com> #18
Sorry or getting back late on this.
Our main intention is to connect to the app suggested network automatically from our app, without user manually connecting to the ssid from the settings page.
Following is the code snippet is for adding the network suggestion, with this the app SSID is not getting connected automatically, instead it is connecting to a different SSID.
final WifiNetworkSuggestion suggestion1 =
new WifiNetworkSuggestion.Builder()
.setSsid(SSID)
.setIsAppInteractionRequired(true)
.setIsHiddenSsid(true)
.setPriority(1000)
.setWpa2EnterpriseConfig(wifientrconfig)
.build();
suggestionsList.add(suggestion1);
Please find the following video link with the issue explanation, we expect to connect to “Classic-8021x” instead its connecting to "RB-24" towards the end of the flow.
It is choosing to connect to "RB-24" even after disabling and enabling the wifi also.
Please let us know if there is anyway to connect to app suggested network automatically always though any API.
Thank you.
ja...@google.com <ja...@google.com> #19
Thanks for the update. We’ve shared this with our product and engineering teams and will continue to provide updates as more information becomes available.
ja...@google.com <ja...@google.com> #20
Thanks again for the feedback! Our product and engineering teams have evaluated the issue and responded:
Apps may not force the device to connect or disconnect to a particular network - that is by design. You mention that once you provision a network it doesn't get connected automatically. The point is that the device will evaluate that network and may connect to it if it believes that it is better than other options, and that there aren't user preferred networks available etc. A high level overview of the decision tree can be found at
https://source.android.com/devices/tech/connect/wifi-network-selection .
Description
In Android 11, App suggested network is generated via APP and available for connection but as long as the saved unmetered network(blizzard) is available, blizzard network is always preferred and chosen to connect over the App Suggested network.
Bug Reproduction:
- Connect blizzard network.
- Used App to create App Suggested Network.
- Created App Suggested network and it is available for connection.
- Observe that, while both blizzard & App suggested networks are available, blizzard is getting preferred and connected first rather than from App suggested network.
We experienced this behavior from Android 11.
Have attached the bug report for the reference.