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

Commit 1c6b752c authored by Hongwei Wang's avatar Hongwei Wang Committed by Automerger Merge Worker
Browse files

Merge "Ignore the negative minWidth/minHeight populated from windowLayout"...

Merge "Ignore the negative minWidth/minHeight populated from windowLayout" into rvc-dev am: 56889eb7 am: cada202d am: c8dfb787

Change-Id: I85084d3f6ca92c48afec2d1803d79f1ce9c72017
parents cdb7a9ff c8dfb787
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ import android.graphics.Rect;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.RemoteException;
import android.util.Log;
import android.util.Size;
import android.view.SurfaceControl;
@@ -541,8 +540,13 @@ public class PipTaskOrganizer extends TaskOrganizer {
            return null;
        }
        final ActivityInfo.WindowLayout windowLayout = activityInfo.windowLayout;
        // -1 will be populated if an activity specifies defaultWidth/defaultHeight in <layout>
        // without minWidth/minHeight
        if (windowLayout.minWidth > 0 && windowLayout.minHeight > 0) {
            return new Size(windowLayout.minWidth, windowLayout.minHeight);
        }
        return null;
    }

    private float getAspectRatioOrDefault(@Nullable PictureInPictureParams params) {
        return params == null