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
dfed5d21
Unverified
Commit
dfed5d21
authored
Jul 20, 2023
by
Maurits van Beusekom
Committed by
GitHub
Jul 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moves Java compile arguments (#1112)
* Moves Java compile arguments * Fix fallthrough warnings
parent
0b87253a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
12 deletions
+22
-12
permission_handler_android/CHANGELOG.md
+4
-0
permission_handler_android/android/build.gradle
+0
-5
permission_handler_android/android/src/main/java/com/baseflow/permissionhandler/PermissionUtils.java
+5
-6
permission_handler_android/example/android/build.gradle
+12
-0
permission_handler_android/pubspec.yaml
+1
-1
No files found.
permission_handler_android/CHANGELOG.md
View file @
dfed5d21
## 10.3.3
*
Migrates the Gradle compile arguments to the example app, so they are not enforced upon consumers of the plugin.
## 10.3.2
*
Updates example app to show
`Permission.photos`
and hide
`Permission.bluetooth`
.
...
...
permission_handler_android/android/build.gradle
View file @
dfed5d21
group
'com.baseflow.permissionhandler'
version
'1.0'
def
args
=
[
"-Xlint:deprecation"
,
"-Xlint:unchecked"
,
"-Werror"
]
buildscript
{
repositories
{
...
...
@@ -20,10 +19,6 @@ rootProject.allprojects {
}
}
project
.
getTasks
().
withType
(
JavaCompile
){
options
.
compilerArgs
.
addAll
(
args
)
}
apply
plugin:
'com.android.library'
android
{
...
...
permission_handler_android/android/src/main/java/com/baseflow/permissionhandler/PermissionUtils.java
View file @
dfed5d21
...
...
@@ -122,25 +122,24 @@ public class PermissionUtils {
break
;
case
PermissionConstants
.
PERMISSION_GROUP_LOCATION_ALWAYS
:
case
PermissionConstants
.
PERMISSION_GROUP_LOCATION_WHEN_IN_USE
:
case
PermissionConstants
.
PERMISSION_GROUP_LOCATION
:
// Note that the LOCATION_ALWAYS will deliberately fallthrough to the LOCATION
// case on pre Android Q devices. The ACCESS_BACKGROUND_LOCATION permission was only
// introduced in Android Q, before it should be treated as the ACCESS_COARSE_LOCATION or
// ACCESS_FINE_LOCATION.
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
Q
)
{
if
(
permission
==
PermissionConstants
.
PERMISSION_GROUP_LOCATION_ALWAYS
&&
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
Q
)
{
if
(
hasPermissionInManifest
(
context
,
permissionNames
,
Manifest
.
permission
.
ACCESS_BACKGROUND_LOCATION
))
permissionNames
.
add
(
Manifest
.
permission
.
ACCESS_BACKGROUND_LOCATION
);
break
;
}
case
PermissionConstants
.
PERMISSION_GROUP_LOCATION_WHEN_IN_USE
:
case
PermissionConstants
.
PERMISSION_GROUP_LOCATION
:
if
(
hasPermissionInManifest
(
context
,
permissionNames
,
Manifest
.
permission
.
ACCESS_COARSE_LOCATION
))
permissionNames
.
add
(
Manifest
.
permission
.
ACCESS_COARSE_LOCATION
);
if
(
hasPermissionInManifest
(
context
,
permissionNames
,
Manifest
.
permission
.
ACCESS_FINE_LOCATION
))
permissionNames
.
add
(
Manifest
.
permission
.
ACCESS_FINE_LOCATION
);
break
;
case
PermissionConstants
.
PERMISSION_GROUP_SPEECH
:
case
PermissionConstants
.
PERMISSION_GROUP_MICROPHONE
:
if
(
hasPermissionInManifest
(
context
,
permissionNames
,
Manifest
.
permission
.
RECORD_AUDIO
))
...
...
@@ -191,7 +190,7 @@ public class PermissionUtils {
permissionNames
.
add
(
Manifest
.
permission
.
BODY_SENSORS_BACKGROUND
);
}
}
break
;
case
PermissionConstants
.
PERMISSION_GROUP_SMS
:
if
(
hasPermissionInManifest
(
context
,
permissionNames
,
Manifest
.
permission
.
SEND_SMS
))
permissionNames
.
add
(
Manifest
.
permission
.
SEND_SMS
);
...
...
permission_handler_android/example/android/build.gradle
View file @
dfed5d21
...
...
@@ -25,3 +25,15 @@ subprojects {
tasks
.
register
(
"clean"
,
Delete
)
{
delete
rootProject
.
buildDir
}
// Build the plugin project with warnings enabled. This is here rather than
// in the plugin itself to avoid breaking clients that have different
// warnings (e.g., deprecation warnings from a newer SDK than this project
// builds with).
gradle
.
projectsEvaluated
{
project
(
":permission_handler_android"
)
{
tasks
.
withType
(
JavaCompile
)
{
options
.
compilerArgs
<<
"-Xlint:all"
<<
"-Werror"
}
}
}
permission_handler_android/pubspec.yaml
View file @
dfed5d21
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
:
10.3.
2
version
:
10.3.
3
environment
:
sdk
:
"
>=2.15.0
<4.0.0"
...
...
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