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..9e09f139159b64a05ccffa0bda90da8ee9bd413e 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,13 @@ // Copyright 2013 The Flutter Authors. export enum CameraState { - /** Idle, showing preview and not capturing anything. */ STATE_PREVIEW, - /** Starting and waiting for autofocus to complete. */ STATE_WAITING_FOCUS, - /** Start performing autoexposure. */ STATE_WAITING_PRECAPTURE_START, - /** waiting for autoexposure to complete. */ STATE_WAITING_PRECAPTURE_DONE, - /** 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..42c358a678be923cdb74d9be6b069b073f76a830 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 @@ -23,14 +23,6 @@ import camera from '@ohos.multimedia.camera'; 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 recordingVideo indicates if the camera is currently recording. - * @return newly created instance of the AutoFocusFeature class. - */ createAutoFocusFeature(cameraProperties: CameraProperties, recordingVideo: boolean): AutoFocusFeature; /** @@ -51,24 +43,8 @@ export interface CameraFeatureFactory { */ createExposureOffsetFeature(cameraProperties: CameraProperties): ExposureOffsetFeature; - /** - * Creates a new instance of the flash feature. - * - * @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; - /** - * Creates a new instance of the resolution feature. - * - * @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. - */ createResolutionFeature( cameraProperties: CameraProperties, initialSetting: ResolutionPreset, @@ -98,17 +74,6 @@ export interface CameraFeatureFactory { createFpsRangeFeature(cameraProperties: CameraProperties): FpsRangeFeature; - /** - * Creates a new instance of the sensor orientation feature. - * - * @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. - * @return newly created instance of the SensorOrientationFeature class. - */ - createSensorOrientationFeature( cameraProperties: CameraProperties, ability: Ability, @@ -124,15 +89,6 @@ export interface CameraFeatureFactory { createZoomLevelFeature(cameraProperties: CameraProperties): ZoomLevelFeature; - /** - * Creates a new instance of the exposure point feature. - * - * @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. - */ createExposurePointFeature( cameraProperties: CameraProperties, 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..2b6250f23f4fd8e3bc22bc622110f8aa971d722e 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 @@ -47,12 +47,6 @@ export default class DateTimeUtil { return `${year}${this.fill(month)}${this.fill(date)}`; } - /** - * 时分秒格式修饰 - * @param hours - * @param minutes - * @param seconds - */ concatTime(hours: number, minutes: number, seconds: number): string { return `${this.fill(hours)}${this.fill(minutes)}${this.fill(seconds)}`; } 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..0b65c56fc91fb0caba731ad1485d66d725a33065 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 @@ -18,14 +18,6 @@ export class JavaScriptChannelHostApiImpl extends JavaScriptChannelHostApi { /** Handles creating {@link JavaScriptChannel}s for a {@link JavaScriptChannelHostApiImpl}. */ - /** - * Creates a host API that handles creating {@link JavaScriptChannel}s. - * - * @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 - */ constructor( instanceManager: InstanceManager, javaScriptChannelCreator: JavaScriptChannelCreator, flutterApi: JavaScriptChannelFlutterApiImpl 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..0b65c56fc91fb0caba731ad1485d66d725a33065 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 @@ -18,14 +18,6 @@ export class JavaScriptChannelHostApiImpl extends JavaScriptChannelHostApi { /** Handles creating {@link JavaScriptChannel}s for a {@link JavaScriptChannelHostApiImpl}. */ - /** - * Creates a host API that handles creating {@link JavaScriptChannel}s. - * - * @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 - */ constructor( instanceManager: InstanceManager, javaScriptChannelCreator: JavaScriptChannelCreator, flutterApi: JavaScriptChannelFlutterApiImpl