fix(build): resolve all actionable compile-time warnings (#5058)

This commit is contained in:
James Rich 2026-04-10 17:42:30 -05:00 committed by GitHub
parent 3d139d32fd
commit 929e273978
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 34 additions and 17 deletions

View file

@ -38,7 +38,7 @@ import com.datadog.android.rum.RumActionType
import com.datadog.android.rum.RumConfiguration
import com.datadog.android.sessionreplay.SessionReplay
import com.datadog.android.sessionreplay.SessionReplayConfiguration
import com.datadog.android.sessionreplay.SessionReplayPrivacy
import com.datadog.android.sessionreplay.TextAndInputPrivacy
import com.datadog.android.trace.Trace
import com.datadog.android.trace.TraceConfiguration
import com.datadog.android.trace.opentelemetry.DatadogOpenTelemetry
@ -175,7 +175,9 @@ class GooglePlatformAnalytics(private val context: Context, private val analytic
// Masks all text inputs to protect message content.
if (BuildConfig.DEBUG) {
val sessionReplayConfig =
SessionReplayConfiguration.Builder(sampleRate).setPrivacy(SessionReplayPrivacy.MASK_USER_INPUT).build()
SessionReplayConfiguration.Builder(sampleRate)
.setTextAndInputPrivacy(TextAndInputPrivacy.MASK_ALL_INPUTS)
.build()
SessionReplay.enable(sessionReplayConfig)
}

View file

@ -57,7 +57,6 @@ import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import kotlinx.datetime.Instant
import kotlinx.datetime.LocalDate
import kotlinx.datetime.Month
import kotlinx.datetime.atTime
@ -120,12 +119,12 @@ fun EditWaypointDialog(
val expireValue = waypointInput.expire ?: 0
if (isExpiryEnabled) {
if (expireValue != 0 && expireValue != Int.MAX_VALUE) {
val instant = Instant.fromEpochSeconds(expireValue.toLong())
val instant = kotlin.time.Instant.fromEpochSeconds(expireValue.toLong())
val date = java.util.Date(instant.toEpochMilliseconds())
selectedDateString = dateFormat.format(date)
selectedTimeString = timeFormat.format(date)
} else { // If enabled but not set, default to 8 hours from now
val futureInstant = kotlinx.datetime.Clock.System.now() + 8.hours
val futureInstant = kotlin.time.Clock.System.now() + 8.hours
val date = java.util.Date(futureInstant.toEpochMilliseconds())
selectedDateString = dateFormat.format(date)
selectedTimeString = timeFormat.format(date)
@ -223,7 +222,7 @@ fun EditWaypointDialog(
val expireValue = waypointInput.expire ?: 0
// Default to 8 hours from now if not already set
if (expireValue == 0 || expireValue == Int.MAX_VALUE) {
val futureInstant = kotlinx.datetime.Clock.System.now() + 8.hours
val futureInstant = kotlin.time.Clock.System.now() + 8.hours
waypointInput = waypointInput.copy(expire = futureInstant.epochSeconds.toInt())
}
} else {
@ -237,9 +236,9 @@ fun EditWaypointDialog(
val currentInstant =
(waypointInput.expire ?: 0).let {
if (it != 0 && it != Int.MAX_VALUE) {
Instant.fromEpochSeconds(it.toLong())
kotlin.time.Instant.fromEpochSeconds(it.toLong())
} else {
kotlinx.datetime.Clock.System.now() + 8.hours
kotlin.time.Clock.System.now() + 8.hours
}
}
val ldt = currentInstant.toLocalDateTime(tz)
@ -252,9 +251,9 @@ fun EditWaypointDialog(
(waypointInput.expire ?: 0)
.let {
if (it != 0 && it != Int.MAX_VALUE) {
Instant.fromEpochSeconds(it.toLong())
kotlin.time.Instant.fromEpochSeconds(it.toLong())
} else {
kotlinx.datetime.Clock.System.now() + 8.hours
kotlin.time.Clock.System.now() + 8.hours
}
}
.toLocalDateTime(tz)
@ -287,9 +286,9 @@ fun EditWaypointDialog(
(waypointInput.expire ?: 0)
.let {
if (it != 0 && it != Int.MAX_VALUE) {
Instant.fromEpochSeconds(it.toLong())
kotlin.time.Instant.fromEpochSeconds(it.toLong())
} else {
kotlinx.datetime.Clock.System.now() + 8.hours
kotlin.time.Clock.System.now() + 8.hours
}
}
.toLocalDateTime(tz)