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

Commit 9de3998b authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix ConcurrentModificationException in RotationChangeProvider" into main

parents 6669dac3 79bfab3f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import com.android.systemui.unfold.util.CallbackController
import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject
import java.util.concurrent.CopyOnWriteArrayList

/**
 * Allows to subscribe to rotation changes. Updates are provided for the display associated to
@@ -41,7 +42,7 @@ constructor(
    @Assisted private val callbackHandler: Handler,
) : CallbackController<RotationChangeProvider.RotationListener> {

    private val listeners = mutableListOf<RotationListener>()
    private val listeners = CopyOnWriteArrayList<RotationListener>()

    private val displayListener = RotationDisplayListener()
    private var lastRotation: Int? = null