Merge "Ignore the negative minWidth/minHeight populated from windowLayout" into rvc-dev am: 56889eb7ba am: cada202dea am: 14e9473d46
Change-Id: I0d561d808b5c7a333e6c1b36d10790e3b8c8a99e
This commit is contained in:
@@ -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,7 +540,12 @@ public class PipTaskOrganizer extends TaskOrganizer {
|
||||
return null;
|
||||
}
|
||||
final ActivityInfo.WindowLayout windowLayout = activityInfo.windowLayout;
|
||||
return new Size(windowLayout.minWidth, windowLayout.minHeight);
|
||||
// -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) {
|
||||
|
||||
Reference in New Issue
Block a user