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

Commit f13aa1d8 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Tweak some logging to make things more readable" into main

parents 22ffb688 90d7497a
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ import android.content.ComponentName;
import android.graphics.Point;
import android.graphics.Rect;
import android.hardware.HardwareBuffer;
import android.os.BinderProxy;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
@@ -1089,7 +1090,12 @@ public final class TransitionInfo implements Parcelable {
        @Override
        public String toString() {
            final StringBuilder sb = new StringBuilder();
            sb.append('{'); sb.append(mContainer);
            sb.append('{');
            if (mContainer != null && !(mContainer.asBinder() instanceof BinderProxy)) {
                // Only log the token if it is not a binder proxy and has additional container info
                sb.append(mContainer);
                sb.append(" ");
            }
            sb.append("m="); sb.append(modeToString(mMode));
            sb.append(" f="); sb.append(flagsToString(mFlags));
            if (mParent != null) {
+4 −3
Original line number Diff line number Diff line
@@ -249,8 +249,9 @@ public class GroupedTaskInfo implements Parcelable {
            return null;
        }
        return "id=" + taskInfo.taskId
                + " baseIntent=" + (taskInfo.baseIntent != null
                        ? taskInfo.baseIntent.getComponent()
                + " baseIntent=" +
                        (taskInfo.baseIntent != null && taskInfo.baseIntent.getComponent() != null
                                ? taskInfo.baseIntent.getComponent().flattenToString()
                                : "null")
                + " winMode=" + WindowConfiguration.windowingModeToString(
                        taskInfo.getWindowingMode());
+13 −3
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ public class RecentTasksController implements TaskStackListenerCallback,
        mTaskSplitBoundsMap.put(taskId1, splitBounds);
        mTaskSplitBoundsMap.put(taskId2, splitBounds);
        notifyRecentTasksChanged();
        ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENT_TASKS, "Add split pair: %d, %d, %s",
        ProtoLog.v(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN, "Add split pair: %d, %d, %s",
                taskId1, taskId2, splitBounds);
        return true;
    }
@@ -221,7 +221,7 @@ public class RecentTasksController implements TaskStackListenerCallback,
            mTaskSplitBoundsMap.remove(taskId);
            mTaskSplitBoundsMap.remove(pairedTaskId);
            notifyRecentTasksChanged();
            ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENT_TASKS, "Remove split pair: %d, %d",
            ProtoLog.v(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN, "Remove split pair: %d, %d",
                    taskId, pairedTaskId);
        }
    }
@@ -234,7 +234,17 @@ public class RecentTasksController implements TaskStackListenerCallback,

        // We could do extra verification of requiring both taskIds of a pair and verifying that
        // the same split bounds object is returned... but meh. Seems unnecessary.
        return mTaskSplitBoundsMap.get(taskId);
        SplitBounds splitBounds = mTaskSplitBoundsMap.get(taskId);
        if (splitBounds != null) {
            ProtoLog.v(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN,
                    "getSplitBoundsForTaskId: taskId=%d splitBoundsTasks=[%d, %d]", taskId,
                    splitBounds.leftTopTaskId, splitBounds.rightBottomTaskId);
        } else {
            ProtoLog.v(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN,
                    "getSplitBoundsForTaskId: expected split bounds for taskId=%d but not found",
                    taskId);
        }
        return splitBounds;
    }

    @Override
+7 −1
Original line number Diff line number Diff line
@@ -1362,7 +1362,11 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
    }

    void clearSplitPairedInRecents(@ExitReason int exitReason) {
        if (!shouldBreakPairedTaskInRecents(exitReason) || !mShouldUpdateRecents) return;
        if (!shouldBreakPairedTaskInRecents(exitReason) || !mShouldUpdateRecents) {
            ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "clearSplitPairedInRecents: skipping reason=%s",
                    !mShouldUpdateRecents ? "shouldn't update" : exitReasonToString(exitReason));
            return;
        }

        ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "clearSplitPairedInRecents: reason=%s",
                exitReasonToString(exitReason));
@@ -1608,6 +1612,8 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
    private void updateRecentTasksSplitPair() {
        // Preventing from single task update while processing recents.
        if (!mShouldUpdateRecents || !mPausingTasks.isEmpty()) {
            ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "updateRecentTasksSplitPair: skipping reason=%s",
                    !mShouldUpdateRecents ? "shouldn't update" : "no pausing tasks");
            return;
        }
        mRecentTasks.ifPresent(recentTasks -> {
+2 −2

File changed.

Contains only whitespace changes.