Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
permission_handler
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songyanzhi
permission_handler
Commits
46d1f09c
Commit
46d1f09c
authored
Mar 16, 2020
by
Sebastian Roth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Instantiate HashMap for "ignoreBatteryOptimizations" correctly
parent
4b16c483
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
permission_handler/android/src/main/java/com/baseflow/permissionhandler/PermissionManager.java
+3
-1
permission_handler/example/android/app/src/main/AndroidManifest.xml
+3
-0
No files found.
permission_handler/android/src/main/java/com/baseflow/permissionhandler/PermissionManager.java
View file @
46d1f09c
...
@@ -241,7 +241,9 @@ final class PermissionManager {
...
@@ -241,7 +241,9 @@ final class PermissionManager {
?
PermissionConstants
.
PERMISSION_STATUS_GRANTED
?
PermissionConstants
.
PERMISSION_STATUS_GRANTED
:
PermissionConstants
.
PERMISSION_STATUS_DENIED
;
:
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
;
return
true
;
}
}
}
}
...
...
permission_handler/example/android/app/src/main/AndroidManifest.xml
View file @
46d1f09c
...
@@ -57,6 +57,9 @@
...
@@ -57,6 +57,9 @@
<!-- Permissions options for the `activityRecognition` group -->
<!-- Permissions options for the `activityRecognition` group -->
<uses-permission
android:name=
"android.permission.ACTIVITY_RECOGNITION"
/>
<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
<application
android:name=
"io.flutter.app.FlutterApplication"
android:name=
"io.flutter.app.FlutterApplication"
android:icon=
"@mipmap/ic_launcher"
android:icon=
"@mipmap/ic_launcher"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment