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

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

Merge "Clean up launched flag "pss_app_selector_abrupt_exit_fix"" into main

parents ab651eda 0f0eef4d
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -155,17 +155,6 @@ flag {
   }
}

flag {
   name: "pss_app_selector_abrupt_exit_fix"
   namespace: "systemui"
   description: "Fixes the app selector abruptly disappearing without an animation, when the"
        "selected task is the foreground task."
   bug: "314385883"
   metadata {
        purpose: PURPOSE_BUGFIX
   }
}

flag {
   name: "pss_app_selector_recents_split_screen"
   namespace: "systemui"
+1 −2
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ import android.view.ViewGroup
import android.window.RemoteTransition
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.android.systemui.Flags.pssAppSelectorAbruptExitFix
import com.android.systemui.Flags.pssAppSelectorRecentsSplitScreen
import com.android.systemui.display.naturalBounds
import com.android.systemui.mediaprojection.appselector.MediaProjectionAppSelectorResultHandler
@@ -160,7 +159,7 @@ constructor(


    private fun createAnimation(task: RecentTask, view: View): ActivityOptions =
        if (pssAppSelectorAbruptExitFix() && task.isForegroundTask) {
        if (task.isForegroundTask) {
            // When the selected task is in the foreground, the scale up animation doesn't work.
            // We fallback to the default close animation.
            ActivityOptions.makeCustomTaskAnimation(
+2 −17
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import android.view.View
import android.view.ViewGroup
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.Flags.FLAG_PSS_APP_SELECTOR_ABRUPT_EXIT_FIX
import com.android.systemui.Flags.FLAG_PSS_APP_SELECTOR_RECENTS_SPLIT_SCREEN
import com.android.systemui.SysuiTestCase
import com.android.systemui.mediaprojection.appselector.MediaProjectionAppSelectorResultHandler
@@ -141,27 +140,13 @@ class MediaProjectionRecentsViewControllerTest : SysuiTestCase() {
    }

    @Test
    fun onRecentAppClicked_fullScreenTaskInForeground_flagOff_usesScaleUpAnimation() {
        mSetFlagsRule.disableFlags(FLAG_PSS_APP_SELECTOR_ABRUPT_EXIT_FIX)

        controller.onRecentAppClicked(fullScreenTask, taskView)

        assertThat(getStartedTaskActivityOptions(fullScreenTask.taskId).animationType)
            .isEqualTo(ActivityOptions.ANIM_SCALE_UP)
    }

    @Test
    fun onRecentAppClicked_fullScreenTaskInForeground_flagOn_usesDefaultAnimation() {
        mSetFlagsRule.enableFlags(FLAG_PSS_APP_SELECTOR_ABRUPT_EXIT_FIX)
    fun onRecentAppClicked_fullScreenTaskInForeground_usesDefaultAnimation() {
        assertForegroundTaskUsesDefaultCloseAnimation(fullScreenTask)
    }

    @Test
    fun onRecentAppClicked_splitScreenTaskInForeground_flagOn_usesDefaultAnimation() {
        mSetFlagsRule.enableFlags(
            FLAG_PSS_APP_SELECTOR_ABRUPT_EXIT_FIX,
            FLAG_PSS_APP_SELECTOR_RECENTS_SPLIT_SCREEN
        )
        mSetFlagsRule.enableFlags(FLAG_PSS_APP_SELECTOR_RECENTS_SPLIT_SCREEN)
        assertForegroundTaskUsesDefaultCloseAnimation(splitScreenTask)
    }