Skip to content

Commit 9754a1c

Browse files
committed
More lint fixes
1 parent da5d836 commit 9754a1c

File tree

4 files changed

+66
-9
lines changed

4 files changed

+66
-9
lines changed

features/dd-sdk-android-rum/api/apiSurface

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ object com.datadog.android.rum.RumAttributes
6262
const val NETWORK_SIGNAL_STRENGTH: String
6363
const val NETWORK_UP_KBPS: String
6464
const val NETWORK_BYTES_READ: String
65+
const val FLUTTER_FIRST_BUILD_COMPLETE: String
66+
const val CUSTOM_INV_VALUE: String
6567
data class com.datadog.android.rum.RumConfiguration
6668
class Builder
6769
constructor(String)
@@ -83,7 +85,7 @@ data class com.datadog.android.rum.RumConfiguration
8385
fun useCustomEndpoint(String): Builder
8486
fun setSessionListener(RumSessionListener): Builder
8587
fun setInitialResourceIdentifier(com.datadog.android.rum.metric.networksettled.InitialResourceIdentifier): Builder
86-
fun setLastInteractionIdentifier(com.datadog.android.rum.metric.interactiontonextview.LastInteractionIdentifier): Builder
88+
fun setLastInteractionIdentifier(com.datadog.android.rum.metric.interactiontonextview.LastInteractionIdentifier?): Builder
8789
fun build(): RumConfiguration
8890
enum com.datadog.android.rum.RumErrorSource
8991
- NETWORK
@@ -156,6 +158,7 @@ interface com.datadog.android.rum.RumSessionListener
156158
class com.datadog.android.rum._RumInternalProxy
157159
fun addLongTask(Long, String)
158160
fun updatePerformanceMetric(RumPerformanceMetric, Double)
161+
fun setInternalViewAttribute(String, Any?)
159162
fun setSyntheticsAttribute(String?, String?)
160163
companion object
161164
fun setTelemetryConfigurationEventMapper(RumConfiguration.Builder, com.datadog.android.event.EventMapper<com.datadog.android.telemetry.model.TelemetryConfigurationEvent>): RumConfiguration.Builder
@@ -1775,7 +1778,7 @@ data class com.datadog.android.rum.model.ViewEvent
17751778
fun fromJson(kotlin.String): ViewEventSession
17761779
fun fromJsonObject(com.google.gson.JsonObject): ViewEventSession
17771780
data class ViewEventView
1778-
constructor(kotlin.String, kotlin.String? = null, kotlin.String, kotlin.String? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, LoadingType? = null, kotlin.Long, kotlin.Long? = null, kotlin.Long? = null, kotlin.String? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.String? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.String? = null, kotlin.Number? = null, kotlin.Long? = null, kotlin.String? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, CustomTimings? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, Action, Error, Crash? = null, LongTask? = null, FrozenFrame? = null, Resource, Frustration? = null, kotlin.collections.List<InForegroundPeriod>? = null, kotlin.Number? = null, kotlin.Number? = null, kotlin.Number? = null, kotlin.Number? = null, kotlin.Number? = null, kotlin.Number? = null, FlutterBuildTime? = null, FlutterBuildTime? = null, FlutterBuildTime? = null)
1781+
constructor(kotlin.String, kotlin.String? = null, kotlin.String, kotlin.String? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, LoadingType? = null, kotlin.Long, kotlin.Long? = null, kotlin.Long? = null, kotlin.String? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.String? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.String? = null, kotlin.Number? = null, kotlin.Long? = null, kotlin.String? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, kotlin.Long? = null, CustomTimings? = null, kotlin.Boolean? = null, kotlin.Boolean? = null, Action, Error, Crash? = null, LongTask? = null, FrozenFrame? = null, Resource, Frustration? = null, kotlin.collections.List<InForegroundPeriod>? = null, kotlin.Number? = null, kotlin.Number? = null, kotlin.Number? = null, kotlin.Number? = null, kotlin.Number? = null, kotlin.Number? = null, FlutterBuildTime? = null, FlutterBuildTime? = null, FlutterBuildTime? = null, Performance? = null)
17791782
fun toJson(): com.google.gson.JsonElement
17801783
companion object
17811784
fun fromJson(kotlin.String): ViewEventView
@@ -1913,6 +1916,12 @@ data class com.datadog.android.rum.model.ViewEvent
19131916
companion object
19141917
fun fromJson(kotlin.String): FlutterBuildTime
19151918
fun fromJsonObject(com.google.gson.JsonObject): FlutterBuildTime
1919+
data class Performance
1920+
constructor(Cls? = null, Fcp? = null, Fid? = null, Inp? = null, Lcp? = null, Fbc? = null)
1921+
fun toJson(): com.google.gson.JsonElement
1922+
companion object
1923+
fun fromJson(kotlin.String): Performance
1924+
fun fromJsonObject(com.google.gson.JsonObject): Performance
19161925
data class Cellular
19171926
constructor(kotlin.String? = null, kotlin.String? = null)
19181927
fun toJson(): com.google.gson.JsonElement
@@ -1961,6 +1970,48 @@ data class com.datadog.android.rum.model.ViewEvent
19611970
companion object
19621971
fun fromJson(kotlin.String): ContainerView
19631972
fun fromJsonObject(com.google.gson.JsonObject): ContainerView
1973+
data class Cls
1974+
constructor(kotlin.Number, kotlin.Long? = null, kotlin.String? = null, PreviousRect? = null, PreviousRect? = null)
1975+
fun toJson(): com.google.gson.JsonElement
1976+
companion object
1977+
fun fromJson(kotlin.String): Cls
1978+
fun fromJsonObject(com.google.gson.JsonObject): Cls
1979+
data class Fcp
1980+
constructor(kotlin.Long)
1981+
fun toJson(): com.google.gson.JsonElement
1982+
companion object
1983+
fun fromJson(kotlin.String): Fcp
1984+
fun fromJsonObject(com.google.gson.JsonObject): Fcp
1985+
data class Fid
1986+
constructor(kotlin.Long, kotlin.Long, kotlin.String? = null)
1987+
fun toJson(): com.google.gson.JsonElement
1988+
companion object
1989+
fun fromJson(kotlin.String): Fid
1990+
fun fromJsonObject(com.google.gson.JsonObject): Fid
1991+
data class Inp
1992+
constructor(kotlin.Long, kotlin.Long? = null, kotlin.String? = null)
1993+
fun toJson(): com.google.gson.JsonElement
1994+
companion object
1995+
fun fromJson(kotlin.String): Inp
1996+
fun fromJsonObject(com.google.gson.JsonObject): Inp
1997+
data class Lcp
1998+
constructor(kotlin.Long, kotlin.String? = null, kotlin.String? = null)
1999+
fun toJson(): com.google.gson.JsonElement
2000+
companion object
2001+
fun fromJson(kotlin.String): Lcp
2002+
fun fromJsonObject(com.google.gson.JsonObject): Lcp
2003+
data class Fbc
2004+
constructor(kotlin.Long)
2005+
fun toJson(): com.google.gson.JsonElement
2006+
companion object
2007+
fun fromJson(kotlin.String): Fbc
2008+
fun fromJsonObject(com.google.gson.JsonObject): Fbc
2009+
data class PreviousRect
2010+
constructor(kotlin.Number, kotlin.Number, kotlin.Number, kotlin.Number)
2011+
fun toJson(): com.google.gson.JsonElement
2012+
companion object
2013+
fun fromJson(kotlin.String): PreviousRect
2014+
fun fromJsonObject(com.google.gson.JsonObject): PreviousRect
19642015
enum ViewEventSource
19652016
constructor(kotlin.String)
19662017
- ANDROID
@@ -2076,7 +2127,7 @@ data class com.datadog.android.rum.model.ViewEvent
20762127
companion object
20772128
fun fromJson(kotlin.String): State
20782129
data class com.datadog.android.rum.model.ViewPerformanceData
2079-
constructor(Cls? = null, Fcp? = null, Fid? = null, Inp? = null, Lcp? = null)
2130+
constructor(Cls? = null, Fcp? = null, Fid? = null, Inp? = null, Lcp? = null, Fbc? = null)
20802131
fun toJson(): com.google.gson.JsonElement
20812132
companion object
20822133
fun fromJson(kotlin.String): ViewPerformanceData
@@ -2111,6 +2162,12 @@ data class com.datadog.android.rum.model.ViewPerformanceData
21112162
companion object
21122163
fun fromJson(kotlin.String): Lcp
21132164
fun fromJsonObject(com.google.gson.JsonObject): Lcp
2165+
data class Fbc
2166+
constructor(kotlin.Long)
2167+
fun toJson(): com.google.gson.JsonElement
2168+
companion object
2169+
fun fromJson(kotlin.String): Fbc
2170+
fun fromJsonObject(com.google.gson.JsonObject): Fbc
21142171
data class PreviousRect
21152172
constructor(kotlin.Number, kotlin.Number, kotlin.Number, kotlin.Number)
21162173
fun toJson(): com.google.gson.JsonElement

