Skip to content

Commit 525ce94

Browse files
Recorderの状態がPREVIEWとINACTIVE状態以外のときはエラーを返すようにした。
1 parent 43a047f commit 525ce94

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

dConnectDevicePlugin/dConnectDeviceHost/app/src/main/java/org/deviceconnect/android/deviceplugin/host/camera/CameraWrapper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ void notifyEvent(final CameraEvent event) {
9999

100100
private CameraCaptureSession mCaptureSession;
101101

102-
private static volatile boolean mIsTakingStillImage;
102+
private boolean mIsTakingStillImage;
103103

104-
private static volatile boolean mIsPreview;
104+
private boolean mIsPreview;
105105

106-
private static volatile boolean mIsRecording;
106+
private boolean mIsRecording;
107107

108108
private Surface mStillImageSurface;
109109

dConnectDevicePlugin/dConnectDeviceHost/app/src/main/java/org/deviceconnect/android/deviceplugin/host/profile/HostMediaStreamingRecordingProfile.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ private void setOptions(final Intent request, final Intent response) {
218218
return;
219219
}
220220

221-
if (recorder.getState() != HostMediaRecorder.RecorderState.INACTTIVE) {
221+
if (recorder.getState() != HostMediaRecorder.RecorderState.INACTIVE
222+
&& recorder.getState() != HostMediaRecorder.RecorderState.PREVIEW) {
222223
MessageUtils.setInvalidRequestParameterError(response, "settings of active target cannot be changed.");
223224
return;
224225
}

0 commit comments

Comments
 (0)