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

Commit 2db50a85 authored by Alex Chau's avatar Alex Chau Committed by Android (Google) Code Review
Browse files

Merge "Avoid adding unnecessary topMargin to TaskThumbnails in DesktopTaskView" into main

parents 191f4de9 fa402d1d
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.desktop.DesktopRecentsTransitionController;
@@ -309,16 +308,7 @@ public class DesktopTaskView extends TaskView {

    @Override
    protected void setThumbnailOrientation(RecentsOrientedState orientationState) {
        DeviceProfile deviceProfile = mContainer.getDeviceProfile();
        int thumbnailTopMargin = deviceProfile.overviewTaskThumbnailTopMarginPx;

        LayoutParams snapshotParams = (LayoutParams) mTaskThumbnailViewDeprecated.getLayoutParams();
        snapshotParams.topMargin = thumbnailTopMargin;

        for (int i = 0; i < mSnapshotViewMap.size(); i++) {
            TaskThumbnailViewDeprecated thumbnailView = mSnapshotViewMap.valueAt(i);
            thumbnailView.setLayoutParams(snapshotParams);
        }
        // no-op
    }

    @Override