Skip to content

Commit d0fb6bf

Browse files
Android10のLight点灯中のTakePhotoの挙動修正
## 更新内容 * Android10のLight点灯中のTakePhotoの挙動修正 1. POST /lightを実行する。 2. POST /mediaStreamRecording/takephotoを実行する。 3. タイムアウトが起こらないこと。 *
1 parent d26d49f commit d0fb6bf

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,6 @@ private void resumeRepeatingRequest() {
593593
startRecording(mRecordingSurface, true);
594594
} else if (mIsPreview) {
595595
startPreview(mPreviewSurface, true);
596-
} else {
597-
close();
598596
}
599597
} catch (CameraWrapperException e) {
600598
if (DEBUG) {

dConnectDevicePlugin/dConnectDeviceHost/app/src/main/java/org/deviceconnect/android/deviceplugin/host/recorder/audio/HostDeviceAudioRecorder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ private void releaseMediaRecorder() {
316316
values.put(MediaStore.Video.Media.TITLE, mFile.getName());
317317
values.put(MediaStore.Video.Media.DISPLAY_NAME, mFile.getName());
318318
values.put(MediaStore.Video.Media.ARTIST, "DeviceConnect");
319-
values.put(MediaStore.Video.Media.MIME_TYPE, AudioConst.FORMAT_TYPE);
319+
values.put(MediaStore.Video.Media.MIME_TYPE, "audio/3gp");
320320
values.put(MediaStore.Video.Media.DATA, mFile.toString());
321321
resolver.insert(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, values);
322322
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public void run() {
170170
setUpMediaRecorder(mOutputFile);
171171
mMediaRecorder.start();
172172
listener.onRecordingStart();
173-
} catch (IOException e) {
173+
} catch (IllegalStateException | IOException e) {
174174
listener.onRecordingStartError(e);
175175
}
176176
}

0 commit comments

Comments
 (0)