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

Commit 66213581 authored by Priyanka Advani (xWF)'s avatar Priyanka Advani (xWF) Committed by Android (Google) Code Review
Browse files

Merge "Revert "Add DesktopModeTouchEventListener tests"" into main

parents 21064fe5 42ae1f2f
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -200,7 +200,6 @@ import com.android.wm.shell.windowdecor.WindowDecorViewModel;
import com.android.wm.shell.windowdecor.additionalviewcontainer.AdditionalSystemViewContainer;
import com.android.wm.shell.windowdecor.common.AppHandleAndHeaderVisibilityHelper;
import com.android.wm.shell.windowdecor.common.WindowDecorTaskResourceLoader;
import com.android.wm.shell.windowdecor.common.WindowDecorTaskResourceLoaderImpl;
import com.android.wm.shell.windowdecor.common.viewhost.DefaultWindowDecorViewHostSupplier;
import com.android.wm.shell.windowdecor.common.viewhost.PooledWindowDecorViewHostSupplier;
import com.android.wm.shell.windowdecor.common.viewhost.WindowDecorViewHost;
@@ -1340,9 +1339,8 @@ public abstract class WMShellModule {
            @ShellBackgroundThread MainCoroutineDispatcher bgDispatcher,
            @NonNull ShellCommandHandler shellCommandHandler,
            @NonNull UserProfileContexts userProfileContexts) {
        return new WindowDecorTaskResourceLoaderImpl(context, shellInit, shellController,
                mainHandler, mainScope, mainDispatcher, bgDispatcher, shellCommandHandler,
                userProfileContexts);
        return new WindowDecorTaskResourceLoader(context, shellInit, shellController, mainHandler,
                mainScope, mainDispatcher, bgDispatcher, shellCommandHandler, userProfileContexts);
    }

    @WMSingleton
+0 −847

File deleted.

Preview size limit exceeded, changes collapsed.

+778 −1

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ import com.android.wm.shell.freeform.FreeformTaskTransitionStarter;
/**
 * Utility class to handle task operations performed on a window decoration.
 */
public class TaskOperations {
class TaskOperations {
    private static final String TAG = "TaskOperations";

    private final FreeformTaskTransitionStarter mTransitionStarter;
+2 −17
Original line number Diff line number Diff line
@@ -42,12 +42,10 @@ import android.window.DesktopExperienceFlags
import android.window.TaskConstants
import android.window.WindowContainerTransaction
import com.android.app.tracing.traceSection
import com.android.internal.protolog.ProtoLog
import com.android.wm.shell.ShellTaskOrganizer
import com.android.wm.shell.common.BoxShadowHelper
import com.android.wm.shell.common.DisplayController
import com.android.wm.shell.common.DisplayController.OnDisplaysChangedListener
import com.android.wm.shell.protolog.ShellProtoLogGroup
import com.android.wm.shell.shared.annotations.ShellMainThread
import com.android.wm.shell.windowdecor.caption.CaptionController
import com.android.wm.shell.windowdecor.extension.getDimensionPixelSize
@@ -162,7 +160,6 @@ abstract class WindowDecoration2<T>(
            traceTag = Trace.TRACE_TAG_WINDOW_MANAGER,
            name = "WindowDecoration2#relayout",
        ) {
            logD("relayout(task=%d) startT=%d finishT=%d", taskInfo.taskId, startT.id, finishT.id)
            taskInfo = params.runningTaskInfo
            hasGlobalFocus = params.hasGlobalFocus
            exclusionRegion.set(params.displayExclusionRegion)
@@ -186,7 +183,6 @@ abstract class WindowDecoration2<T>(
                if (params.setTaskVisibilityPositionAndCrop) {
                    finishT.hide(taskSurface)
                }
                logD("relayout(task=%d) invisible task, skipping", taskInfo.taskId)
                return null
            }

@@ -194,10 +190,7 @@ abstract class WindowDecoration2<T>(

            // If display has not yet appeared, return. Relayout will run again once display is
            // registered
            if (display == null) {
                logD("relayout(task=%d) null display, skipping", taskInfo.taskId)
                return null
            }
            display ?: return null

            val taskBounds = taskInfo.getConfiguration().windowConfiguration.bounds
            val taskWidth = taskBounds.width()
@@ -250,11 +243,7 @@ abstract class WindowDecoration2<T>(
                )
            }

            val controller = getOrCreateCaptionController(params.captionType)
            if (controller == null) {
                logD("relayout(task=%d) null caption controller, skipping", taskInfo.taskId)
                return null
            }
            val controller = getOrCreateCaptionController(params.captionType) ?: return null
            val captionResult =
                controller.relayout(
                    params = params,
@@ -428,10 +417,6 @@ abstract class WindowDecoration2<T>(
        startT.setWindowCrop(containerSurface, taskWidth, taskHeight).show(containerSurface)
    }

    private fun logD(msg: String, vararg arguments: Any?) {
        ProtoLog.d(ShellProtoLogGroup.WM_SHELL_WINDOW_DECORATION, "%s: $msg", TAG, *arguments)
    }

    private fun releaseViewsIfNeeded(params: RelayoutParams, wct: WindowContainerTransaction) =
        traceSection(
            traceTag = Trace.TRACE_TAG_WINDOW_MANAGER,
Loading