Skip to content

Commit

Permalink
fix #1159
Browse files Browse the repository at this point in the history
  • Loading branch information
pichillilorenzo committed Apr 28, 2022
1 parent ad04812 commit 04b001f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
## 5.4.3+1
## 5.4.3+2

- Fixed "Latest version 5.4.3 crashes on Android" [#1159](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1159)

## 5.4.3+1

- Try to fix "Latest version 5.4.3 crashes on Android" [#1159](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1159)

## 5.4.3

- Added Bitwise OR operator support for `AndroidActionModeMenuItem` class

## 5.4.2+1

- Fixed "Latest version 5.4.2 crashes on Android - HeadlessInAppWebView.dispose" [#1155](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1155)
- Try to fix "Latest version 5.4.2 crashes on Android - HeadlessInAppWebView.dispose" [#1155](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1155)

## 5.4.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ public void dispose() {
channel.setMethodCallHandler(null);
Collection<HeadlessInAppWebView> headlessInAppWebViews = webViews.values();
for (HeadlessInAppWebView headlessInAppWebView : headlessInAppWebViews) {
headlessInAppWebView.dispose();
if (headlessInAppWebView != null) {
headlessInAppWebView.dispose();
}
}
webViews.clear();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class InAppBrowserActivity extends AppCompatActivity implements InAppBrow
public ActionBar actionBar;
public Menu menu;
public SearchView searchView;
public InAppBrowserOptions options;
public InAppBrowserOptions options = new InAppBrowserOptions();
public ProgressBar progressBar;
public boolean isHidden = false;
public String fromActivity;
Expand All @@ -75,7 +75,10 @@ protected void onCreate(Bundle savedInstanceState) {
String managerId = b.getString("managerId");
manager = InAppBrowserManager.shared.get(managerId);
if (manager == null || manager.plugin == null|| manager.plugin.messenger == null) return;


Map<String, Object> optionsMap = (Map<String, Object>) b.getSerializable("options");
options.parse(optionsMap);

windowId = b.getInt("windowId");

channel = new MethodChannel(manager.plugin.messenger, "com.pichillilorenzo/flutter_inappbrowser_" + id);
Expand All @@ -102,13 +105,9 @@ protected void onCreate(Bundle savedInstanceState) {

fromActivity = b.getString("fromActivity");

Map<String, Object> optionsMap = (Map<String, Object>) b.getSerializable("options");
Map<String, Object> contextMenu = (Map<String, Object>) b.getSerializable("contextMenu");
List<Map<String, Object>> initialUserScripts = (List<Map<String, Object>>) b.getSerializable("initialUserScripts");

options = new InAppBrowserOptions();
options.parse(optionsMap);

InAppWebViewOptions webViewOptions = new InAppWebViewOptions();
webViewOptions.parse(optionsMap);
webView.options = webViewOptions;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_inappwebview
description: A Flutter plugin that allows you to add an inline webview, to use an headless webview, and to open an in-app browser window.
version: 5.4.3+1
version: 5.4.3+2
homepage: https://github.com/pichillilorenzo/flutter_inappwebview

environment:
Expand Down

0 comments on commit 04b001f

Please sign in to comment.