@@ -19,45 +19,39 @@ package com.google.firebase.crashlytics
1919/* * Helper class to enable convenient syntax in [setCustomKeys] and [recordException] */
2020class KeyValueBuilder
2121private constructor (
22- private val crashlytics: FirebaseCrashlytics ? ,
2322 private val builder: CustomKeysAndValues .Builder ,
2423) {
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 ())
3125
3226 internal fun build (): CustomKeysAndValues = builder.build()
3327
3428 /* * Sets a custom key and value that are associated with reports. */
3529 fun key (key : String , value : Boolean ) {
36- crashlytics?.setCustomKey(key, value) ? : builder.putBoolean(key, value)
30+ builder.putBoolean(key, value)
3731 }
3832
3933 /* * Sets a custom key and value that are associated with reports. */
4034 fun key (key : String , value : Double ) {
41- crashlytics?.setCustomKey(key, value) ? : builder.putDouble(key, value)
35+ builder.putDouble(key, value)
4236 }
4337
4438 /* * Sets a custom key and value that are associated with reports. */
4539 fun key (key : String , value : Float ) {
46- crashlytics?.setCustomKey(key, value) ? : builder.putFloat(key, value)
40+ builder.putFloat(key, value)
4741 }
4842
4943 /* * Sets a custom key and value that are associated with reports. */
5044 fun key (key : String , value : Int ) {
51- crashlytics?.setCustomKey(key, value) ? : builder.putInt(key, value)
45+ builder.putInt(key, value)
5246 }
5347
5448 /* * Sets a custom key and value that are associated with reports. */
5549 fun key (key : String , value : Long ) {
56- crashlytics?.setCustomKey(key, value) ? : builder.putLong(key, value)
50+ builder.putLong(key, value)
5751 }
5852
5953 /* * Sets a custom key and value that are associated with reports. */
6054 fun key (key : String , value : String ) {
61- crashlytics?.setCustomKey(key, value) ? : builder.putString(key, value)
55+ builder.putString(key, value)
6256 }
6357}
0 commit comments