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

Nullable context reference when restoring application inside Base class #10

Open
maxim-petlyuk opened this issue Sep 23, 2021 · 0 comments

Comments

@maxim-petlyuk
Copy link

public class AwesomeWebView {
...
public Builder(@NonNull Context context) {
            this.context = context;
            Base.initialize(context);
}
...
}

There is a call to initialize context inside AndroidBaseUtils library before opening WebView screen.
Imagine you hold the application when you are on WebView and android kills the process.
After some time you are opening the app from recents, android system try to restore application, but of course no one call to init context again, reference is null and the app will crash during next attempt to get context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant