@@ -0,0 +1,1931 @@
+/*%0A * Copyright (C) 2016 The Android Open Source Project%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.google.android.cameraview;%0A%0Aimport android.view.View;%0A%0Aimport java.util.Set;%0A%0Aabstract class CameraViewImpl %7B%0A%0A    protected final Callback mCallback;%0A%0A    protected final PreviewImpl mPreview;%0A%0A    CameraViewImpl(Callback callback, PreviewImpl preview) %7B%0A        mCallback = callback;%0A        mPreview = preview;%0A    %7D%0A%0A    View getView() %7B%0A        return mPreview.getView();%0A    %7D%0A%0A    /**%0A     * @return %7B@code true%7D if the implementation was able to start the camera session.%0A     */%0A    abstract boolean start();%0A%0A    abstract void stop();%0A%0A    abstract boolean isCameraOpened();%0A%0A    abstract void setFacing(int facing);%0A%0A    abstract int getFacing();%0A%0A    abstract Set%3CAspectRatio%3E getSupportedAspectRatios();%0A%0A    /**%0A     * @return %7B@code true%7D if the aspect ratio was changed.%0A     */%0A    abstract boolean setAspectRatio(AspectRatio ratio);%0A%0A    abstract AspectRatio getAspectRatio();%0A%0A    abstract void setAutoFocus(boolean autoFocus);%0A%0A    abstract boolean getAutoFocus();%0A%0A    abstract void setFlash(int flash);%0A%0A    abstract int getFlash();%0A%0A    abstract void takePicture();%0A%0A    abstract void setDisplayOrientation(int displayOrientation);%0A%0A    interface Callback %7B%0A%0A        void onCameraOpened();%0A%0A        void onCameraClosed();%0A%0A        void onPictureTaken(byte%5B%5D data);%0A%0A    %7D%0A%0A%7D%0A

Create CameraViewImpl.java