|
|
|
@ -21,6 +21,7 @@ import android.support.annotation.NonNull; |
|
|
|
|
import android.support.annotation.Nullable; |
|
|
|
|
import android.util.AttributeSet; |
|
|
|
|
import android.util.Log; |
|
|
|
|
import android.view.Display; |
|
|
|
|
import android.view.MotionEvent; |
|
|
|
|
import android.view.ViewGroup; |
|
|
|
|
import android.view.WindowManager; |
|
|
|
@ -462,6 +463,14 @@ public class CameraView extends FrameLayout { |
|
|
|
|
|
|
|
|
|
if (checkPermissions(getSessionType())) { |
|
|
|
|
mIsStarted = true; |
|
|
|
|
|
|
|
|
|
// Update display orientation for current CameraController
|
|
|
|
|
WindowManager manager = (WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE); |
|
|
|
|
Display display = manager.getDefaultDisplay(); |
|
|
|
|
if (display != null) { |
|
|
|
|
mOrientationHelper.enable(display); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
mCameraController.start(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|