fix bug for camera

Signed-off-by: chenjiayin <chenjiayin8@huawei.com>
This commit is contained in:
chenjiayin 2021-07-01 10:08:36 +08:00
commit 84fa8b84de
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}

View File

@ -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);
}