summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChung-yih Wang <cywang@google.com>2011-08-25 16:55:33 +0800
committerChung-yih Wang <cywang@google.com>2011-08-25 17:28:20 +0800
commit4cc009b812557bc312af556e3ed64cae2367d69e (patch)
tree6972107a049983ca17cc530b9ab527e4f1498876 /src
parent3a92e643ed83c0ecce072797259dd4fa11246b2b (diff)
downloadLegacyCamera-4cc009b812557bc312af556e3ed64cae2367d69e.zip
LegacyCamera-4cc009b812557bc312af556e3ed64cae2367d69e.tar.gz
LegacyCamera-4cc009b812557bc312af556e3ed64cae2367d69e.tar.bz2
Fix the bug of reloadPreferences.
In the old code, we have two methods in IndicatorButton, reloadPreference() and reloadPreferences()(the one inherited from AbstractIndicatorButton). Merge them and take reloadPreference() in the AbstractIndicationButton. Change-Id: I50c65da8bc5ef07202c6562f28f2e046dbb7606a
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/ui/AbstractIndicatorButton.java2
-rw-r--r--src/com/android/camera/ui/IndicatorButton.java2
-rw-r--r--src/com/android/camera/ui/IndicatorControl.java2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/camera/ui/AbstractIndicatorButton.java b/src/com/android/camera/ui/AbstractIndicatorButton.java
index f6d0d02..2bed377 100644
--- a/src/com/android/camera/ui/AbstractIndicatorButton.java
+++ b/src/com/android/camera/ui/AbstractIndicatorButton.java
@@ -130,7 +130,7 @@ public abstract class AbstractIndicatorButton extends RotateImageView {
}
}
- public void reloadPreferences() {
+ public void reloadPreference() {
if (mPopup != null) mPopup.reloadPreference();
}
}
diff --git a/src/com/android/camera/ui/IndicatorButton.java b/src/com/android/camera/ui/IndicatorButton.java
index 2a7abe1..ff4703c 100644
--- a/src/com/android/camera/ui/IndicatorButton.java
+++ b/src/com/android/camera/ui/IndicatorButton.java
@@ -47,6 +47,7 @@ public class IndicatorButton extends AbstractIndicatorButton implements BasicSet
reloadPreference();
}
+ @Override
public void reloadPreference() {
int[] iconIds = mPreference.getLargeIconIds();
if (iconIds != null) {
@@ -68,6 +69,7 @@ public class IndicatorButton extends AbstractIndicatorButton implements BasicSet
// The preference only has a single icon to represent it.
setImageResource(mPreference.getSingleIcon());
}
+ super.reloadPreference();
}
public String getKey() {
diff --git a/src/com/android/camera/ui/IndicatorControl.java b/src/com/android/camera/ui/IndicatorControl.java
index 66dcf55..d97646a 100644
--- a/src/com/android/camera/ui/IndicatorControl.java
+++ b/src/com/android/camera/ui/IndicatorControl.java
@@ -183,7 +183,7 @@ public abstract class IndicatorControl extends RelativeLayout implements
public void reloadPreferences() {
mPreferenceGroup.reloadValue();
for (AbstractIndicatorButton b: mIndicators) {
- b.reloadPreferences();
+ b.reloadPreference();
}
}