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

Commit cc5e0ad1 authored by Fabián Kozynski's avatar Fabián Kozynski
Browse files

ShadeControllerSceneImpl post should use main

The `post` methods in ShadeControllerScneImpl should (as their name
says) post to the main thread to interact with the shade.

Test: manual, using tile service that launches activity, targetSdk 33
Fixes: 415179281
Flag: com.android.systemui.scene_container

Change-Id: I0ad86605ddc950cd441e49cb8eec788c5e356c03
parent 031ed9b5
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package com.android.systemui.shade

import android.view.MotionEvent
import com.android.app.tracing.coroutines.launchTraced as launch
import com.android.systemui.assist.AssistManager
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
@@ -39,6 +38,7 @@ import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext

/**
@@ -208,17 +208,17 @@ constructor(

    @Deprecated("Deprecated in Java")
    override fun postAnimateCollapseShade() {
        animateCollapseShade()
        scope.launch(mainDispatcher) { animateCollapseShade() }
    }

    @Deprecated("Deprecated in Java")
    override fun postAnimateForceCollapseShade() {
        animateCollapseShadeForced()
        scope.launch(mainDispatcher) { animateCollapseShadeForced() }
    }

    @Deprecated("Deprecated in Java")
    override fun postAnimateExpandQs() {
        expandToQs()
        scope.launch(mainDispatcher) { expandToQs() }
    }

    override fun postOnShadeExpanded(action: Runnable) {