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

Add TargetApi annotation in PermissionUtils.java for Android #1122

Merged
merged 11 commits into from
Aug 16, 2024
5 changes: 4 additions & 1 deletion permission_handler_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 12.0.11

* Adds `TargetApi` annotation to `getManifestNames` method in `PermissionUtils.java`.

## 12.0.10

* Fixes a bug that causes a `NullPointerException` when the application is restarted after being killed by Android during the request of special permissions (like, `Permission.ignoreBatteryOptimizations`, `Permission.systemAlertWindow`, `Permission.accessNotificationPolicy`, `Permission.scheduleExactAlarm` and `Permission.manageExternalStorage`).
Expand All @@ -18,7 +22,6 @@

* Removes deprecated support for Android V1 embedding as support will be removed from Flutter (see [flutter/flutter#144726](https://github.com/flutter/flutter/pull/144726)).


## 12.0.5

* Upgrades Gradle and Android Gradle plugin.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.baseflow.permissionhandler;

import android.Manifest;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
Expand Down Expand Up @@ -99,6 +100,7 @@ static int parseManifestName(String permission) {
}
}

@TargetApi(22)
static List<String> getManifestNames(Context context, @PermissionConstants.PermissionGroup int permission) {
final ArrayList<String> permissionNames = new ArrayList<>();

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.10
version: 12.0.11

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