summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ui
diff options
context:
space:
mode:
authorByunghun Jeon <bjeon@codeaurora.org>2014-11-05 16:21:23 -0800
committerByunghun Jeon <bjeon@codeaurora.org>2014-11-19 17:53:30 -0800
commitb6b60bf6cf88015956a7651f7249cf2781fc9d1d (patch)
treee8ae09bf48607e15f5caa76199d2190b997d5a7c /src/com/android/camera/ui
parenta19529b701c6d74b91657441cdb7c3463fa7e8c6 (diff)
downloadandroid_packages_apps_Snap-b6b60bf6cf88015956a7651f7249cf2781fc9d1d.tar.gz
android_packages_apps_Snap-b6b60bf6cf88015956a7651f7249cf2781fc9d1d.tar.bz2
android_packages_apps_Snap-b6b60bf6cf88015956a7651f7249cf2781fc9d1d.zip
SnapdragonCamera: Add back missing setting menus
Adding back missing setting menus Change-Id: I803d3f694b1953aa6a8932cbba6bb55c0d0e6352
Diffstat (limited to 'src/com/android/camera/ui')
-rw-r--r--src/com/android/camera/ui/FaceView.java4
-rw-r--r--src/com/android/camera/ui/FilmStripView.java12
-rw-r--r--src/com/android/camera/ui/ListMenu.java8
3 files changed, 14 insertions, 10 deletions
diff --git a/src/com/android/camera/ui/FaceView.java b/src/com/android/camera/ui/FaceView.java
index f3a41509f..6181937ee 100644
--- a/src/com/android/camera/ui/FaceView.java
+++ b/src/com/android/camera/ui/FaceView.java
@@ -208,8 +208,8 @@ public class FaceView extends View
rh = temp;
}
CameraUtil.prepareMatrix(mMatrix, mMirror, mDisplayOrientation, rw, rh);
- int dx = (getWidth() - rw) / 2;
- int dy = (getHeight() - rh) / 2;
+ int dx = 0;
+ int dy = 0;
// Focus indicator is directional. Rotate the matrix and the canvas
// so it looks correctly in all orientations.
diff --git a/src/com/android/camera/ui/FilmStripView.java b/src/com/android/camera/ui/FilmStripView.java
index 7f197caf4..8c2909881 100644
--- a/src/com/android/camera/ui/FilmStripView.java
+++ b/src/com/android/camera/ui/FilmStripView.java
@@ -37,8 +37,8 @@ import android.view.ViewGroup;
import android.view.animation.DecelerateInterpolator;
import android.widget.Scroller;
-import com.android.camera.CustomPhotoMenu;
-import com.android.camera.CustomVideoMenu;
+import com.android.camera.PhotoMenu;
+import com.android.camera.VideoMenu;
import com.android.camera.PreviewGestures;
import com.android.camera.CameraActivity;
import com.android.camera.data.LocalData;
@@ -1829,8 +1829,8 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener {
public boolean checkSendToModeView(MotionEvent ev) {
if (mSendToPreviewMenu || mSendToMenu || mPreviewGestures == null)
return true;
- CustomPhotoMenu pMenu = mPreviewGestures.getCustomPhotoMenu();
- CustomVideoMenu vMenu = mPreviewGestures.getCustomVideoMenu();
+ PhotoMenu pMenu = mPreviewGestures.getPhotoMenu();
+ VideoMenu vMenu = mPreviewGestures.getVideoMenu();
if (pMenu != null) {
if (pMenu.isMenuBeingShown()) {
if (pMenu.isMenuBeingAnimated()) {
@@ -1882,8 +1882,8 @@ public class FilmStripView extends ViewGroup implements BottomControlsListener {
|| MotionEvent.ACTION_CANCEL == ev.getActionMasked())
mReset = true;
}
- CustomPhotoMenu pMenu = mPreviewGestures.getCustomPhotoMenu();
- CustomVideoMenu vMenu = mPreviewGestures.getCustomVideoMenu();
+ PhotoMenu pMenu = mPreviewGestures.getPhotoMenu();
+ VideoMenu vMenu = mPreviewGestures.getVideoMenu();
if (pMenu != null) {
if (mSendToPreviewMenu)
diff --git a/src/com/android/camera/ui/ListMenu.java b/src/com/android/camera/ui/ListMenu.java
index 53cd48d9c..64bdc342b 100644
--- a/src/com/android/camera/ui/ListMenu.java
+++ b/src/com/android/camera/ui/ListMenu.java
@@ -168,8 +168,12 @@ public class ListMenu extends ListView
// If the preference is overridden, disable the preference
boolean enable = value == null;
mEnabled[j] = enable;
- if (getChildCount() > j) {
- getChildAt(j).setEnabled(enable);
+ int offset = getFirstVisiblePosition();
+ if (offset >= 0) {
+ int indexInView = j - offset;
+ if (getChildCount() > indexInView && indexInView >= 0) {
+ getChildAt(indexInView).setEnabled(enable);
+ }
}
}
}