import camera from "@ohos.multimedia.camera"; import display from "@ohos.display"; import { Size } from './Size'; import { Scene } from './TypeDefine'; import { CameraErrorImpl } from './internal/CameraErrorImpl'; import HashSet from "@ohos.util.HashSet"; import hilog from '@ohos.hilog'; export function convertSceneType(p22) { if (p22 == Scene.PHOTO) { return camera.SceneMode.NORMAL_PHOTO; } return camera.SceneMode.NORMAL_VIDEO; } export function getFullScreenSize() { let n22 = display.getDefaultDisplaySync(); let o22 = new Size(n22.width, n22.height); return o22; } export function printErrorDetail(g22, h22, i22) { let j22 = g22; let k22 = h22 == undefined ? j22.name : h22; let l22 = i22 == undefined ? j22.message : i22; let m22 = new CameraErrorImpl(k22, l22, j22.code, j22.stack); hilog.error(0x0000, "CameraX", `printErrorDetail: ${JSON.stringify(m22)}`); return m22; } export function convertIteratorToSet(d22) { let e22 = new HashSet(); let f22 = d22.next().value; while (f22 !== undefined) { e22.add(f22); f22 = d22.next().value; } return e22; } export function getHashMapValueSet(c22) { return convertIteratorToSet(c22.values()); } export function getHashMapKeySet(b22) { return convertIteratorToSet(b22.keys()); } 