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

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

Merge "Add TS flag to control auto task stack controller in WMShell" into main

parents 3e2ffa78 4a8f422a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -173,7 +173,6 @@ android_library {
        "//frameworks/base/packages/SystemUI/aconfig:com_android_systemui_flags_lib",
        "//frameworks/libs/systemui:com_android_systemui_shared_flags_lib",
        "//frameworks/libs/systemui:iconloader_base",
        "//packages/apps/Car/SystemUI/aconfig:com_android_systemui_car_flags_lib",
        "PlatformAnimationLib",
        "WindowManager-Shell-lite-proto",
        "WindowManager-Shell-proto",
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ aconfig_declarations {
    container: "system",
    srcs: [
        "multitasking.aconfig",
        "automotive.aconfig",
    ],
}

+11 −0
Original line number Diff line number Diff line
# proto-file: build/make/tools/aconfig/aconfig_protos/protos/aconfig.proto

package: "com.android.wm.shell"
container: "system"

flag {
    name: "enable_auto_task_stack_controller"
    namespace: "multitasking"
    description: "Enables auto task stack controller to manage task stacks on automotive"
    bug: "384082238"
}
+5 −5
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ import android.view.WindowManager.TRANSIT_CHANGE
import android.window.TransitionInfo
import android.window.TransitionRequestInfo
import android.window.WindowContainerTransaction
import com.android.systemui.car.Flags.autoTaskStackWindowing
import com.android.wm.shell.Flags.enableAutoTaskStackController
import com.android.wm.shell.RootTaskDisplayAreaOrganizer
import com.android.wm.shell.ShellTaskOrganizer
import com.android.wm.shell.common.ShellExecutor
@@ -66,7 +66,7 @@ class AutoTaskStackControllerImpl @Inject constructor(
    private val defaultRootTaskPerDisplay = mutableMapOf<Int, Int>()

    init {
        if (!autoTaskStackWindowing()) {
        if (!enableAutoTaskStackController()) {
            throw IllegalStateException("Failed to initialize" +
                    "AutoTaskStackController as the auto_task_stack_windowing TS flag is disabled.")
        } else {
@@ -220,7 +220,7 @@ class AutoTaskStackControllerImpl @Inject constructor(
        displayId: Int,
        listener: RootTaskStackListener
    ) {
        if (!autoTaskStackWindowing()) {
        if (!enableAutoTaskStackController()) {
            Slog.e(
                TAG, "Failed to create root task stack as the " +
                        "auto_task_stack_windowing TS flag is disabled."
@@ -236,7 +236,7 @@ class AutoTaskStackControllerImpl @Inject constructor(
    }

    override fun setDefaultRootTaskStackOnDisplay(displayId: Int, rootTaskStackId: Int?) {
        if (!autoTaskStackWindowing()) {
        if (!enableAutoTaskStackController()) {
            Slog.e(
                TAG, "Failed to set default root task stack as the " +
                        "auto_task_stack_windowing TS flag is disabled."
@@ -280,7 +280,7 @@ class AutoTaskStackControllerImpl @Inject constructor(
    }

    override fun startTransition(transaction: AutoTaskStackTransaction): IBinder? {
        if (!autoTaskStackWindowing()) {
        if (!enableAutoTaskStackController()) {
            Slog.e(
                TAG, "Failed to start transaction as the " +
                        "auto_task_stack_windowing TS flag is disabled."