Loading InCallUI/src/com/android/incallui/VideoCallFragment.java +6 −1 Original line number Diff line number Diff line Loading @@ -858,7 +858,12 @@ public class VideoCallFragment extends BaseFragment<VideoCallPresenter, Log.d(this, "inflateVideoCallViews: sVideoSurfacesInUse=" + sVideoSurfacesInUse); //If peer adjusted screen size is not available, set screen size to default display size Point screenSize = sDisplaySize == null ? getScreenSize() : sDisplaySize; Point screenSize = getScreenSize(); if (sDisplaySize != null) { screenSize = VideoCallPresenter.resizeForAspectRatio(screenSize, sDisplaySize.x, sDisplaySize.y); } setSurfaceSizeAndTranslation(displaySurface, screenSize); if (!sVideoSurfacesInUse) { Loading InCallUI/src/com/android/incallui/VideoCallPresenter.java +7 −1 Original line number Diff line number Diff line Loading @@ -1220,6 +1220,12 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi Point size = ui.getScreenSize(); Log.v(this, "setDisplayVideoSize: windowmgr width=" + size.x + " windowmgr height=" + size.y); size = resizeForAspectRatio(size, width, height); ui.setDisplayVideoSize(size.x, size.y); } public static Point resizeForAspectRatio(Point inSize, int width, int height) { Point size = new Point(inSize); if (size.y * width > size.x * height) { // current display height is too much. Correct it size.y = (int) (size.x * height / width); Loading @@ -1227,7 +1233,7 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi // current display width is too much. Correct it size.x = (int) (size.y * width / height); } ui.setDisplayVideoSize(size.x, size.y); return size; } /** Loading Loading
InCallUI/src/com/android/incallui/VideoCallFragment.java +6 −1 Original line number Diff line number Diff line Loading @@ -858,7 +858,12 @@ public class VideoCallFragment extends BaseFragment<VideoCallPresenter, Log.d(this, "inflateVideoCallViews: sVideoSurfacesInUse=" + sVideoSurfacesInUse); //If peer adjusted screen size is not available, set screen size to default display size Point screenSize = sDisplaySize == null ? getScreenSize() : sDisplaySize; Point screenSize = getScreenSize(); if (sDisplaySize != null) { screenSize = VideoCallPresenter.resizeForAspectRatio(screenSize, sDisplaySize.x, sDisplaySize.y); } setSurfaceSizeAndTranslation(displaySurface, screenSize); if (!sVideoSurfacesInUse) { Loading
InCallUI/src/com/android/incallui/VideoCallPresenter.java +7 −1 Original line number Diff line number Diff line Loading @@ -1220,6 +1220,12 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi Point size = ui.getScreenSize(); Log.v(this, "setDisplayVideoSize: windowmgr width=" + size.x + " windowmgr height=" + size.y); size = resizeForAspectRatio(size, width, height); ui.setDisplayVideoSize(size.x, size.y); } public static Point resizeForAspectRatio(Point inSize, int width, int height) { Point size = new Point(inSize); if (size.y * width > size.x * height) { // current display height is too much. Correct it size.y = (int) (size.x * height / width); Loading @@ -1227,7 +1233,7 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi // current display width is too much. Correct it size.x = (int) (size.y * width / height); } ui.setDisplayVideoSize(size.x, size.y); return size; } /** Loading