Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android Connectivity] Set app package on Intent used to invoke context receiver for network callback #20651

Merged
merged 2 commits into from
Feb 17, 2024

Conversation

Redth
Copy link
Member

@Redth Redth commented Feb 16, 2024

Description of Change

Android 14.0 brings in more changes for scoping invocations of broadcast receivers. This changes to no longer export the 'internal' broadcast receiver we use for Essentials Connectivity API's (since we're the only ones expected to send broadcasts to it) and instead sets the package name of intent we broadcast to comply with OS changes and make this broadcast continue to work.

Issues Fixed

Better fix for #17861

@Redth Redth requested a review from a team as a code owner February 16, 2024 16:20
@mattleibow
Copy link
Member

/rebase

We are the only ones invoking these, so there's no need to export.  The export made things 'work' on android 14 because of changes to that api level, but that wasn't the most correct fix.
With changes in android 14, we need to scope the connectivity intent we use to trigger our own internal broadcast receiver to the current app package (which we get from the application context).
@github-actions github-actions bot force-pushed the dev/redth/broadcast-receiver-context branch from 0400a8f to 94d42d2 Compare February 16, 2024 19:53
@PureWeen
Copy link
Member

Failing tests unrelated

@PureWeen PureWeen merged commit 7773f90 into main Feb 17, 2024
40 of 47 checks passed
@PureWeen PureWeen deleted the dev/redth/broadcast-receiver-context branch February 17, 2024 17:18
rmarinho pushed a commit that referenced this pull request Feb 22, 2024
…xt receiver for network callback (#20651)

* No need to export app specific broadcast receivers

We are the only ones invoking these, so there's no need to export.  The export made things 'work' on android 14 because of changes to that api level, but that wasn't the most correct fix.

* Set package on connectivity intent

With changes in android 14, we need to scope the connectivity intent we use to trigger our own internal broadcast receiver to the current app package (which we get from the application context).
rmarinho pushed a commit that referenced this pull request Feb 27, 2024
…xt receiver for network callback (#20651)

* No need to export app specific broadcast receivers

We are the only ones invoking these, so there's no need to export.  The export made things 'work' on android 14 because of changes to that api level, but that wasn't the most correct fix.

* Set package on connectivity intent

With changes in android 14, we need to scope the connectivity intent we use to trigger our own internal broadcast receiver to the current app package (which we get from the application context).
@gabsamples6
Copy link

gabsamples6 commented Mar 15, 2024

Just to say that ConnectivityChanged on android 14 on Maui 8.0.10 does not fire when you toggle on/off wifi or airplane mode

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants