Skip to content

Commit 99b5d75

Browse files
xaionaro@dx.centerxaionaro@dx.center
authored andcommitted
docs: use jni permission constant instead of magic string in llms.txt
1 parent 05a8422 commit 99b5d75

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

llms.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -911,11 +911,14 @@ log.Printf("screen: %dx%d dp", cfg.ScreenWidthDp(), cfg.ScreenHeightDp())
911911
## Permission
912912

913913
```go
914-
import "github.com/AndroidGoLab/ndk/permission"
914+
import (
915+
"github.com/AndroidGoLab/ndk/permission"
916+
jperm "github.com/xaionaro-go/jni/content/permission"
917+
)
915918

916919
// APermissionManager_checkPermission only checks — doesn't request
917920
var result int32
918-
permission.CheckPermission("android.permission.CAMERA", pid, uid, &result)
921+
permission.CheckPermission(jperm.Camera, pid, uid, &result)
919922
// result: 0 = granted, -1 = denied
920923
// For requesting permissions at runtime, use the companion jni package.
921924
```

0 commit comments

Comments
 (0)