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

Commit 6e3d0a66 authored by Colin Cross's avatar Colin Cross
Browse files

Fix SystemUI build for kotlin 1.7.0

Kotlin 1.7.0 converts the UNEXPECTED_SAFE_CALL warning into an error:

frameworks/base/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt:780:68: error:
type mismatch: inferred type is Boolean? but Boolean was expected
        if (useMediaResumption && removed?.resumeAction != null && removed?.isLocalSession()) {
                                                                   ^

Replace the unnecessary ?. operator.

Bug: 216136346
Test: builds
Change-Id: Ib1605aaff28492b557deac4156f3cc2f4cf8b329
parent fb040be7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1068,7 +1068,7 @@ class MediaDataManager(
    fun onNotificationRemoved(key: String) {
        Assert.isMainThread()
        val removed = mediaEntries.remove(key)
        if (useMediaResumption && removed?.resumeAction != null && removed?.isLocalSession()) {
        if (useMediaResumption && removed?.resumeAction != null && removed.isLocalSession()) {
            Log.d(TAG, "Not removing $key because resumable")
            // Move to resume key (aka package name) if that key doesn't already exist.
            val resumeAction = getResumeMediaAction(removed.resumeAction!!)