diff options
author | Byunghun Jeon <bjeon@codeaurora.org> | 2016-05-10 11:38:21 -0700 |
---|---|---|
committer | Byunghun Jeon <bjeon@codeaurora.org> | 2016-05-31 13:18:21 -0700 |
commit | 0fdbb4a33a2deb480f877b904203c7f04ef507d0 (patch) | |
tree | 42223718b561d86603ef46118c771c617fdba245 /src/com/android/camera/PreviewGestures.java | |
parent | e8d4ba774d224e5076576ba4c29d1fc248456b40 (diff) | |
download | android_packages_apps_Snap-0fdbb4a33a2deb480f877b904203c7f04ef507d0.tar.gz android_packages_apps_Snap-0fdbb4a33a2deb480f877b904203c7f04ef507d0.tar.bz2 android_packages_apps_Snap-0fdbb4a33a2deb480f877b904203c7f04ef507d0.zip |
SnapdragonCamera: Add SettingsManager, scene, and filter
Add SettingsManager to work as a database for settings.
It will handle all dependencies and populate the values.
Add scene mode and filter.
Restructure UI and menu by combining them and leave the
handling of settings to SettingsManager
Change-Id: I185163fdddbffd29434e6a9c41b33be6d3388f88
CRs-Fixed: 1018118
Diffstat (limited to 'src/com/android/camera/PreviewGestures.java')
-rw-r--r-- | src/com/android/camera/PreviewGestures.java | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/com/android/camera/PreviewGestures.java b/src/com/android/camera/PreviewGestures.java index 4f26240ea..48bfb7e58 100644 --- a/src/com/android/camera/PreviewGestures.java +++ b/src/com/android/camera/PreviewGestures.java @@ -55,7 +55,7 @@ public class PreviewGestures private boolean mEnabled; private boolean mZoomOnly; private GestureDetector mGestureDetector; - private CaptureMenu mCaptureMenu; + private CaptureUI mCaptureUI; private PhotoMenu mPhotoMenu; private VideoMenu mVideoMenu; private boolean waitUntilNextDown; @@ -95,8 +95,8 @@ public class PreviewGestures orientation = mPhotoMenu.getOrientation(); else if (mVideoMenu != null) orientation = mVideoMenu.getOrientation(); - else if (mCaptureMenu != null) - orientation = mCaptureMenu.getOrientation(); + else if (mCaptureUI != null) + orientation = mCaptureUI.getOrientation(); if (isLeftSwipe(orientation, deltaX, deltaY)) { waitUntilNextDown = true; @@ -104,8 +104,8 @@ public class PreviewGestures mPhotoMenu.openFirstLevel(); else if (mVideoMenu != null && !mVideoMenu.isMenuBeingShown()) mVideoMenu.openFirstLevel(); - else if (mCaptureMenu != null && !mCaptureMenu.isMenuBeingShown()) - mCaptureMenu.openFirstLevel(); + else if (mCaptureUI != null && !mCaptureUI.isMenuBeingShown()) + mCaptureUI.showSettingMenu(); return true; } else { return onSingleTapUp(e2); @@ -161,8 +161,8 @@ public class PreviewGestures return mEnabled; } - public void setCaptureMenu(CaptureMenu menu) { - mCaptureMenu = menu; + public void setCaptureUI(CaptureUI ui) { + mCaptureUI = ui; } public void setPhotoMenu(PhotoMenu menu) { @@ -173,10 +173,6 @@ public class PreviewGestures mVideoMenu = menu; } - public CaptureMenu getCaptureMenu() { - return mCaptureMenu; - } - public PhotoMenu getPhotoMenu() { return mPhotoMenu; } @@ -213,16 +209,17 @@ public class PreviewGestures return sendToPie(m); } - if (mCaptureMenu != null) { - if (mCaptureMenu.isMenuBeingShown()) { - if (!mCaptureMenu.isMenuBeingAnimated()) { + if (mCaptureUI != null) { + if (mCaptureUI.isMenuBeingShown()) { + if (!mCaptureUI.isMenuBeingAnimated()) { waitUntilNextDown = true; - mCaptureMenu.closeView(); + mCaptureUI.removeAllSettingMenu(true); } return true; } - if (mCaptureMenu.isPreviewMenuBeingShown()) { + if (mCaptureUI.isPreviewMenuBeingShown()) { waitUntilNextDown = true; + mCaptureUI.removeSceneAndFilterMenu(true); return true; } } |