Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mrober committed Jun 26, 2023
1 parent b8e6e76 commit 9982ffc
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,23 @@ import kotlin.time.toDuration
internal class LocalOverrideSettings(context: Context) : SettingsProvider {
private val metadata =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
context.packageManager.getApplicationInfo(
context.packageManager
.getApplicationInfo(
context.packageName,
PackageManager.ApplicationInfoFlags.of(PackageManager.GET_META_DATA.toLong()),
)
} else {
@Suppress("DEPRECATION") // For older API levels.
context.packageManager.getApplicationInfo(
.metaData
} else {
@Suppress("DEPRECATION") // For older API levels.
context.packageManager
.getApplicationInfo(
context.packageName,
PackageManager.GET_META_DATA,
)
}
.metaData
?: Bundle.EMPTY
.metaData
}
// Default to an empty bundle, meaning no cached values.
?: Bundle.EMPTY

override val sessionEnabled: Boolean?
get() =
Expand Down

0 comments on commit 9982ffc

Please sign in to comment.