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

Migrate ContactsPreferenceActivity startup to type-safe API #6289

Conversation

ezaquarii
Copy link
Collaborator

@ezaquarii ezaquarii commented 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

  • Manual test only: follow Nextcloud App crash on clicking .vcf #6277 bug reproduction scenario
  • Fix ContactsBackupFragment us of sidebar extra - default values are different
  • Move ContactsBackupFragment to type-safe API as well

@nextcloud-android-bot
Copy link
Collaborator

@ezaquarii ezaquarii force-pushed the ezaquarii/migrate-contacts-preference-activity-startup-to-type-safe-api branch from a623761 to 10e31ac Compare June 13, 2020 13:23
@nextcloud-android-bot
Copy link
Collaborator

@ezaquarii ezaquarii force-pushed the ezaquarii/migrate-contacts-preference-activity-startup-to-type-safe-api branch from 10e31ac to a9f0ed5 Compare June 13, 2020 16:41
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 ezaquarii force-pushed the ezaquarii/migrate-contacts-preference-activity-startup-to-type-safe-api branch from a9f0ed5 to 3e3d80d Compare June 13, 2020 16:42
@nextcloud-android-bot
Copy link
Collaborator

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/14471.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@nextcloud-android-bot
Copy link
Collaborator

stable-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

@nextcloud-android-bot
Copy link
Collaborator

@nextcloud-android-bot
Copy link
Collaborator

@nextcloud-android-bot
Copy link
Collaborator

@nextcloud-android-bot
Copy link
Collaborator

1 similar comment
@nextcloud-android-bot
Copy link
Collaborator

@nextcloud-android-bot
Copy link
Collaborator

Codacy

393

Lint

TypemasterPR
Warnings9595
Errors00

SpotBugs (new)

Warning TypeNumber
Bad practice Warnings27
Correctness Warnings64
Internationalization Warnings9
Malicious code vulnerability Warnings4
Multithreaded correctness Warnings9
Performance Warnings75
Security Warnings44
Dodgy code Warnings141
Total373

SpotBugs (master)

Warning TypeNumber
Bad practice Warnings27
Correctness Warnings64
Internationalization Warnings9
Malicious code vulnerability Warnings4
Multithreaded correctness Warnings9
Performance Warnings75
Security Warnings44
Dodgy code Warnings141
Total373

@AndyScherzinger
Copy link
Member

Works fine for me and code looks good too 👍

@tobiasKaminsky why do we launch the contact backup screen when clicking on a vcf file? (out of scope for this PR!)

@tobiasKaminsky tobiasKaminsky merged commit 1b1a58e into master Jun 18, 2020
@delete-merged-branch delete-merged-branch bot deleted the ezaquarii/migrate-contacts-preference-activity-startup-to-type-safe-api branch June 18, 2020 05:04
@AndyScherzinger AndyScherzinger added this to the Nextcloud App 3.13.0 milestone Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants