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
5c9e87cc
Commit
5c9e87cc
authored
Mar 12, 2021
by
Maurits van Beusekom
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of github.com:Baseflow/flutter-permission-handler into develop
parents
afa833c3
f92b263e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletions
+16
-1
permission_handler/android/src/main/java/com/baseflow/permissionhandler/PermissionManager.java
+16
-1
No files found.
permission_handler/android/src/main/java/com/baseflow/permissionhandler/PermissionManager.java
View file @
5c9e87cc
...
@@ -104,7 +104,13 @@ final class PermissionManager {
...
@@ -104,7 +104,13 @@ final class PermissionManager {
// if we can't add as unknown and continue
// if we can't add as unknown and continue
if
(
names
==
null
||
names
.
isEmpty
())
{
if
(
names
==
null
||
names
.
isEmpty
())
{
if
(!
requestResults
.
containsKey
(
permission
))
{
if
(!
requestResults
.
containsKey
(
permission
))
{
requestResults
.
put
(
permission
,
PermissionConstants
.
PERMISSION_STATUS_DENIED
);
// On Android below M, the android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS flag in AndroidManifest.xml
// may be ignored and not visible to the App as it's a new permission setting as a whole.
if
(
permission
==
PermissionConstants
.
PERMISSION_GROUP_IGNORE_BATTERY_OPTIMIZATIONS
&&
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
M
)
{
requestResults
.
put
(
permission
,
PermissionConstants
.
PERMISSION_STATUS_RESTRICTED
);
}
else
{
requestResults
.
put
(
permission
,
PermissionConstants
.
PERMISSION_STATUS_DENIED
);
}
}
}
continue
;
continue
;
...
@@ -172,6 +178,15 @@ final class PermissionManager {
...
@@ -172,6 +178,15 @@ final class PermissionManager {
//if no permissions were found then there is an issue and permission is not set in Android manifest
//if no permissions were found then there is an issue and permission is not set in Android manifest
if
(
names
.
size
()
==
0
)
{
if
(
names
.
size
()
==
0
)
{
Log
.
d
(
PermissionConstants
.
LOG_TAG
,
"No permissions found in manifest for: "
+
permission
);
Log
.
d
(
PermissionConstants
.
LOG_TAG
,
"No permissions found in manifest for: "
+
permission
);
// On Android below M, the android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS flag in AndroidManifest.xml
// may be ignored and not visible to the App as it's a new permission setting as a whole.
if
(
permission
==
PermissionConstants
.
PERMISSION_GROUP_IGNORE_BATTERY_OPTIMIZATIONS
)
{
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
M
)
{
return
PermissionConstants
.
PERMISSION_STATUS_RESTRICTED
;
}
}
return
PermissionConstants
.
PERMISSION_STATUS_DENIED
;
return
PermissionConstants
.
PERMISSION_STATUS_DENIED
;
}
}
...
...
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