Commit 4026813d by 飞龙 Committed by GitHub

Reply already submitted in Android 13 while user request permissions (#1147)

* Reply already submitted in Android 13 while user request permissions(eg.
post_notification, locations)

* Update permission_handler_android/android/src/main/java/com/baseflow/permissionhandler/PermissionManager.java

Co-authored-by: Jeroen Weener <JeroenWeener@users.noreply.github.com>

---------

Co-authored-by: Jeroen Weener <JeroenWeener@users.noreply.github.com>
parent d8882f1f
## 11.0.1
* Fixes `java.lang.IllegalStateException: Reply already submitted` when requesting post notification permission.
## 11.0.0
* **BREAKING CHANGE:** Fixes a bug where the permission status would return 'denied' regardless of whether the status was 'denied' or 'permanently denied'.
......
......@@ -161,6 +161,11 @@ final class PermissionManager implements PluginRegistry.ActivityResultListener,
return false;
}
if (permissions.length == 0 && grantResults.length == 0) {
Log.w(PermissionConstants.LOG_TAG, "onRequestPermissionsResult is called without results. This is probably caused by interfering request codes. If you see this error, please file an issue in flutter-permission-handler, including a list of plugins used by this application: https://github.com/Baseflow/flutter-permission-handler/issues");
return false;
}
for (int i = 0; i < permissions.length; i++) {
final String permissionName = permissions[i];
......
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: 11.0.0
version: 11.0.1
environment:
sdk: ">=2.15.0 <4.0.0"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment