@@ -19,45 +19,39 @@ package com.google.firebase.crashlytics
19
19
/* * Helper class to enable convenient syntax in [setCustomKeys] and [recordException] */
20
20
class KeyValueBuilder
21
21
private constructor (
22
- private val crashlytics: FirebaseCrashlytics ? ,
23
22
private val builder: CustomKeysAndValues .Builder ,
24
23
) {
25
- @Deprecated(
26
- " Do not construct this directly. Use `setCustomKeys` instead. To be removed in the next major release."
27
- )
28
- constructor (crashlytics: FirebaseCrashlytics ) : this (crashlytics, CustomKeysAndValues .Builder ())
29
-
30
- internal constructor () : this (crashlytics = null , CustomKeysAndValues .Builder ())
24
+ internal constructor () : this (CustomKeysAndValues .Builder ())
31
25
32
26
internal fun build (): CustomKeysAndValues = builder.build()
33
27
34
28
/* * Sets a custom key and value that are associated with reports. */
35
29
fun key (key : String , value : Boolean ) {
36
- crashlytics?.setCustomKey(key, value) ? : builder.putBoolean(key, value)
30
+ builder.putBoolean(key, value)
37
31
}
38
32
39
33
/* * Sets a custom key and value that are associated with reports. */
40
34
fun key (key : String , value : Double ) {
41
- crashlytics?.setCustomKey(key, value) ? : builder.putDouble(key, value)
35
+ builder.putDouble(key, value)
42
36
}
43
37
44
38
/* * Sets a custom key and value that are associated with reports. */
45
39
fun key (key : String , value : Float ) {
46
- crashlytics?.setCustomKey(key, value) ? : builder.putFloat(key, value)
40
+ builder.putFloat(key, value)
47
41
}
48
42
49
43
/* * Sets a custom key and value that are associated with reports. */
50
44
fun key (key : String , value : Int ) {
51
- crashlytics?.setCustomKey(key, value) ? : builder.putInt(key, value)
45
+ builder.putInt(key, value)
52
46
}
53
47
54
48
/* * Sets a custom key and value that are associated with reports. */
55
49
fun key (key : String , value : Long ) {
56
- crashlytics?.setCustomKey(key, value) ? : builder.putLong(key, value)
50
+ builder.putLong(key, value)
57
51
}
58
52
59
53
/* * Sets a custom key and value that are associated with reports. */
60
54
fun key (key : String , value : String ) {
61
- crashlytics?.setCustomKey(key, value) ? : builder.putString(key, value)
55
+ builder.putString(key, value)
62
56
}
63
57
}
0 commit comments