1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.camera.one.v1; 18 19 import android.os.Handler; 20 21 import com.android.camera.FatalErrorHandler; 22 import com.android.camera.SoundPlayer; 23 import com.android.camera.async.MainThread; 24 import com.android.camera.burst.BurstFacade; 25 import com.android.camera.device.CameraId; 26 import com.android.camera.one.OneCamera.OpenCallback; 27 import com.android.camera.one.OneCameraCaptureSetting; 28 import com.android.camera.one.OneCameraOpener; 29 import com.android.camera.one.v2.photo.ImageRotationCalculator; 30 import com.google.common.base.Optional; 31 /** 32 * The {@link com.android.camera.one.OneCameraOpener} implementation on top of the Camera API 1. 33 */ 34 public class LegacyOneCameraOpenerImpl implements OneCameraOpener { create()35 public static Optional<OneCameraOpener> create() { 36 OneCameraOpener cameraManager = new LegacyOneCameraOpenerImpl(); 37 return Optional.of(cameraManager); 38 } 39 40 /** 41 * Instantiates a new {@link com.android.camera.one.OneCameraOpener} for Camera1 API. 42 */ LegacyOneCameraOpenerImpl()43 public LegacyOneCameraOpenerImpl() { 44 } 45 46 @Override open( CameraId cameraId, OneCameraCaptureSetting captureSetting, Handler handler, MainThread mainThread, ImageRotationCalculator imageRotationCalculator, BurstFacade burstController, SoundPlayer soundPlayer, OpenCallback openCallback, FatalErrorHandler fatalErrorHandler)47 public void open( 48 CameraId cameraId, 49 OneCameraCaptureSetting captureSetting, 50 Handler handler, 51 MainThread mainThread, 52 ImageRotationCalculator imageRotationCalculator, 53 BurstFacade burstController, 54 SoundPlayer soundPlayer, 55 OpenCallback openCallback, FatalErrorHandler fatalErrorHandler) { 56 throw new RuntimeException("Not implemented yet."); 57 } 58 }