Skip to content
Snippets Groups Projects
Verified Commit 9bc7d5c8 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

fix: correct issue with bad crash collector code

parent 9625008f
No related branches found
No related tags found
No related merge requests found
......@@ -41,9 +41,7 @@ class DisplayCollector(application: Application) :
@Suppress("DEPRECATION")
override fun collect(context: CrashContext, config: Boolean): DisplayInfo {
val display =
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) windowManager.defaultDisplay
else context.application.display ?: windowManager.defaultDisplay
val display = windowManager.defaultDisplay
val hdrCapabilities = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
val capabilitiesEnum = getHdrCapabilitiesEnum()
display.hdrCapabilities.supportedHdrTypes.map(capabilitiesEnum::get)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment