diff options
author | Chung-yih Wang <cywang@google.com> | 2011-09-23 01:53:27 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-09-23 01:53:27 -0700 |
commit | 022d6d7e809fcd47ebc751deaea84e2d3639069a (patch) | |
tree | f2ebe67ca8fc0667c66a289651f8667b6754a04f | |
parent | 50117d0316f93d0cfbfc18c249d2b57013170ce9 (diff) | |
parent | c4f4c3da52404870b0b559b7bf88896a4f41b7de (diff) | |
download | packages_apps_LegacyCamera-022d6d7e809fcd47ebc751deaea84e2d3639069a.zip packages_apps_LegacyCamera-022d6d7e809fcd47ebc751deaea84e2d3639069a.tar.gz packages_apps_LegacyCamera-022d6d7e809fcd47ebc751deaea84e2d3639069a.tar.bz2 |
Merge "Fix the current mode hightlight of ModePicker." into ics-factoryrom
-rw-r--r-- | src/com/android/camera/ModePicker.java | 11 |
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) { |