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

Commit 55df1e26 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Catch BadParcelableException when checking extras" into main

parents ba71bc94 a128a9f2
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.content.Context
import android.graphics.drawable.Icon
import android.media.session.MediaController
import android.media.session.PlaybackState
import android.os.BadParcelableException
import android.util.Log
import com.android.systemui.Flags.mediaControlsPostsOptimization
import com.android.systemui.biometrics.Utils.toBitmap
@@ -109,9 +110,14 @@ private fun areCustomActionsEqual(
    }
    if (firstAction.extras != null) {
        firstAction.extras.keySet().forEach { key ->
            try {
                if (firstAction.extras[key] != secondAction.extras[key]) {
                    return false
                }
            } catch (e: BadParcelableException) {
                Log.e(TAG, "Cannot unparcel extras", e)
                return false
            }
        }
    }
    return true