mirror of
https://gitee.com/openharmony/applications_app_samples
synced 2024-11-23 08:30:06 +00:00
fix bug for camera
Signed-off-by: chenjiayin <chenjiayin8@huawei.com>
This commit is contained in:
commit
84fa8b84de
@ -134,7 +134,7 @@ public class TakePhotoAbility extends Ability {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cameraId != null && !cameraId.equals("")) {
|
||||
if (cameraId != null && !cameraId.isEmpty()) {
|
||||
CameraStateCallbackImpl cameraStateCallback = new CameraStateCallbackImpl();
|
||||
cameraKit.createCamera(cameraId, cameraStateCallback, eventHandler);
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ public class VideoRecordAbility extends Ability {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cameraId != null && !cameraId.equals("")) {
|
||||
if (cameraId != null && !cameraId.isEmpty()) {
|
||||
CameraStateCallbackImpl cameraStateCallback = new CameraStateCallbackImpl();
|
||||
cameraKit.createCamera(cameraId, cameraStateCallback, eventHandler);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user