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

Release PluginBinding instance when activity is detached. #1264

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions permission_handler_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 12.0.2

* Fixes bug where Android activity is leaked when embedded in native Android application.

## 12.0.1

* Fixes a bug where the `ignoreBatteryOptimizations` permission didn't report the correct status when the permission is requested and granted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void onAttachedToActivity(@NonNull ActivityPluginBinding binding) {
binding.getActivity()
);

this.pluginBinding = binding;
pluginBinding = binding;
registerListeners();
}

Expand All @@ -87,8 +87,8 @@ public void onReattachedToActivityForConfigChanges(@NonNull ActivityPluginBindin
@Override
public void onDetachedFromActivity() {
stopListeningToActivity();

deregisterListeners();
pluginBinding = null;
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion permission_handler_android/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: permission_handler_android
description: Permission plugin for Flutter. This plugin provides the Android API to request and check permissions.
homepage: https://github.com/baseflow/flutter-permission-handler
version: 12.0.1
version: 12.0.2

environment:
sdk: ">=2.15.0 <4.0.0"
Expand Down