mirror of
https://gitlab.com/Nanolx/NanoDroid
synced 2024-10-31 09:20:23 +00:00
Merge branch 'master' into 'master'
npem: fix permissions not being granted See merge request Nanolx/NanoDroid!40
This commit is contained in:
commit
08a9f21157
@ -38,7 +38,10 @@ check_package () {
|
||||
}
|
||||
|
||||
check_permission () {
|
||||
[[ $(dumpsys package ${1} | grep -Eo "^[ ]+${2}: granted=false") ]] && return 1 || return 0
|
||||
perm="$(dumpsys package ${1} | grep "^ *${2}: granted=")"
|
||||
echo "$perm" | grep -q "granted=false" && return 1
|
||||
echo "$perm" | grep -q "granted=true" && return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
grant_permission () {
|
||||
|
Loading…
Reference in New Issue
Block a user