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
Intents are not type safe #5866
Labels
Comments
@tobiasKaminsky Yes, this is analogous to |
Yes, sound good to me too 👍 |
Merged
This was referenced Jun 13, 2020
ezaquarii
added a commit
that referenced
this issue
Jun 13, 2020
This change addresses #6277 bug in more comprehensible way. All calls to Context.startActivity(...) starthing ContactsPreferenceActivity are replaced with type-safe calls to static ContactsPreferenceActivity.startActivity* sets of APIs. No client code should be calling `Intent(..., ContactsPreferenceActivity.class)` constructor anymore. See #5866 for discussion about the pattern used in this PR. Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
3 tasks
ezaquarii
added a commit
that referenced
this issue
Jun 13, 2020
This change addresses #6277 bug in more comprehensible way. All calls to Context.startActivity(...) starthing ContactsPreferenceActivity are replaced with type-safe calls to static ContactsPreferenceActivity.startActivity* sets of APIs. No client code should be calling `Intent(..., ContactsPreferenceActivity.class)` constructor anymore. See #5866 for discussion about the pattern used in this PR. Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
ezaquarii
added a commit
that referenced
this issue
Jun 13, 2020
This change addresses #6277 bug in more comprehensible way. All calls to Context.startActivity(...) starthing ContactsPreferenceActivity are replaced with type-safe calls to static ContactsPreferenceActivity.startActivity* sets of APIs. No client code should be calling `Intent(..., ContactsPreferenceActivity.class)` constructor anymore. See #5866 for discussion about the pattern used in this PR. Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
ezaquarii
added a commit
that referenced
this issue
Jun 13, 2020
This change addresses #6277 bug in more comprehensible way. All calls to Context.startActivity(...) starthing ContactsPreferenceActivity are replaced with type-safe calls to static ContactsPreferenceActivity.startActivity* sets of APIs. No client code should be calling `Intent(..., ContactsPreferenceActivity.class)` constructor anymore. See #5866 for discussion about the pattern used in this PR. Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As we had this recently: #5857
To prevent this, my idea is to have a static "launch" function in ever needed activity, that handles creating the intent correctly.
In this case it could be:
What do you think? @ezaquarii @AndyScherzinger
The text was updated successfully, but these errors were encountered: