summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CaptureModule.java
diff options
context:
space:
mode:
authorPaul Rohde <codelogic@google.com>2014-12-05 12:17:15 -0800
committerEthan Chen <intervigil@gmail.com>2018-03-17 04:54:02 +0000
commit4bdfff2c9d2fefedcab17ad4e8b787b44ba2d114 (patch)
treef0a22ff5b5a2116bc6365e875a196184f17b463c /src/com/android/camera/CaptureModule.java
parente4a946e204cd8f6a1bcdb5fb067918e8677e97f0 (diff)
downloadandroid_packages_apps_Snap-4bdfff2c9d2fefedcab17ad4e8b787b44ba2d114.tar.gz
android_packages_apps_Snap-4bdfff2c9d2fefedcab17ad4e8b787b44ba2d114.tar.bz2
android_packages_apps_Snap-4bdfff2c9d2fefedcab17ad4e8b787b44ba2d114.zip
Drop new focus indicator into Camera2.
* Create a new custom focus view that interacts with physical lens diopter changes. * Replace all occurances of the old focus indicator with the new one. Change-Id: Ia02646ce4d1eb059ecb8a1dfccc15dfc9c167e1b
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 1e2ceb890..9271cffbe 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -104,6 +104,7 @@ import com.android.camera.imageprocessor.filter.SharpshooterFilter;
import com.android.camera.imageprocessor.filter.StillmoreFilter;
import com.android.camera.imageprocessor.filter.UbifocusFilter;
import com.android.camera.ui.CountDownView;
+import com.android.camera.ui.focus.FocusRing;
import com.android.camera.ui.ModuleSwitcher;
import com.android.camera.ui.RotateTextToast;
import com.android.camera.ui.TrackingFocusRenderer;
@@ -1971,7 +1972,7 @@ public class CaptureModule implements CameraModule, PhotoController,
mActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
- mUI.clearFocus();
+ mUI.getFocusRing().stopFocusAnimations();
}
});
}
@@ -2817,10 +2818,10 @@ public class CaptureModule implements CameraModule, PhotoController,
int[] newXY = {x, y};
if (mUI.isOverControlRegion(newXY)) return;
if (!mUI.isOverSurfaceView(newXY)) return;
- mUI.setFocusPosition(x, y);
+ mUI.getFocusRing().startActiveFocus();
+ mUI.getFocusRing().setFocusLocation(x, y);
x = newXY[0];
y = newXY[1];
- mUI.onFocusStarted();
if (isBackCamera()) {
switch (getCameraMode()) {
case DUAL_MODE:
@@ -3249,7 +3250,7 @@ public class CaptureModule implements CameraModule, PhotoController,
}
requestAudioFocus();
- mUI.clearFocus();
+ mUI.getFocusRing().stopFocusAnimations();
mUI.hideUIwhileRecording();
mCameraHandler.removeMessages(CANCEL_TOUCH_FOCUS, mCameraId[cameraId]);
mState[cameraId] = STATE_PREVIEW;
@@ -3318,7 +3319,7 @@ public class CaptureModule implements CameraModule, PhotoController,
+ e.getMessage());
e.printStackTrace();
}
- mUI.clearFocus();
+ mUI.getFocusRing().stopFocusAnimations();
mUI.resetPauseButton();
mRecordingTotalTime = 0L;
mRecordingStartTime = SystemClock.uptimeMillis();
@@ -3352,7 +3353,7 @@ public class CaptureModule implements CameraModule, PhotoController,
} catch (IllegalStateException e) {
e.printStackTrace();
}
- mUI.clearFocus();
+ mUI.getFocusRing().stopFocusAnimations();
mUI.resetPauseButton();
mRecordingTotalTime = 0L;
mRecordingStartTime = SystemClock.uptimeMillis();