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 CreateViewsContainer getting Application Context from Top Activity #4556

Merged
merged 4 commits into from
Jan 20, 2023

Conversation

Cheesebaron
Copy link
Member

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Bugfix

⤵️ What is the current behavior?

MvxAndroidSetup uses _currentTopActivity.Activity.Context as ApplicationContext. This doesn't work if an App doesn't have any Activities.

🆕 What is the new behavior (if this is a feature change)?

Now using Application.Context instead.

Also removed sealed keyword on CreateViewsContainer preventing someone from overriding the behavior

💥 Does this PR introduce a breaking change?

Nope

🐛 Recommendations for testing

📝 Links to relevant issues/docs

Fixes #4555

🤔 Checklist before submitting

@Cheesebaron Cheesebaron added t/bug Bug type p/android Android platform labels Jan 20, 2023
@Cheesebaron Cheesebaron merged commit e409fb7 into develop Jan 20, 2023
@Cheesebaron Cheesebaron deleted the bugfix/gh-4555-applicationcontext-android branch January 20, 2023 14:12
@sonarcloud
Copy link

sonarcloud bot commented Jan 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p/android Android platform t/bug Bug type
Development

Successfully merging this pull request may close these issues.

Android ListenableWorker MvxSetupSingleton.EnsureInitialized() crashes with InvalidOperationException
1 participant