提交 1caa0a8c 编写于 作者: 杜庆泉's avatar 杜庆泉

修复示例中错误的 utsarray 用法

上级 aa692ccb
......@@ -119,7 +119,7 @@ export function gotoSystemPermissionActivityTest() {
*/
export function gotoCameraTake(imageDone : (event : string) => void) : boolean {
let permissionNeed = utsArrayOf("android.permission.CAMERA")
let permissionNeed = ["android.permission.CAMERA"]
UTSAndroid.requestSystemPermission(UTSAndroid.getUniActivity()!, permissionNeed, function (allRight : boolean, _grantedList : string[]) {
if (allRight) {
......@@ -282,7 +282,7 @@ export function arrayPermissionFlowTest(callback : (ret : boolean, desc : string
/**
* 同时申请日历和联系人权限
*/
let permissionNeed = utsArrayOf("android.permission.WRITE_EXTERNAL_STORAGE", "android.permission.ACCESS_FINE_LOCATION", "android.permission.READ_PHONE_STATE")
let permissionNeed = ["android.permission.WRITE_EXTERNAL_STORAGE", "android.permission.ACCESS_FINE_LOCATION", "android.permission.READ_PHONE_STATE"]
if (UTSAndroid.getSystemPermissionDenied(UTSAndroid.getUniActivity()!, permissionNeed).isEmpty()) {
callback(false, "已具备请求权限")
......@@ -429,7 +429,7 @@ export function singlePermissionFlowTest(callback : (ret : boolean, desc : strin
return
}
let permissionNeed = utsArrayOf("android.permission.READ_PHONE_STATE")
let permissionNeed = ["android.permission.READ_PHONE_STATE"]
if (UTSAndroid.getSystemPermissionDenied(UTSAndroid.getUniActivity()!, permissionNeed).isEmpty()) {
callback(false, "已具备权限")
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册