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

fix: leaking UI context GetE2EICertificateUseCase (WPB-6648) #2717

Conversation

AndroidBob
Copy link
Collaborator

@AndroidBob AndroidBob commented Feb 16, 2024

BugWPB-6648 [Android] GetE2EICertificateUseCase is leaking UI context

Cherry pick from the original PR:


⚠️ Conflicts during cherry-pick:
kalium


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

Leaking Context from

Causes (Optional)

Context was being passed from UI

Solutions

Inject on ViewModel that is calling

@AndroidBob AndroidBob added the cherry-pick PR is cherry-picking changes from another banch label Feb 16, 2024
@alexandreferris alexandreferris requested review from a team, typfel, yamilmedina, Garzas, ohassine and saleniuk and removed request for a team February 16, 2024 11:35
Copy link

codecov bot commented Feb 16, 2024

Codecov Report

Attention: 24 lines in your changes are missing coverage. Please review.

Comparison is base (ca11930) 42.87% compared to head (203563a) 43.01%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2717      +/-   ##
===========================================
+ Coverage    42.87%   43.01%   +0.13%     
===========================================
  Files          408      408              
  Lines        13524    13529       +5     
  Branches      2392     2392              
===========================================
+ Hits          5799     5819      +20     
+ Misses        7047     7025      -22     
- Partials       678      685       +7     
Files Coverage Δ
...rc/main/kotlin/com/wire/android/ui/WireActivity.kt 0.00% <ø> (ø)
...roid/ui/settings/devices/DeviceDetailsViewModel.kt 59.82% <100.00%> (ø)
...tlin/com/wire/android/ui/debug/DebugDataOptions.kt 0.00% <0.00%> (ø)
...droid/ui/e2eiEnrollment/E2EIEnrollmentViewModel.kt 0.00% <0.00%> (ø)
.../android/feature/e2ei/GetE2EICertificateUseCase.kt 0.00% <0.00%> (ø)
...d/ui/home/sync/FeatureFlagNotificationViewModel.kt 53.54% <5.00%> (-0.76%) ⬇️

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca11930...203563a. Read the comment docs.

Copy link
Contributor

Test Results

819 tests  ±0   819 ✅ ±0   12m 52s ⏱️ + 1m 8s
114 suites ±0     0 💤 ±0 
114 files   ±0     0 ❌ ±0 

Results for commit 203563a. ± Comparison against base commit ca11930.

Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator Author

Build 3179 succeeded.

The build produced the following APK's:

@alexandreferris alexandreferris added this pull request to the merge queue Feb 17, 2024
Merged via the queue into develop with commit a0fdb2e Feb 17, 2024
15 checks passed
@alexandreferris alexandreferris deleted the fix/leaking_ui_context_gete2eicertificateusecase-cherry-pick branch February 17, 2024 13:50
@alexandreferris alexandreferris restored the fix/leaking_ui_context_gete2eicertificateusecase-cherry-pick branch February 29, 2024 11:19
@alexandreferris alexandreferris deleted the fix/leaking_ui_context_gete2eicertificateusecase-cherry-pick branch February 29, 2024 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick PR is cherry-picking changes from another banch size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants