From e98081a6410a8dc9a2f5028dcad3f9eddbeb2691 Mon Sep 17 00:00:00 2001 From: yygxr Date: Thu, 13 Oct 2022 02:09:32 -0700 Subject: [PATCH] fix session xts case error Signed-off-by: yygxr --- .../MainAbility/test/CameraSessionBaseTest.test.ets | 12 ++++++------ .../test/CameraSessionExposureTest.test.ets | 12 ++++++------ .../MainAbility/test/CameraSessionFlashTest.test.ets | 12 ++++++------ .../MainAbility/test/CameraSessionFocusTest.test.ets | 12 ++++++------ .../CameraSessionVideoStabilizationTest.test.ets | 12 ++++++------ .../test/CameraSessionZoomRatioTest.test.ets | 12 ++++++------ 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionBaseTest.test.ets b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionBaseTest.test.ets index 4fa577301..af9e55aad 100755 --- a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionBaseTest.test.ets +++ b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionBaseTest.test.ets @@ -386,8 +386,8 @@ export default function cameraSessionTest(surfaceId: any) { let cameraOutputCap = await mCameraManager.getSupportedOutputCapability(mCameraDevicesArray[i]); if (!isEmpty(cameraOutputCap.previewProfiles)) { console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length); - for (let i = 0; i< cameraOutputCap.previewProfiles.length; i++) { - mPreviewOutputArray[i] = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], surfaceId); + for (let j = 0; j < cameraOutputCap.previewProfiles.length; j++) { + mPreviewOutputArray[i] = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[j], surfaceId); if (!isEmpty(mPreviewOutputArray[i])) { break; } @@ -401,8 +401,8 @@ export default function cameraSessionTest(surfaceId: any) { if (!isEmpty(cameraOutputCap.photoProfiles)) { console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length); - for (let i = 0; i < cameraOutputCap.photoProfiles.length; i++) { - mPhotoOutputArray[i] = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhoteSurface); + for (let j = 0; j < cameraOutputCap.photoProfiles.length; j++) { + mPhotoOutputArray[i] = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[j], mPhoteSurface); if (!isEmpty(mPhotoOutputArray[i])) { break; } @@ -417,8 +417,8 @@ export default function cameraSessionTest(surfaceId: any) { if (!isEmpty(cameraOutputCap.videoProfiles)) { console.info(TAG + "cameraOutputCap.videoProfiles.length: " + cameraOutputCap.videoProfiles.length); - for (let i = 0; i < cameraOutputCap.videoProfiles.length; i++) { - mVideoOutputArray[i] = await mCameraManager.createVideoOutput(cameraOutputCap.videoProfiles[i], mVideoSurface); + for (let j = 0; j < cameraOutputCap.videoProfiles.length; j++) { + mVideoOutputArray[i] = await mCameraManager.createVideoOutput(cameraOutputCap.videoProfiles[j], mVideoSurface); if (!isEmpty(mVideoOutputArray[i])) { break; } diff --git a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionExposureTest.test.ets b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionExposureTest.test.ets index f0a8e7562..84b2754b3 100755 --- a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionExposureTest.test.ets +++ b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionExposureTest.test.ets @@ -432,8 +432,8 @@ export default function cameraSessionExposureTest(surfaceId: any) { let cameraOutputCap = await mCameraManager.getSupportedOutputCapability(mCameraDevicesArray[i]); if (!isEmpty(cameraOutputCap.previewProfiles)) { console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length); - for (let i = 0; i< cameraOutputCap.previewProfiles.length; i++) { - mPreviewOutputArray[i] = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], surfaceId); + for (let j = 0; j < cameraOutputCap.previewProfiles.length; j++) { + mPreviewOutputArray[i] = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[j], surfaceId); if (!isEmpty(mPreviewOutputArray[i])) { break; } @@ -447,8 +447,8 @@ export default function cameraSessionExposureTest(surfaceId: any) { if (!isEmpty(cameraOutputCap.photoProfiles)) { console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length); - for (let i = 0; i < cameraOutputCap.photoProfiles.length; i++) { - mPhotoOutputArray[i] = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhoteSurface); + for (let j = 0; j < cameraOutputCap.photoProfiles.length; j++) { + mPhotoOutputArray[i] = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[j], mPhoteSurface); if (!isEmpty(mPhotoOutputArray[i])) { break; } @@ -463,8 +463,8 @@ export default function cameraSessionExposureTest(surfaceId: any) { if (!isEmpty(cameraOutputCap.videoProfiles)) { console.info(TAG + "cameraOutputCap.videoProfiles.length: " + cameraOutputCap.videoProfiles.length); - for (let i = 0; i < cameraOutputCap.videoProfiles.length; i++) { - mVideoOutputArray[i] = await mCameraManager.createVideoOutput(cameraOutputCap.videoProfiles[i], mVideoSurface); + for (let j = 0; j < cameraOutputCap.videoProfiles.length; j++) { + mVideoOutputArray[i] = await mCameraManager.createVideoOutput(cameraOutputCap.videoProfiles[j], mVideoSurface); if (!isEmpty(mVideoOutputArray[i])) { break; } diff --git a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFlashTest.test.ets b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFlashTest.test.ets index 7efc3ba6a..e919801f6 100755 --- a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFlashTest.test.ets +++ b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFlashTest.test.ets @@ -383,8 +383,8 @@ export default function cameraSessionFlashTest(surfaceId: any) { let cameraOutputCap = await mCameraManager.getSupportedOutputCapability(mCameraDevicesArray[i]); if (!isEmpty(cameraOutputCap.previewProfiles)) { console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length); - for (let i = 0; i< cameraOutputCap.previewProfiles.length; i++) { - mPreviewOutputArray[i] = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], surfaceId); + for (let j = 0; j < cameraOutputCap.previewProfiles.length; j++) { + mPreviewOutputArray[i] = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[j], surfaceId); if (!isEmpty(mPreviewOutputArray[i])) { break; } @@ -398,8 +398,8 @@ export default function cameraSessionFlashTest(surfaceId: any) { if (!isEmpty(cameraOutputCap.photoProfiles)) { console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length); - for (let i = 0; i < cameraOutputCap.photoProfiles.length; i++) { - mPhotoOutputArray[i] = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhoteSurface); + for (let j = 0; j < cameraOutputCap.photoProfiles.length; j++) { + mPhotoOutputArray[i] = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[j], mPhoteSurface); if (!isEmpty(mPhotoOutputArray[i])) { break; } @@ -414,8 +414,8 @@ export default function cameraSessionFlashTest(surfaceId: any) { if (!isEmpty(cameraOutputCap.videoProfiles)) { console.info(TAG + "cameraOutputCap.videoProfiles.length: " + cameraOutputCap.videoProfiles.length); - for (let i = 0; i < cameraOutputCap.videoProfiles.length; i++) { - mVideoOutputArray[i] = await mCameraManager.createVideoOutput(cameraOutputCap.videoProfiles[i], mVideoSurface); + for (let j = 0; j < cameraOutputCap.videoProfiles.length; j++) { + mVideoOutputArray[i] = await mCameraManager.createVideoOutput(cameraOutputCap.videoProfiles[j], mVideoSurface); if (!isEmpty(mVideoOutputArray[i])) { break; } diff --git a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFocusTest.test.ets b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFocusTest.test.ets index 49b98d0de..6a80372db 100755 --- a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFocusTest.test.ets +++ b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFocusTest.test.ets @@ -428,8 +428,8 @@ export default function cameraSessionFocusTest(surfaceId: any) { let cameraOutputCap = await mCameraManager.getSupportedOutputCapability(mCameraDevicesArray[i]); if (!isEmpty(cameraOutputCap.previewProfiles)) { console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length); - for (let i = 0; i< cameraOutputCap.previewProfiles.length; i++) { - mPreviewOutputArray[i] = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], surfaceId); + for (let j = 0; j < cameraOutputCap.previewProfiles.length; j++) { + mPreviewOutputArray[i] = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[j], surfaceId); if (!isEmpty(mPreviewOutputArray[i])) { break; } @@ -443,8 +443,8 @@ export default function cameraSessionFocusTest(surfaceId: any) { if (!isEmpty(cameraOutputCap.photoProfiles)) { console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length); - for (let i = 0; i < cameraOutputCap.photoProfiles.length; i++) { - mPhotoOutputArray[i] = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhoteSurface); + for (let j = 0; j < cameraOutputCap.photoProfiles.length; j++) { + mPhotoOutputArray[i] = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[j], mPhoteSurface); if (!isEmpty(mPhotoOutputArray[i])) { break; } @@ -459,8 +459,8 @@ export default function cameraSessionFocusTest(surfaceId: any) { if (!isEmpty(cameraOutputCap.videoProfiles)) { console.info(TAG + "cameraOutputCap.videoProfiles.length: " + cameraOutputCap.videoProfiles.length); - for (let i = 0; i < cameraOutputCap.videoProfiles.length; i++) { - mVideoOutputArray[i] = await mCameraManager.createVideoOutput(cameraOutputCap.videoProfiles[i], mVideoSurface); + for (let j = 0; j < cameraOutputCap.videoProfiles.length; j++) { + mVideoOutputArray[i] = await mCameraManager.createVideoOutput(cameraOutputCap.videoProfiles[j], mVideoSurface); if (!isEmpty(mVideoOutputArray[i])) { break; } diff --git a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionVideoStabilizationTest.test.ets b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionVideoStabilizationTest.test.ets index 332d647ff..e8f60a687 100755 --- a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionVideoStabilizationTest.test.ets +++ b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionVideoStabilizationTest.test.ets @@ -381,8 +381,8 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) { let cameraOutputCap = await mCameraManager.getSupportedOutputCapability(mCameraDevicesArray[i]); if (!isEmpty(cameraOutputCap.previewProfiles)) { console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length); - for (let i = 0; i< cameraOutputCap.previewProfiles.length; i++) { - mPreviewOutputArray[i] = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], surfaceId); + for (let j = 0; j < cameraOutputCap.previewProfiles.length; j++) { + mPreviewOutputArray[i] = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[j], surfaceId); if (!isEmpty(mPreviewOutputArray[i])) { break; } @@ -396,8 +396,8 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) { if (!isEmpty(cameraOutputCap.photoProfiles)) { console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length); - for (let i = 0; i < cameraOutputCap.photoProfiles.length; i++) { - mPhotoOutputArray[i] = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhoteSurface); + for (let j = 0; j < cameraOutputCap.photoProfiles.length; j++) { + mPhotoOutputArray[i] = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[j], mPhoteSurface); if (!isEmpty(mPhotoOutputArray[i])) { break; } @@ -412,8 +412,8 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) { if (!isEmpty(cameraOutputCap.videoProfiles)) { console.info(TAG + "cameraOutputCap.videoProfiles.length: " + cameraOutputCap.videoProfiles.length); - for (let i = 0; i < cameraOutputCap.videoProfiles.length; i++) { - mVideoOutputArray[i] = await mCameraManager.createVideoOutput(cameraOutputCap.videoProfiles[i], mVideoSurface); + for (let j = 0; j < cameraOutputCap.videoProfiles.length; j++) { + mVideoOutputArray[i] = await mCameraManager.createVideoOutput(cameraOutputCap.videoProfiles[j], mVideoSurface); if (!isEmpty(mVideoOutputArray[i])) { break; } diff --git a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionZoomRatioTest.test.ets b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionZoomRatioTest.test.ets index c819950c9..c1945c998 100755 --- a/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionZoomRatioTest.test.ets +++ b/multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionZoomRatioTest.test.ets @@ -385,8 +385,8 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) { let cameraOutputCap = await mCameraManager.getSupportedOutputCapability(mCameraDevicesArray[i]); if (!isEmpty(cameraOutputCap.previewProfiles)) { console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length); - for (let i = 0; i< cameraOutputCap.previewProfiles.length; i++) { - mPreviewOutputArray[i] = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], surfaceId); + for (let j = 0; j < cameraOutputCap.previewProfiles.length; j++) { + mPreviewOutputArray[i] = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[j], surfaceId); if (!isEmpty(mPreviewOutputArray[i])) { break; } @@ -400,8 +400,8 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) { if (!isEmpty(cameraOutputCap.photoProfiles)) { console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length); - for (let i = 0; i < cameraOutputCap.photoProfiles.length; i++) { - mPhotoOutputArray[i] = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhoteSurface); + for (let j = 0; j < cameraOutputCap.photoProfiles.length; j++) { + mPhotoOutputArray[i] = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[j], mPhoteSurface); if (!isEmpty(mPhotoOutputArray[i])) { break; } @@ -416,8 +416,8 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) { if (!isEmpty(cameraOutputCap.videoProfiles)) { console.info(TAG + "cameraOutputCap.videoProfiles.length: " + cameraOutputCap.videoProfiles.length); - for (let i = 0; i < cameraOutputCap.videoProfiles.length; i++) { - mVideoOutputArray[i] = await mCameraManager.createVideoOutput(cameraOutputCap.videoProfiles[i], mVideoSurface); + for (let j = 0; j < cameraOutputCap.videoProfiles.length; j++) { + mVideoOutputArray[i] = await mCameraManager.createVideoOutput(cameraOutputCap.videoProfiles[j], mVideoSurface); if (!isEmpty(mVideoOutputArray[i])) { break; } -- GitLab