Skip to content

Commit

Permalink
Merge branch 'fix/multiple_isolates' into minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanheise committed Feb 7, 2022
2 parents e9d0997 + 3d35898 commit e0bd3f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions audio_service/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 0.18.4

* Fix Android FlutterJNI error after quick relaunch.
* Fix Android NPE when destroying additional FlutterEngines.

## 0.18.3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ public static synchronized void disposeFlutterEngine() {
private static final String CHANNEL_CLIENT = "com.ryanheise.audio_service.client.methods";
private static final String CHANNEL_HANDLER = "com.ryanheise.audio_service.handler.methods";

private static Context applicationContext;
private static final Set<ClientInterface> clientInterfaces = new HashSet<>();
private static ClientInterface mainClientInterface;
private static AudioHandlerInterface audioHandlerInterface;
Expand Down Expand Up @@ -189,6 +188,7 @@ static AudioHandlerInterface audioHandlerInterface() throws Exception {
// INSTANCE FIELDS AND METHODS
//

private Context applicationContext;
private FlutterPluginBinding flutterPluginBinding;
private ActivityPluginBinding activityPluginBinding;
private NewIntentListener newIntentListener;
Expand Down Expand Up @@ -270,7 +270,9 @@ public void onDetachedFromEngine(FlutterPluginBinding binding) {
clientInterface.setContext(null);
clientInterface = null;
applicationContext = null;
if (audioHandlerInterface != null) {
if (audioHandlerInterface != null
&& audioHandlerInterface.messenger == flutterPluginBinding.getBinaryMessenger()) {
System.out.println("### destroying audio handler interface");
audioHandlerInterface.destroy();
audioHandlerInterface = null;
}
Expand Down

0 comments on commit e0bd3f1

Please sign in to comment.