summaryrefslogtreecommitdiffstats
path: root/src_pd/com/android
diff options
context:
space:
mode:
authorKevin Gabayan <gabayan@google.com>2014-06-13 19:44:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-06-10 21:55:02 +0000
commitbacc2584a7c03931643dd4c2d95d6c3f302e4a00 (patch)
tree508f999a4768ad0209750801cf34fedd77159d99 /src_pd/com/android
parent40d67958ecc152879a9aca554245d7e1341bb908 (diff)
parentebba3288da5628c9ea7579b63139aa7b7312e137 (diff)
downloadandroid_packages_apps_Camera2-bacc2584a7c03931643dd4c2d95d6c3f302e4a00.tar.gz
android_packages_apps_Camera2-bacc2584a7c03931643dd4c2d95d6c3f302e4a00.tar.bz2
android_packages_apps_Camera2-bacc2584a7c03931643dd4c2d95d6c3f302e4a00.zip
Merge "MotionManager for motion-aware focus unlock in Camera2 Bug: 14222601" into ub-camera-fishlake
Diffstat (limited to 'src_pd/com/android')
-rw-r--r--src_pd/com/android/camera/app/MotionManager.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/src_pd/com/android/camera/app/MotionManager.java b/src_pd/com/android/camera/app/MotionManager.java
new file mode 100644
index 000000000..e7c7900b1
--- /dev/null
+++ b/src_pd/com/android/camera/app/MotionManager.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * 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.android.camera.app;
+
+import com.android.camera.debug.Log;
+
+import java.util.LinkedList;
+
+/**
+ * Determines when the camera is in motion for better auto-focus control.
+ */
+public class MotionManager {
+ private static final Log.Tag TAG = new Log.Tag("MotionManager");
+
+ public static interface MotionListener {
+ public void onMoving();
+ }
+
+ private final LinkedList<MotionListener> mListeners =
+ new LinkedList<MotionListener>();
+
+ public MotionManager(Context context) {
+ super();
+ }
+
+ public void addListener(MotionListener listener) {
+ }
+
+ public void removeListener(MotionListener listener) {
+ }
+
+ public void reset() {
+ }
+
+ public void onGyroUpdate(long t, float x, float y, float z) {
+ }
+}