diff --git a/packages/camera/camera_ohos/ohos/src/main/ets/io/flutter/plugins/camera/CameraState.ets b/packages/camera/camera_ohos/ohos/src/main/ets/io/flutter/plugins/camera/CameraState.ets index 8a2c23089f36afeb7afcfa2771b42052055732ee..9b6b39b82152a73d101fbaa5e934c53fabb96ff3 100644 --- a/packages/camera/camera_ohos/ohos/src/main/ets/io/flutter/plugins/camera/CameraState.ets +++ b/packages/camera/camera_ohos/ohos/src/main/ets/io/flutter/plugins/camera/CameraState.ets @@ -5,18 +5,23 @@ // Copyright 2013 The Flutter Authors. export enum CameraState { + // Avoid repetition /** Idle, showing preview and not capturing anything. */ STATE_PREVIEW, + // Avoid repetition /** Starting and waiting for autofocus to complete. */ STATE_WAITING_FOCUS, + // Avoid repetition /** Start performing autoexposure. */ STATE_WAITING_PRECAPTURE_START, + // Avoid repetition /** waiting for autoexposure to complete. */ STATE_WAITING_PRECAPTURE_DONE, + // Avoid repetition /** Capturing an image. */ STATE_CAPTURING, } \ No newline at end of file diff --git a/packages/camera/camera_ohos/ohos/src/main/ets/io/flutter/plugins/camera/features/CameraFeatureFactory.ets b/packages/camera/camera_ohos/ohos/src/main/ets/io/flutter/plugins/camera/features/CameraFeatureFactory.ets index ffd3fb0aecf776d5e82dd8425221234f78217cd8..a635236a14ed3acab02729609176a861d5fc04d2 100644 --- a/packages/camera/camera_ohos/ohos/src/main/ets/io/flutter/plugins/camera/features/CameraFeatureFactory.ets +++ b/packages/camera/camera_ohos/ohos/src/main/ets/io/flutter/plugins/camera/features/CameraFeatureFactory.ets @@ -26,8 +26,8 @@ export interface CameraFeatureFactory { /** * Creates a new instance of the auto focus feature. * - * @param cameraProperties instance of the CameraProperties class containing information about the - * cameras features. + * @param cameraProperties instance of the CameraProperties class containing information + * about the cameras features. * @param recordingVideo indicates if the camera is currently recording. * @return newly created instance of the AutoFocusFeature class. */ @@ -36,8 +36,8 @@ export interface CameraFeatureFactory { /** * Creates a new instance of the exposure lock feature. * - * @param cameraProperties instance of the CameraProperties class containing information about the - * cameras features. + * @param cameraProperties instance of the CameraProperties class containing information + * about the cameras features. * @return newly created instance of the ExposureLockFeature class. */ createExposureLockFeature(cameraProperties: CameraProperties): ExposureLockFeature; @@ -45,8 +45,8 @@ export interface CameraFeatureFactory { /** * Creates a new instance of the exposure offset feature. * - * @param cameraProperties instance of the CameraProperties class containing information about the - * cameras features. + * @param cameraProperties instance of the CameraProperties class containing information + * about the cameras features. * @return newly created instance of the ExposureOffsetFeature class. */ createExposureOffsetFeature(cameraProperties: CameraProperties): ExposureOffsetFeature; @@ -54,8 +54,8 @@ export interface CameraFeatureFactory { /** * Creates a new instance of the flash feature. * - * @param cameraProperties instance of the CameraProperties class containing information about the - * cameras features. + * @param cameraProperties instance of the CameraProperties class containing information + * about the cameras features. * @return newly created instance of the FlashFeature class. */ createFlashFeature(cameraProperties: CameraProperties): FlashFeature; @@ -63,8 +63,8 @@ export interface CameraFeatureFactory { /** * Creates a new instance of the resolution feature. * - * @param cameraProperties instance of the CameraProperties class containing information about the - * cameras features. + * @param cameraProperties instance of the CameraProperties class containing information + * about the cameras features. * @param initialSetting initial resolution preset. * @param cameraName the name of the camera which can be used to identify the camera device. * @return newly created instance of the ResolutionFeature class. @@ -77,8 +77,8 @@ export interface CameraFeatureFactory { /** * Creates a new instance of the focus point feature. * - * @param cameraProperties instance of the CameraProperties class containing information about the - * cameras features. + * @param cameraProperties instance of the CameraProperties class containing information + * about the cameras features. * @param sensorOrientationFeature instance of the SensorOrientationFeature class containing * information about the sensor and device orientation. * @return newly created instance of the FocusPointFeature class. @@ -91,8 +91,8 @@ export interface CameraFeatureFactory { /** * Creates a new instance of the FPS range feature. * - * @param cameraProperties instance of the CameraProperties class containing information about the - * cameras features. + * @param cameraProperties instance of the CameraProperties class containing information + * about the cameras features. * @return newly created instance of the FpsRangeFeature class. */ @@ -101,8 +101,8 @@ export interface CameraFeatureFactory { /** * Creates a new instance of the sensor orientation feature. * - * @param cameraProperties instance of the CameraProperties class containing information about the - * cameras features. + * @param cameraProperties instance of the CameraProperties class containing information + * about the cameras features. * @param activity current activity associated with the camera plugin. * @param dartMessenger instance of the DartMessenger class, used to send state updates back to * Dart. @@ -117,8 +117,8 @@ export interface CameraFeatureFactory { /** * Creates a new instance of the zoom level feature. * - * @param cameraProperties instance of the CameraProperties class containing information about the - * cameras features. + * @param cameraProperties instance of the CameraProperties class containing information + * about the cameras features. * @return newly created instance of the ZoomLevelFeature class. */ @@ -127,8 +127,8 @@ export interface CameraFeatureFactory { /** * Creates a new instance of the exposure point feature. * - * @param cameraProperties instance of the CameraProperties class containing information about the - * cameras features. + * @param cameraProperties instance of the CameraProperties class containing information + * about the cameras features. * @param sensorOrientationFeature instance of the SensorOrientationFeature class containing * information about the sensor and device orientation. * @return newly created instance of the ExposurePointFeature class. diff --git a/packages/camera/camera_ohos/ohos/src/main/ets/io/flutter/plugins/camera/utlis/DateTimeUtil.ts b/packages/camera/camera_ohos/ohos/src/main/ets/io/flutter/plugins/camera/utlis/DateTimeUtil.ts index 6fd1e118970f10fd309cc9c1a2ab8a6be4a1e248..6a601d82f7eee4ad7b589268a5415204c5bd3d7a 100644 --- a/packages/camera/camera_ohos/ohos/src/main/ets/io/flutter/plugins/camera/utlis/DateTimeUtil.ts +++ b/packages/camera/camera_ohos/ohos/src/main/ets/io/flutter/plugins/camera/utlis/DateTimeUtil.ts @@ -48,6 +48,7 @@ export default class DateTimeUtil { } /** + * Avoid repetition * 时分秒格式修饰 * @param hours * @param minutes diff --git a/packages/image_picker/image_picker_ohos/ohos/src/main/ets/image_picker/ImageResizer.ets b/packages/image_picker/image_picker_ohos/ohos/src/main/ets/image_picker/ImageResizer.ets index 5590a12cdd910972caea6c8145fa658c17e28d69..11d405736560458fee3677f76b897ad2942030e6 100644 --- a/packages/image_picker/image_picker_ohos/ohos/src/main/ets/image_picker/ImageResizer.ets +++ b/packages/image_picker/image_picker_ohos/ohos/src/main/ets/image_picker/ImageResizer.ets @@ -91,26 +91,26 @@ export default class ImageResizer { let shouldDownscale: boolean = shouldDownscaleWidth || shouldDownscaleHeight; if (shouldDownscale) { - let downscaledWidth: number = (height / originalHeight) * originalWidth; - let downscaledHeight: number = (width / originalWidth) * originalHeight; + let realDownscaledWidth: number = (height / originalHeight) * originalWidth; + let realDownscaledHeight: number = (width / originalWidth) * originalHeight; if (width < height) { if (!hasMaxWidth) { - width = downscaledWidth; + width = realDownscaledWidth; } else { - height = downscaledHeight; + height = realDownscaledHeight; } } else if (height < width) { if (!hasMaxHeight) { - height = downscaledHeight; + height = realDownscaledHeight; } else { - width = downscaledWidth; + width = realDownscaledWidth; } } else { if (originalWidth < originalHeight) { - width = downscaledWidth; + width = realDownscaledWidth; } else if (originalHeight < originalWidth) { - height = downscaledHeight; + height = realDownscaledHeight; } } } diff --git a/packages/webview_flutter-v4.4.4/webview_flutter_ohos/ohos/src/main/ets/io.flutter.plugins/webview_flutter/JavaScriptChannelHostApiImpl.ets b/packages/webview_flutter-v4.4.4/webview_flutter_ohos/ohos/src/main/ets/io.flutter.plugins/webview_flutter/JavaScriptChannelHostApiImpl.ets index 527e8141ff45894a430a6c1f353a8c34883a91e2..66650be452a216a44b128668594b1cdc0e1533e0 100644 --- a/packages/webview_flutter-v4.4.4/webview_flutter_ohos/ohos/src/main/ets/io.flutter.plugins/webview_flutter/JavaScriptChannelHostApiImpl.ets +++ b/packages/webview_flutter-v4.4.4/webview_flutter_ohos/ohos/src/main/ets/io.flutter.plugins/webview_flutter/JavaScriptChannelHostApiImpl.ets @@ -21,7 +21,8 @@ export class JavaScriptChannelHostApiImpl extends JavaScriptChannelHostApi { /** * Creates a host API that handles creating {@link JavaScriptChannel}s. * - * @param instanceManager maintains instances stored to communicate with Dart objects + * @param instanceManager maintains instances stored to communicate with Dart + * objects * @param javaScriptChannelCreator handles creating {@link JavaScriptChannel}s * @param flutterApi handles sending messages to Dart * @param platformThreadHandler handles making callbacks on the desired thread diff --git a/packages/webview_flutter/webview_flutter_ohos/ohos/src/main/ets/io.flutter.plugins/webview_flutter/JavaScriptChannelHostApiImpl.ets b/packages/webview_flutter/webview_flutter_ohos/ohos/src/main/ets/io.flutter.plugins/webview_flutter/JavaScriptChannelHostApiImpl.ets index 527e8141ff45894a430a6c1f353a8c34883a91e2..66650be452a216a44b128668594b1cdc0e1533e0 100644 --- a/packages/webview_flutter/webview_flutter_ohos/ohos/src/main/ets/io.flutter.plugins/webview_flutter/JavaScriptChannelHostApiImpl.ets +++ b/packages/webview_flutter/webview_flutter_ohos/ohos/src/main/ets/io.flutter.plugins/webview_flutter/JavaScriptChannelHostApiImpl.ets @@ -21,7 +21,8 @@ export class JavaScriptChannelHostApiImpl extends JavaScriptChannelHostApi { /** * Creates a host API that handles creating {@link JavaScriptChannel}s. * - * @param instanceManager maintains instances stored to communicate with Dart objects + * @param instanceManager maintains instances stored to communicate with Dart + * objects * @param javaScriptChannelCreator handles creating {@link JavaScriptChannel}s * @param flutterApi handles sending messages to Dart * @param platformThreadHandler handles making callbacks on the desired thread