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

Commit 0733b2e9 authored by Daichi Hirono's avatar Daichi Hirono
Browse files

Fix the format of argument name comments

This CL updates the format of argument name comments.

The following command is used to find comments to be fixed:

  rg '/\*\s+\w+\s+\*/' \
    -g "**/desktopmode/**" \
    -g "!src/com/android/wm/shell/desktopmode/DesktopModeEventLogger.kt" \
    -g "!tests/unittest/src/com/android/wm/shell/desktopmode/DesktopModeEventLoggerTest.kt"

The comments are then replaced with the `/* name= */ value` style, or
Kotlin's named arguments.

Some comments in DesktopModeEventLogger.kt and
DesktopModeEventLoggerTest.kt are unchanged. This is because the proto
binding generator gives arguments less meaningful names like `arg0`.
Using `/* name= */ value` style comments with inconsistent names
resulted in warnings in the IDE.

Bug: None
Test: None
Flag: DOCS_ONLY
Change-Id: I626ee944b13f99ccd4b23536c21fd1aac3ece08f
parent 26d9bbd3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -339,7 +339,7 @@ class DesktopImmersiveController(
                        .setWindowCrop(leash, endBounds.width(), endBounds.height())
                        .apply()
                    onTaskResizeAnimationListener?.onAnimationEnd(taskId)
                    finishCallback.onTransitionFinished(null /* wct */)
                    finishCallback.onTransitionFinished(/* wct= */ null)
                }
            )
            addUpdateListener { animation ->
+1 −1
Original line number Diff line number Diff line
@@ -306,7 +306,7 @@ class DesktopModeEventLogger {
    fun logTaskInfoStateInit() {
        logTaskUpdate(
            FrameworkStatsLog.DESKTOP_MODE_SESSION_TASK_UPDATE__TASK_EVENT__TASK_INIT_STATSD,
            /* session_id */ 0,
            sessionId = 0,
            TaskUpdate(
                visibleTaskCount = 0,
                instanceId = 0,
+2 −2
Original line number Diff line number Diff line
@@ -274,7 +274,7 @@ public class DesktopModeVisualIndicator {
        lp.inputFeatures |= INPUT_FEATURE_NO_INPUT_CHANNEL;
        final WindowlessWindowManager windowManager = new WindowlessWindowManager(
                mTaskInfo.configuration, mLeash,
                null /* hostInputToken */);
                /* hostInputToken= */ null);
        mViewHost = new SurfaceControlViewHost(mContext,
                mDisplayController.getDisplay(mTaskInfo.displayId), windowManager,
                "DesktopModeVisualIndicator");
@@ -338,7 +338,7 @@ public class DesktopModeVisualIndicator {
        if (mCurrentType == NO_INDICATOR) {
            fadeInIndicator(newType);
        } else if (newType == NO_INDICATOR) {
            fadeOutIndicator(null /* finishCallback */);
            fadeOutIndicator(/* finishCallback= */ null);
        } else {
            final VisualIndicatorAnimator animator = VisualIndicatorAnimator.animateIndicatorType(
                    mView, mDisplayController.getDisplayLayout(mTaskInfo.displayId), mCurrentType,
+8 −8
Original line number Diff line number Diff line
@@ -758,7 +758,7 @@ class DesktopTasksController(
            return
        }
        val wct = WindowContainerTransaction()
        wct.reorder(taskInfo.token, true /* onTop */, true /* includingParents */)
        wct.reorder(taskInfo.token, /* onTop= */ true, /* includingParents= */ true)
        startLaunchTransition(
            transitionType = TRANSIT_TO_FRONT,
            wct = wct,
@@ -880,7 +880,7 @@ class DesktopTasksController(
        } else if (Flags.enableMoveToNextDisplayShortcut()) {
            applyFreeformDisplayChange(wct, task, displayId)
        }
        wct.reparent(task.token, displayAreaInfo.token, true /* onTop */)
        wct.reparent(task.token, displayAreaInfo.token, /* onTop= */ true)
        if (Flags.enableDisplayFocusInShellTransitions()) {
            // Bring the destination display to top with includingParents=true, so that the
            // destination display gains the display focus, which makes the top task in the display
@@ -892,7 +892,7 @@ class DesktopTasksController(
            performDesktopExitCleanupIfNeeded(task.taskId, task.displayId, wct)
        }

        transitions.startTransition(TRANSIT_CHANGE, wct, null /* handler */)
        transitions.startTransition(TRANSIT_CHANGE, wct, /* handler= */ null)
    }

    /**
@@ -1645,7 +1645,7 @@ class DesktopTasksController(
                requestedTaskId,
                splitPosition,
                options.toBundle(),
                null, /* hideTaskToken */
                /* hideTaskToken= */ null,
            )
        }
    }
@@ -1682,8 +1682,8 @@ class DesktopTasksController(
                    fillIn,
                    splitPosition,
                    options.toBundle(),
                    null /* hideTaskToken */,
                    true /* forceLaunchNewTask */,
                    /* hideTaskToken= */ null,
                    /* forceLaunchNewTask= */ true,
                    splitIndex,
                )
            }
@@ -1934,7 +1934,7 @@ class DesktopTasksController(
            wct.setBounds(taskInfo.token, initialBounds)
        }
        wct.setWindowingMode(taskInfo.token, targetWindowingMode)
        wct.reorder(taskInfo.token, true /* onTop */)
        wct.reorder(taskInfo.token, /* onTop= */ true)
        if (useDesktopOverrideDensity()) {
            wct.setDensityDpi(taskInfo.token, DESKTOP_DENSITY_OVERRIDE)
        }
@@ -2757,7 +2757,7 @@ class DesktopTasksController(
                controller,
                "visibleTaskCount",
                { controller -> result[0] = controller.visibleTaskCount(displayId) },
                true, /* blocking */
                /* blocking= */ true,
            )
            return result[0]
        }
+1 −1
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ class DesktopTasksLimiter(
        // If it's a running task, reorder it to back.
        taskIdToMinimize
            ?.let { shellTaskOrganizer.getRunningTaskInfo(it) }
            ?.let { wct.reorder(it.token, false /* onTop */) }
            ?.let { wct.reorder(it.token, /* onTop= */ false) }
        return taskIdToMinimize
    }

Loading