Skip to content

Commit

Permalink
fix: suppress compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalwrench committed May 8, 2024
1 parent b44ff17 commit d1c114b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ internal class DeviceImpl(
}
}

@Suppress("DEPRECATION")
private fun getScreenResolution(windowManager: WindowManager?): String {
return try {
val display = windowManager?.defaultDisplay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ internal class EnvelopeResourceSourceImpl(
private val metadataService: MetadataService
) : EnvelopeResourceSource {

@Suppress("DEPRECATION")
override fun getEnvelopeResource(): EnvelopeResource {
return EnvelopeResource(
appVersion = packageInfo.versionName?.toString()?.trim { it <= ' ' } ?: "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ internal class EmbraceMetadataService private constructor(
}
}

@SuppressWarnings("deprecation")
@Suppress("DEPRECATION")
private fun asyncRetrieveScreenResolution() {
// if the screenResolution exists in memory, don't try to retrieve it
if (!screenResolution.isNullOrEmpty()) {
Expand Down Expand Up @@ -189,8 +189,8 @@ internal class EmbraceMetadataService private constructor(
}
}

@Suppress("DEPRECATION")
@TargetApi(Build.VERSION_CODES.O)
@SuppressWarnings("deprecation")
fun getDeviceDiskAppUsage(
storageStatsManager: StorageStatsManager?,
packageManager: PackageManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ internal class EmbraceSpanImpl(
}
if (successful) {
spanStartTimeMs = attemptedStartTimeMs
spanRepository?.trackStartedSpan(this)
spanRepository.trackStartedSpan(this)
}
return successful
}
Expand Down Expand Up @@ -107,7 +107,7 @@ internal class EmbraceSpanImpl(
Span.Status.OK
}
spanEndTimeMs = attemptedEndTimeMs
spanId?.let { spanRepository?.trackedSpanStopped(it) }
spanId?.let { spanRepository.trackedSpanStopped(it) }
}
return successful
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ internal class FakeLogOrchestrator : LogOrchestrator {

var flushCalled = false

override fun flush(sync: Boolean) {
override fun flush(saveOnly: Boolean) {
flushCalled = true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ internal class FakeCoreModule(
override val resources: FakeAndroidResourcesService = FakeAndroidResourcesService(),
override val isDebug: Boolean = if (isMockKMock(context)) false else AppEnvironment(context.applicationInfo).isDebug,
override val buildInfo: BuildInfo = BuildInfo.fromResources(resources, context.packageName),
@Suppress("DEPRECATION")
override val packageInfo: PackageInfo = context.packageManager.getPackageInfo(context.packageName, 0)
) : CoreModule {

Expand Down

0 comments on commit d1c114b

Please sign in to comment.