AwesomeWebView-Android icon indicating copy to clipboard operation
AwesomeWebView-Android copied to clipboard

Nullable context reference when restoring application inside Base class

Open maxim-petlyuk opened this issue 3 years ago • 0 comments

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.

maxim-petlyuk avatar Sep 23 '21 13:09 maxim-petlyuk