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

Commit 9112deec authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/23753646',...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/23753646', 'googleplex-android-review.googlesource.com/24150783', 'googleplex-android-review.googlesource.com/24179446', 'googleplex-android-review.googlesource.com/24148304'] into udc-release.

Change-Id: I72e16ddd34218034868cf6408e84044cd8c77b7e
parents 69617f80 a159dafd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -279,7 +279,7 @@ class ControlsUiControllerImpl @Inject constructor (

        controlsListingController.get().removeCallback(listingCallback)
        controlsController.get().unsubscribe()
        taskViewController?.dismiss()
        taskViewController?.removeTask()
        taskViewController = null

        val fadeAnim = ObjectAnimator.ofFloat(parent, "alpha", 1.0f, 0.0f)
@@ -777,7 +777,7 @@ class ControlsUiControllerImpl @Inject constructor (

            closeDialogs(true)
            controlsController.get().unsubscribe()
            taskViewController?.dismiss()
            taskViewController?.removeTask()
            taskViewController = null

            controlsById.clear()
+10 −14
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@
package com.android.systemui.controls.ui

import android.app.ActivityOptions
import android.app.ActivityTaskManager
import android.app.ActivityTaskManager.INVALID_TASK_ID
import android.app.PendingIntent
import android.content.ComponentName
@@ -28,6 +27,7 @@ import android.graphics.Color
import android.graphics.drawable.ShapeDrawable
import android.graphics.drawable.shapes.RoundRectShape
import android.os.Trace
import com.android.internal.annotations.VisibleForTesting
import com.android.systemui.R
import com.android.systemui.util.boundsOnScreen
import com.android.wm.shell.taskview.TaskView
@@ -54,12 +54,6 @@ class PanelTaskViewController(
            addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK)
        }

    private fun removeDetailTask() {
        if (detailTaskId == INVALID_TASK_ID) return
        ActivityTaskManager.getInstance().removeTask(detailTaskId)
        detailTaskId = INVALID_TASK_ID
    }

    private val stateCallback =
        object : TaskView.Listener {
            override fun onInitialized() {
@@ -95,7 +89,7 @@ class PanelTaskViewController(

            override fun onTaskRemovalStarted(taskId: Int) {
                detailTaskId = INVALID_TASK_ID
                dismiss()
                release()
            }

            override fun onTaskCreated(taskId: Int, name: ComponentName?) {
@@ -103,12 +97,7 @@ class PanelTaskViewController(
                taskView.alpha = 1f
            }

            override fun onReleased() {
                removeDetailTask()
            }

            override fun onBackPressedOnTaskRoot(taskId: Int) {
                dismiss()
                hide()
            }
        }
@@ -117,10 +106,17 @@ class PanelTaskViewController(
        taskView.onLocationChanged()
    }

    fun dismiss() {
    /** Call when the taskView is no longer being used, shouldn't be called before removeTask. */
    @VisibleForTesting
    fun release() {
        taskView.release()
    }

    /** Call to explicitly remove the task from window manager. */
    fun removeTask() {
        taskView.removeTask()
    }

    fun launchTaskView() {
        taskView.setListener(uiExecutor, stateCallback)
    }
+4 −1
Original line number Diff line number Diff line
@@ -39,7 +39,10 @@ class StackCoordinator @Inject internal constructor(

    override fun attach(pipeline: NotifPipeline) {
        pipeline.addOnAfterRenderListListener(::onAfterRenderList)
        groupExpansionManagerImpl.attach(pipeline)
        // TODO(b/282865576): This has an issue where it makes changes to some groups without
        // notifying listeners. To be fixed in QPR, but for now let's comment it out to avoid the
        // group expansion bug.
        // groupExpansionManagerImpl.attach(pipeline)
    }

    fun onAfterRenderList(entries: List<ListEntry>, controller: NotifStackController) =
+1 −1
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ class UnlockedScreenOffAnimationController @Inject constructor(

        // Cancel any existing CUJs before starting the animation
        interactionJankMonitor.cancel(CUJ_SCREEN_OFF_SHOW_AOD)

        PropertyAnimator.cancelAnimation(keyguardView, AnimatableProperty.ALPHA)
        PropertyAnimator.setProperty(
            keyguardView, AnimatableProperty.ALPHA, 1f,
            AnimationProperties()
+2 −11
Original line number Diff line number Diff line
@@ -146,17 +146,8 @@ class PanelTaskViewControllerTest : SysuiTestCase() {
    }

    @Test
    fun testTaskViewReleasedOnDismiss() {
        underTest.dismiss()
        verify(taskView).release()
    }

    @Test
    fun testTaskViewReleasedOnBackOnRoot() {
        underTest.launchTaskView()
        verify(taskView).setListener(any(), capture(listenerCaptor))

        listenerCaptor.value.onBackPressedOnTaskRoot(0)
    fun testTaskViewReleasedOnRelease() {
        underTest.release()
        verify(taskView).release()
    }

Loading