Fix liblinphone_tester grants permissions to all apk
This commit is contained in:
parent
c1a199cb41
commit
3a08679074
2 changed files with 6 additions and 1 deletions
|
@ -4,6 +4,7 @@ all: copy-files
|
|||
|
||||
run-all-tests: copy-files
|
||||
../gradlew :installDebugAndroidTest && \
|
||||
../gradlew :installDebug && \
|
||||
../gradlew :grantDebugPermissions -i && \
|
||||
../gradlew :connectedAndroidTest -i \
|
||||
|
||||
|
|
|
@ -88,7 +88,8 @@ android {
|
|||
|
||||
// Grant permissions
|
||||
android.applicationVariants.all { variant ->
|
||||
def applicationId = "${getPackageName()}.test"
|
||||
def applicationId = getPackageName()
|
||||
def applicationIdtest = "${getPackageName()}.test"
|
||||
def adb = android.getAdbExe().toString()
|
||||
def variantName = variant.name.capitalize()
|
||||
def grantPermissionTask = tasks.create("grant${variantName}Permissions") << {
|
||||
|
@ -99,6 +100,9 @@ android.applicationVariants.all { variant ->
|
|||
"${adb} shell pm grant ${applicationId} android.permission.RECORD_AUDIO".execute()
|
||||
"${adb} shell pm grant ${applicationId} android.permission.WRITE_EXTERNAL_STORAGE".execute()
|
||||
"${adb} shell pm grant ${applicationId} android.permission.CAMERA".execute()
|
||||
"${adb} shell pm grant ${applicationIdtest} android.permission.RECORD_AUDIO".execute()
|
||||
"${adb} shell pm grant ${applicationIdtest} android.permission.WRITE_EXTERNAL_STORAGE".execute()
|
||||
"${adb} shell pm grant ${applicationIdtest} android.permission.CAMERA".execute()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue