Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33e51809 authored by Colin Cross's avatar Colin Cross Committed by Cherrypicker Worker
Browse files

Fix type inference errors with kotlinc 1.9.0

Fixes:
frameworks/base/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/ClockRegistry.kt:68:35: error: type mismatch: inferred type is TKey but TKey & Any was expected
val result = this.putIfAbsent(key, value)
^
frameworks/base/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/ClockRegistry.kt:68:40: error: type mismatch: inferred type is TVal but TVal & Any was expected
val result = this.putIfAbsent(key, value)
^

Bug: 291335478
Test: builds
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7477f38ebd9bcab21b487a22b306c89641558d78)
Merged-In: I73573f097832f6f4d5983f364b0dca3a59ad88a8
Change-Id: I73573f097832f6f4d5983f364b0dca3a59ad88a8
parent c368aff2
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -60,7 +60,7 @@ private val KNOWN_PLUGINS =
        "com.android.systemui.falcon.nine" to listOf(ClockMetadata("DIGITAL_CLOCK_WEATHER")),
        "com.android.systemui.falcon.nine" to listOf(ClockMetadata("DIGITAL_CLOCK_WEATHER")),
    )
    )


private fun <TKey, TVal> ConcurrentHashMap<TKey, TVal>.concurrentGetOrPut(
private fun <TKey : Any, TVal : Any> ConcurrentHashMap<TKey, TVal>.concurrentGetOrPut(
    key: TKey,
    key: TKey,
    value: TVal,
    value: TVal,
    onNew: () -> Unit
    onNew: () -> Unit