CameraModule.java revision 3044d8c577432d6e9721fc8b26ac2afbbaf21266
1/*
2 * Copyright (C) 2012 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
17package com.android.camera;
18
19import android.content.Intent;
20import android.content.res.Configuration;
21import android.view.KeyEvent;
22import android.view.View;
23
24public interface CameraModule {
25
26    public void init(CameraActivity activity, View frame);
27
28    public void onPreviewFocusChanged(boolean previewFocused);
29
30    public void onPauseBeforeSuper();
31
32    public void onPauseAfterSuper();
33
34    public void onResumeBeforeSuper();
35
36    public void onResumeAfterSuper();
37
38    public void onConfigurationChanged(Configuration config);
39
40    public void onStop();
41
42    public void installIntentFilter();
43
44    public void onActivityResult(int requestCode, int resultCode, Intent data);
45
46    public boolean onBackPressed();
47
48    public boolean onKeyDown(int keyCode, KeyEvent event);
49
50    public boolean onKeyUp(int keyCode, KeyEvent event);
51
52    public void onSingleTapUp(View view, int x, int y);
53
54    public void onPreviewTextureCopied();
55
56    public void onCaptureTextureCopied();
57
58    public void onUserInteraction();
59
60    public boolean updateStorageHintOnResume();
61
62    public void onOrientationChanged(int orientation);
63
64    public void onShowSwitcherPopup();
65
66    public void onMediaSaveServiceConnected(MediaSaveService s);
67
68    public boolean arePreviewControlsVisible();
69}
70