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

Commit cada202d 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

Change-Id: If15a2bd1d5c0ba1ea448f1132fa16cf75db8b8dd
parents dc0fdfbf 56889eb7
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