Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Undo changes
  • Loading branch information
camsim99 committed May 10, 2023
commit fed96215bdf28cd0d04913c07060091a9fb74e84
Original file line number Diff line number Diff line change
Expand Up @@ -92,40 +92,4 @@ public Long getZoomState(@NonNull Long identifier) {

return instanceManager.getIdentifierForStrongReference(zoomState);
}

/**
* Retrieves the {@link ExposureState} of the {@link CameraInfo} with the specified identifier.
*/
@Override
@NonNull
public Long getExposureState(@NonNull Long identifier) {
CameraInfo cameraInfo =
(CameraInfo) Objects.requireNonNull(instanceManager.getInstance(identifier));
ExposureState exposureState = cameraInfo.getExposureState();

ExposureStateFlutterApiImpl exposureStateFlutterApiImpl =
new ExposureStateFlutterApiImpl(binaryMessenger, instanceManager);
exposureStateFlutterApiImpl.create(exposureState, result -> {});

return instanceManager.getIdentifierForStrongReference(exposureState);
}

/**
* Retrieves the current {@link ZoomState} value of the {@link CameraInfo} with the specified
* identifier.
*/
@NonNull
@Override
public Long getZoomState(@NonNull Long identifier) {
CameraInfo cameraInfo =
(CameraInfo) Objects.requireNonNull(instanceManager.getInstance(identifier));
// TODO(camsim99): Create/return LiveData<ZoomState> once https://github.com/flutter/packages/pull/3419 lands.
ZoomState zoomState = cameraInfo.getZoomState().getValue();

ZoomStateFlutterApiImpl zoomStateFlutterApiImpl =
new ZoomStateFlutterApiImpl(binaryMessenger, instanceManager);
zoomStateFlutterApiImpl.create(zoomState, result -> {});

return instanceManager.getIdentifierForStrongReference(zoomState);
}
}
Loading