// Path: app/src/main/java/com/smartface/app/camera/util/CameraHelper.java
// public interface CameraHelperImpl {
//     int getNumberOfCameras();
// 
//     Camera openCamera(int id);
// 
//     Camera openDefaultCamera();
// 
//     Camera openCameraFacing(int facing);
// 
//     boolean hasCamera(int cameraFacingFront);
// 
//     void getCameraInfo(int cameraId, CameraInfo2 cameraInfo);
// }
// 
// Path: app/src/main/java/com/smartface/app/camera/util/CameraHelper.java
// public static class CameraInfo2 {
//     public int facing;
//     public int orientation;
// }


import android.annotation.TargetApi;
import android.hardware.Camera;
import android.hardware.Camera.CameraInfo;
import com.smartface.app.camera.util.CameraHelper.CameraHelperImpl;
import com.smartface.app.camera.util.CameraHelper.CameraInfo2;
/*
 * Copyright (C) 2012 CyberAgent
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.smartface.app.camera.util;



@TargetApi(9)
public class CameraHelperGB implements CameraHelperImpl {

    @Override
    public int getNumberOfCameras() {
        return Camera.getNumberOfCameras();
    }

    @Override
    public Camera openCamera(final int id) {
        return Camera.open(id);
    }

    @Override
    public Camera openDefaultCamera() {
        return Camera.open(0);
    }

    @Override
    public boolean hasCamera(final int facing) {
        return getCameraId(facing) != -1;
    }

    @Override
    public Camera openCameraFacing(final int facing) {
        return Camera.open(getCameraId(facing));
    }

    @Override
// Path: app/src/main/java/com/smartface/app/camera/util/CameraHelper.java
// public interface CameraHelperImpl {
//     int getNumberOfCameras();
// 
//     Camera openCamera(int id);
// 
//     Camera openDefaultCamera();
// 
//     Camera openCameraFacing(int facing);
// 
//     boolean hasCamera(int cameraFacingFront);
// 
//     void getCameraInfo(int cameraId, CameraInfo2 cameraInfo);
// }
// 
// Path: app/src/main/java/com/smartface/app/camera/util/CameraHelper.java
// public static class CameraInfo2 {
//     public int facing;
//     public int orientation;
// }


// Path: app/src/main/java/com/smartface/app/camera/util/CameraHelperGB.java
import android.annotation.TargetApi;
import android.hardware.Camera;
import android.hardware.Camera.CameraInfo;
import com.smartface.app.camera.util.CameraHelper.CameraHelperImpl;
import com.smartface.app.camera.util.CameraHelper.CameraInfo2;

/*
 * Copyright (C) 2012 CyberAgent
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.smartface.app.camera.util;



@TargetApi(9)
public class CameraHelperGB implements CameraHelperImpl {

    @Override
    public int getNumberOfCameras() {
        return Camera.getNumberOfCameras();
    }

    @Override
    public Camera openCamera(final int id) {
        return Camera.open(id);
    }

    @Override
    public Camera openDefaultCamera() {
        return Camera.open(0);
    }

    @Override
    public boolean hasCamera(final int facing) {
        return getCameraId(facing) != -1;
    }

    @Override
    public Camera openCameraFacing(final int facing) {
        return Camera.open(getCameraId(facing));
    }

    @Override
    public void getCameraInfo(final int cameraId, final CameraInfo2 cameraInfo) {