We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.1.4
电脑版本:
Windows 10 专业版
手机型号:
雷电模拟器9.0.61,模拟型号HMA-AL00
安卓版本:
Android 9
使用系统API读取相册,调用ContentResolver.query方法(query内部会调用重载方法,如下)时,会被重复计算调用次数。
context.contentResolver.query( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, selection, selectionArgs, "${MediaStore.Images.Media.DATE_MODIFIED} desc limit $limit offset $offset" )
现象:AppScan报告相册调用次数为 3 次。应该是1次才对
AppScan导出错误栈如下:
// #1 main 获取相册内容 android.content.ContentResolver.query(Native Method) com.***.mediapicker.viewmodel.PhotoPickerViewModel2$loadPhoto$1.invokeSuspend(PhotoPickerViewModel2.kt:200) kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738) kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665) // #2 main 获取相册内容 android.content.ContentResolver.query(Native Method) android.content.ContentResolver.query(ContentResolver.java:711) android.content.ContentResolver.query(Native Method) com.***.mediapicker.viewmodel.PhotoPickerViewModel2$loadPhoto$1.invokeSuspend(PhotoPickerViewModel2.kt:200) kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738) kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665) // #3 main 获取相册内容 android.content.ContentResolver.query(Native Method) android.content.ContentResolver.query(ContentResolver.java:753) android.content.ContentResolver.query(Native Method) android.content.ContentResolver.query(ContentResolver.java:711) android.content.ContentResolver.query(Native Method) com.***.mediapicker.viewmodel.PhotoPickerViewModel2$loadPhoto$1.invokeSuspend(PhotoPickerViewModel2.kt:200) kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738) kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
The text was updated successfully, but these errors were encountered:
看了一下, 这个准确说是待优化项, 对于目前的捕捉来讲, 确实是调用了底层的相册获取接口, 只是从操作方讲, 确实是只触发了一次, 这个我们看看怎么处理
Sorry, something went wrong.
ChnMig
No branches or pull requests
Appscan 版本
系统版本
电脑版本:
手机型号:
安卓版本:
Bug 描述
现象:AppScan报告相册调用次数为 3 次。应该是1次才对
The text was updated successfully, but these errors were encountered: