summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlok Kediya <kediya@codeaurora.org>2013-09-28 18:13:32 +0530
committerLinux Build Service Account <lnxbuild@localhost>2013-10-31 19:39:47 -0600
commit6aebaa5e9af89581c5d07fef27c1a17e127673f9 (patch)
treef388c6a9ba1d6461fa8b74dd71bdcfe3fbf9c5d1
parent4b6f3f924aa4fc207be69b285db7133995efd706 (diff)
downloadandroid_packages_apps_Snap-6aebaa5e9af89581c5d07fef27c1a17e127673f9.tar.gz
android_packages_apps_Snap-6aebaa5e9af89581c5d07fef27c1a17e127673f9.tar.bz2
android_packages_apps_Snap-6aebaa5e9af89581c5d07fef27c1a17e127673f9.zip
Camera: Some of the options in the Camera settings are getting selected only when we tap on it twice
We are maintaining the popup dialog level in a variable and based on that top level popup is dismissed and the previous popup will be displayed. (cherrypicked from commit 6b8a6e50b48432572ce80ca753b3fe1bab87191a) Change-Id: I6876c5663047eb0d3ec1ce64af6182be0b5bd79c (cherry picked from commit f147ea11ff0b993f8aa5e335065c88051341ab8d) (cherry picked from commit 591973b04ca5444bc644e1ad1f02ea0b5b237d86)
-rw-r--r--src/com/android/camera/PhotoMenu.java32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/com/android/camera/PhotoMenu.java b/src/com/android/camera/PhotoMenu.java
index b3eb83375..7e60cd950 100644
--- a/src/com/android/camera/PhotoMenu.java
+++ b/src/com/android/camera/PhotoMenu.java
@@ -56,6 +56,7 @@ public class PhotoMenu extends PieController
private int mPopupStatus;
private AbstractSettingPopup mPopup;
private CameraActivity mActivity;
+ private int popupNum = 0;
public PhotoMenu(CameraActivity activity, PhotoUI ui, PieRenderer pie) {
super(activity, pie);
@@ -72,6 +73,7 @@ public class PhotoMenu extends PieController
mPopup3 = null;
mPopupStatus = POPUP_NONE;
PieItem item = null;
+ popupNum = 0;
final Resources res = mActivity.getResources();
Locale locale = res.getConfiguration().locale;
// The order is from left to right in the menu.
@@ -151,6 +153,7 @@ public class PhotoMenu extends PieController
mPopupStatus = POPUP_FIRST_LEVEL;
}
mUI.showPopup(mPopup1);
+ popupNum = 1;
}
});
mRenderer.addItem(item1);
@@ -164,7 +167,8 @@ public class PhotoMenu extends PieController
initializePopup();
mPopupStatus = POPUP_FIRST_LEVEL;
}
- mUI.showPopup(mPopup2);
+ mUI.showPopup(mPopup2);
+ popupNum = 2;
}
});
mRenderer.addItem(item2);
@@ -179,7 +183,7 @@ public class PhotoMenu extends PieController
mPopupStatus = POPUP_FIRST_LEVEL;
}
mUI.showPopup(mPopup3);
- mPopupStatus = POPUP_FIRST_LEVEL;
+ popupNum = 3;
}
});
mRenderer.addItem(item3);
@@ -252,16 +256,22 @@ public class PhotoMenu extends PieController
}
public void popupDismissed() {
- // the popup gets dismissed
- if (mPopup1 != null) {
- mPopup1 = null;
- }
- if (mPopup2 != null) {
- mPopup2 = null;
- }
- if (mPopup3 != null) {
- mPopup3 = null;
+ if (mPopupStatus == POPUP_SECOND_LEVEL) {
+ initializePopup();
+ mPopupStatus = POPUP_FIRST_LEVEL;
+ if (popupNum == 1)
+ mUI.showPopup(mPopup1);
+ else if (popupNum == 2)
+ mUI.showPopup(mPopup2);
+ else if (popupNum == 3)
+ mUI.showPopup(mPopup3);
+ if(mPopup1 != null) mPopup1 = null;
+ if(mPopup2 != null) mPopup2 = null;
+ if(mPopup3 != null) mPopup3 = null;
+ } else {
+ initializePopup();
}
+
}
@Override