|
|
@ -170,8 +170,7 @@ public class CameraView extends FrameLayout { |
|
|
|
protected void onAttachedToWindow() { |
|
|
|
protected void onAttachedToWindow() { |
|
|
|
super.onAttachedToWindow(); |
|
|
|
super.onAttachedToWindow(); |
|
|
|
if (!isInEditMode()) { |
|
|
|
if (!isInEditMode()) { |
|
|
|
WindowManager manager = (WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE); |
|
|
|
mOrientationHelper.enable(getContext()); |
|
|
|
mOrientationHelper.enable(manager.getDefaultDisplay()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -488,14 +487,8 @@ public class CameraView extends FrameLayout { |
|
|
|
|
|
|
|
|
|
|
|
if (checkPermissions(getSessionType())) { |
|
|
|
if (checkPermissions(getSessionType())) { |
|
|
|
mIsStarted = true; |
|
|
|
mIsStarted = true; |
|
|
|
|
|
|
|
|
|
|
|
// Update display orientation for current CameraController
|
|
|
|
// Update display orientation for current CameraController
|
|
|
|
WindowManager manager = (WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE); |
|
|
|
mOrientationHelper.enable(getContext()); |
|
|
|
Display display = manager.getDefaultDisplay(); |
|
|
|
|
|
|
|
if (display != null) { |
|
|
|
|
|
|
|
mOrientationHelper.enable(display); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mCameraController.start(); |
|
|
|
mCameraController.start(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|