2 * Copyright (C) 2012 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package com.android.camera;
19 import android.content.Intent;
20 import android.content.res.Configuration;
21 import android.view.KeyEvent;
22 import android.view.View;
24 import com.android.camera.app.MediaSaver;
27 public interface CameraModule {
29 public void init(CameraActivity activity, View frame);
31 public void onPreviewFocusChanged(boolean previewFocused);
33 public void onPauseBeforeSuper();
35 public void onPauseAfterSuper();
37 public void onResumeBeforeSuper();
39 public void onResumeAfterSuper();
41 public void onConfigurationChanged(Configuration config);
45 public void installIntentFilter();
47 public void onActivityResult(int requestCode, int resultCode, Intent data);
49 public boolean onBackPressed();
51 public boolean onKeyDown(int keyCode, KeyEvent event);
53 public boolean onKeyUp(int keyCode, KeyEvent event);
55 public void onSingleTapUp(View view, int x, int y);
57 public void onPreviewTextureCopied();
59 public void onCaptureTextureCopied();
61 public void onUserInteraction();
63 public boolean updateStorageHintOnResume();
65 public void onOrientationChanged(int orientation);
67 public void onShowSwitcherPopup();
69 public void onMediaSaverAvailable(MediaSaver s);
71 public boolean arePreviewControlsVisible();