summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/camera/ModePicker.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/com/android/camera/ModePicker.java b/src/com/android/camera/ModePicker.java
index cc17f9b..468882a 100644
--- a/src/com/android/camera/ModePicker.java
+++ b/src/com/android/camera/ModePicker.java
@@ -152,31 +152,22 @@ public class ModePicker extends RelativeLayout implements View.OnClickListener {
}
}
- private void setMode(int mode) {
- for (int i = 0; i < MODE_NUM; ++i) {
- mModeSelectionIcon[i].setSelected(mode == i);
- }
- }
-
public void setOnModeChangeListener(OnModeChangeListener listener) {
mListener = listener;
}
public void setCurrentMode(int mode) {
- if (mCurrentMode == mode) return;
- setMode(mode);
tryToSetMode(mode);
+ updateModeState();
}
private void tryToSetMode(int mode) {
if (mListener != null) {
if (!mListener.onModeChanged(mode)) {
- setMode(mCurrentMode);
return;
}
}
mCurrentMode = mode;
- updateModeState();
}
public boolean onModeChanged(int mode) {