Skip to content

Commit

Permalink
Fixed scaling issues in the SurfaceView backing
Browse files Browse the repository at this point in the history
  • Loading branch information
brianwernick committed Feb 19, 2017
1 parent a563bec commit f4e45f1
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewTreeObserver;
Expand Down Expand Up @@ -259,16 +258,7 @@ protected boolean updateVideoSize(int width, int height) {
videoSize.x = width;
videoSize.y = height;

if (width == 0 || height == 0) {
return false;
}

SurfaceHolder holder = getHolder();
if (holder != null) {
holder.setFixedSize(width, height);
}

return true;
return !(width == 0 || height == 0);
}

/**
Expand Down

0 comments on commit f4e45f1

Please sign in to comment.