Skip to content

Commit

Permalink
fix: Exception catching for queryStatsForPackage()
Browse files Browse the repository at this point in the history
Change-Id: If7b7b548a331d99bbb6e73355692b444201a701f
  • Loading branch information
XayahSuSuSu committed Sep 28, 2023
1 parent 9db10e0 commit 69e668d
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,14 @@ internal class RemoteRootServiceImpl : IRemoteRootService.Stub() {
}

override fun queryStatsForPackage(packageInfo: PackageInfo, user: UserHandle): StorageStats? = synchronized(lock) {
storageStatsManager.queryStatsForPackage(packageInfo.applicationInfo.storageUuid, packageInfo.packageName, user)
tryOn(
block = {
storageStatsManager.queryStatsForPackage(packageInfo.applicationInfo.storageUuid, packageInfo.packageName, user)
},
onException = {
null
}
)
}

override fun getUsers(): List<UserInfo> = synchronized(lock) {
Expand Down

0 comments on commit 69e668d

Please sign in to comment.