features/dd-sdk-android-rum/src/main/kotlin/com/datadog/android/rum/RumAttributes.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,14 @@ object RumAttributes {
294294
* Custom Flutter vital - First Build Complete. The amount of time between a route change (the start of a view)
295295
* and when the first `build` method is complete. In nanoseconds since view start.
296296
*/
297-
const val FLUTTER_FIRST_BUILD_COMPLETE = "_dd.performance.first_build_complete"
297+
const val FLUTTER_FIRST_BUILD_COMPLETE: String = "_dd.performance.first_build_complete"
298298

299299
/**
300300
* Custom value for Interaction To Next view.
301301
* For Flutter this is the amount of time between an action occurring and the First Build Complete occurring
302302
* on the next view.
303303
*/
304-
const val CUSTOM_INV_VALUE = "_dd.view.custom_inv_value"
304+
const val CUSTOM_INV_VALUE: String = "_dd.view.custom_inv_value"
305305

306306
// endregion
307307
}

features/dd-sdk-android-rum/src/main/kotlin/com/datadog/android/rum/internal/domain/scope/RumViewScope.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ internal open class RumViewScope(
202202
is RumRawEvent.StartResource -> onStartResource(event, writer)
203203
is RumRawEvent.AddError -> onAddError(event, writer)
204204
is RumRawEvent.AddLongTask -> onAddLongTask(event, writer)
205-
is RumRawEvent.SetInternalViewAttribute -> onSetInternalViewAttribute(event, writer)
205+
is RumRawEvent.SetInternalViewAttribute -> onSetInternalViewAttribute(event)
206206

207207
is RumRawEvent.AddFeatureFlagEvaluation -> onAddFeatureFlagEvaluation(event, writer)
208208
is RumRawEvent.AddFeatureFlagEvaluations -> onAddFeatureFlagEvaluations(event, writer)
@@ -621,7 +621,7 @@ internal open class RumViewScope(
621621
}
622622

623623
@WorkerThread
624-
private fun onSetInternalViewAttribute(event: RumRawEvent.SetInternalViewAttribute, writer: DataWriter<Any>) {
624+
private fun onSetInternalViewAttribute(event: RumRawEvent.SetInternalViewAttribute) {
625625
if (stopped) return
626626

627627
internalAttributes[event.key] = event.value

features/dd-sdk-android-rum/src/test/kotlin/com/datadog/android/rum/internal/domain/scope/RumViewScopeTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8295,7 +8295,7 @@ internal class RumViewScopeTest {
82958295
testedScope.handleEvent(
82968296
RumRawEvent.SetInternalViewAttribute(
82978297
key = RumAttributes.CUSTOM_INV_VALUE,
8298-
value = custom_inv
8298+
value = customInv
82998299
),
83008300
mockWriter
83018301
)
@@ -8308,7 +8308,7 @@ internal class RumViewScopeTest {
83088308
argumentCaptor<ViewEvent> {
83098309
verify(mockWriter).write(eq(mockEventBatchWriter), capture(), eq(EventType.DEFAULT))
83108310
assertThat(lastValue)
8311-
.hasInteractionToNextViewTime(custom_inv)
8311+
.hasInteractionToNextViewTime(customInv)
83128312
}
83138313
verifyNoMoreInteractions(mockWriter)
83148314
assertThat(result).isSameAs(testedScope)

0 commit comments

Comments
 (0)