Commit b3013235 by Maurits van Beusekom Committed by GitHub

Ensure checking permissions on pre M works correctly. (#684)

parent aa9d490d
## 8.2.1
* Resolved an issue where checking permissions on pre Android M devices always resolved to `PermissionStatus.denied` (see issue [#60](https://github.com/Baseflow/flutter-permission-plugins/issues/60));
* Updated the url_launcher dependency in the example App to `^6.0.12`.
## 8.2.0
* Added support for the new Android 12 Bluetooth permissions: BLUETOOTH_SCAN, BLUETOOTH_ADVERTISE and BLUETOOTH_CONNECT.
......
......@@ -338,7 +338,9 @@ final class PermissionManager implements PluginRegistry.ActivityResultListener,
}
}
return PermissionConstants.PERMISSION_STATUS_DENIED;
return Build.VERSION.SDK_INT < Build.VERSION_CODES.M
? PermissionConstants.PERMISSION_STATUS_GRANTED
: PermissionConstants.PERMISSION_STATUS_DENIED;
}
final boolean targetsMOrHigher = context.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.M;
......
......@@ -19,7 +19,7 @@ dev_dependencies:
permission_handler:
path: ../
url_launcher: ^6.0.0
url_launcher: ^6.0.12
flutter:
uses-material-design: true
......
name: permission_handler
description: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
version: 8.2.0
version: 8.2.1
homepage: https://github.com/baseflowit/flutter-permission-handler
flutter:
......
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