Skip to content

Commit

Permalink
Less spammy error messages for optional permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rken committed Sep 22, 2023
1 parent b05e321 commit 698f9cd
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ class InaccessibleCacheProvider @Inject constructor(
StorageId(internalId = null, externalId = applicationInfo.storageUuid),
pkg,
)
} catch (e: SecurityException) {
log(TAG, WARN) { "Don't have permission to query app size for ${pkg.id}: $e" }
return null
} catch (e: Exception) {
log(TAG, ERROR) { "Failed to query app size for ${pkg.id}: ${e.asLog()}" }
log(TAG, ERROR) { "Unexpected error when querying app size for ${pkg.id}: ${e.asLog()}" }
return null
}

Expand Down

0 comments on commit 698f9cd

Please sign in to comment.