Commit 9b12a9f8 by Maurits van Beusekom

Release version 4.4.0+hotfix.2

parents c679edfc fa15fa25
## 4.4.0+hotfix.2
* Issue #235: Solved a bug which made it impossible to request service status on Android 7;
* Issue #237: Solved a bug which crashes the application when cancelling the "Ignore battery optimizations" request for permissions.
## 4.4.0+hotfix.1
* Issue #233: Solved a bug that prevented Android applications running in the background to check the permission status.
......
......@@ -17,7 +17,7 @@ To use this plugin, add `permission_handler` as a [dependency in your pubspec.ya
```yaml
dependencies:
permission_handler: '^4.4.0+hotfix.1'
permission_handler: '^4.4.0+hotfix.2'
```
> **NOTE:** As of version 3.1.0 the permission_handler plugin switched to the AndroidX version of the Android Support Libraries. This means you need to make sure your Android project is also upgraded to support AndroidX. Detailed instructions can be found [here](https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility).
......
......@@ -241,7 +241,9 @@ final class PermissionManager {
? PermissionConstants.PERMISSION_STATUS_GRANTED
: PermissionConstants.PERMISSION_STATUS_DENIED;
callback.onResult(new HashMap<>(PermissionConstants.PERMISSION_GROUP_IGNORE_BATTERY_OPTIMIZATIONS, status));
HashMap<Integer, Integer> results = new HashMap<>();
results.put(PermissionConstants.PERMISSION_GROUP_IGNORE_BATTERY_OPTIMIZATIONS, status);
callback.onResult(results);
return true;
}
}
......
......@@ -80,7 +80,7 @@ final class ServiceManager {
return locationManager.isLocationEnabled();
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
return isLocationServiceEnablePrePie(context);
return isLocationServiceEnabledKitKat(context);
} else {
return isLocationServiceEnablePreKitKat(context);
}
......@@ -89,10 +89,11 @@ final class ServiceManager {
// Suppress deprecation warnings since it's purpose is to support to be backwards compatible with
// pre Pie versions of Android.
@SuppressWarnings("deprecation")
private static boolean isLocationServiceEnablePrePie(Context context)
private static boolean isLocationServiceEnabledKitKat(Context context)
{
if (VERSION.SDK_INT < VERSION_CODES.P)
if (Build.VERSION.SDK_INT < VERSION_CODES.KITKAT) {
return false;
}
final int locationMode;
......
......@@ -57,6 +57,9 @@
<!-- Permissions options for the `activityRecognition` group -->
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
<!-- Permissions options for the `ignoreBatteryOptimizations` group -->
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<application
android:name="io.flutter.app.FlutterApplication"
android:icon="@mipmap/ic_launcher"
......
......@@ -3,7 +3,7 @@
#
Pod::Spec.new do |s|
s.name = 'permission_handler'
s.version = '4.4.0+hotfix.1'
s.version = '4.4.0+hotfix.2'
s.summary = 'Permission plugin for Flutter.'
s.description = <<-DESC
Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
......
name: permission_handler
description: Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
version: 4.4.0+hotfix.1
version: 4.4.0+hotfix.2
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