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

Commit d299a2a6 authored by Alina Zaidi's avatar Alina Zaidi Committed by Android (Google) Code Review
Browse files

Merge "[dw_logging] Use Uid of the base app instead of user id in...

Merge "[dw_logging] Use Uid of the base app instead of user id in DESKTOP_MODE_SESSION_TASK_UPDATE logs." into main
parents ffe1fdf3 2b669cb9
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -65,6 +65,12 @@ public class TaskInfo {
     */
    public int taskId;

    /**
     * The current effective uid of the identity of this task.
     * @hide
     */
    public int effectiveUid;

    /**
     * Whether or not this task has any running activities.
     */
@@ -491,6 +497,7 @@ public class TaskInfo {
    void readFromParcel(Parcel source) {
        userId = source.readInt();
        taskId = source.readInt();
        effectiveUid = source.readInt();
        displayId = source.readInt();
        isRunning = source.readBoolean();
        baseIntent = source.readTypedObject(Intent.CREATOR);
@@ -541,6 +548,7 @@ public class TaskInfo {
    void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(userId);
        dest.writeInt(taskId);
        dest.writeInt(effectiveUid);
        dest.writeInt(displayId);
        dest.writeBoolean(isRunning);
        dest.writeTypedObject(baseIntent, 0);
@@ -589,6 +597,7 @@ public class TaskInfo {
    @Override
    public String toString() {
        return "TaskInfo{userId=" + userId + " taskId=" + taskId
                + " effectiveUid=" + effectiveUid
                + " displayId=" + displayId
                + " isRunning=" + isRunning
                + " baseIntent=" + baseIntent + " baseActivity=" + baseActivity
+1 −1
Original line number Diff line number Diff line
@@ -332,7 +332,7 @@ class DesktopModeLoggerTransitionObserver(
        val positionInParent = taskInfo.positionInParent
        return TaskUpdate(
            instanceId = taskInfo.taskId,
            uid = taskInfo.userId,
            uid = taskInfo.effectiveUid,
            taskHeight = screenBounds.height(),
            taskWidth = screenBounds.width(),
            taskX = positionInParent.x,
+1 −1
Original line number Diff line number Diff line
@@ -715,7 +715,7 @@ class DesktopModeLoggerTransitionObserverTest : ShellTestCase() {
    ) =
        ActivityManager.RunningTaskInfo().apply {
          taskId = id
          userId = uid
          effectiveUid = uid
          configuration.windowConfiguration.apply {
            windowingMode = windowMode
            positionInParent = Point(taskX, taskY)
+1 −0
Original line number Diff line number Diff line
@@ -3330,6 +3330,7 @@ class Task extends TaskFragment {

        info.userId = isLeafTask() ? mUserId : mCurrentUser;
        info.taskId = mTaskId;
        info.effectiveUid = effectiveUid;
        info.displayId = getDisplayId();
        info.displayAreaFeatureId = tda != null ? tda.mFeatureId : FEATURE_UNDEFINED;
        final Intent baseIntent = getBaseIntent();