Skip to content

Add BIND_ALLOW_ACTIVITY_STARTS to BindServiceFlags. #10008

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

Merged
merged 1 commit into from
Apr 11, 2023
Merged

Conversation

jpd236
Copy link
Contributor

@jpd236 jpd236 commented Apr 4, 2023

This flag is added in the U SDK, which is still under development. Since it's just a numeric constant, we copy the value until it is stable and mark the API is experimental, with appropriate warnings about depending on it from production code.

A follow-up change will be made after SDK finalization to point to the official constant (or otherwise update to match any SDK changes), at which point we can remove the @ExternalApi annotation.

See b/274061424

This flag is added in the U SDK, which is still under development. Since it's just a numeric constant, we copy the value until it is stable and mark the API is experimental, with appropriate warnings about depending on it from production code.

A follow-up change will be made after SDK finalization to point to the official constant (or otherwise update to match any SDK changes), at which point we can remove the `@ExternalApi` annotation.

See b/274061424
@ExperimentalApi("To be finalized after Android U SDK finalization")
public Builder setAllowActivityStarts(boolean newValue) {
// https://developer.android.com/reference/android/content/Context#BIND_ALLOW_ACTIVITY_STARTS
return setFlag(0x200, newValue);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Define a package visible constant for this? (Since it's used in the test as well).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was leaning against this because when the TODO is resolved, we would directly use the SDK constant everywhere, rather than just updating the package-visible constant. So this felt closer to the final version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm.

@markb74 markb74 requested a review from ejona86 April 11, 2023 09:43
@markb74 markb74 added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Apr 11, 2023
@grpc-kokoro grpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Apr 11, 2023
@markb74 markb74 merged commit 1c6a741 into grpc:master Apr 11, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants