Merge "fix free space calculation / querying timing problem" into gb-ub-photos-denali
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 518e580..189176f 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -24,7 +24,7 @@
<string name="delete" msgid="2714492172818940424">"Schließen"</string>
<plurals name="delete_selection">
<item quantity="one" msgid="8811352590292754044">"Ausgewähltes Element löschen?"</item>
- <item quantity="other" msgid="5075283252850066610">"Ausgewählte Elemente löschen?"</item>
+ <item quantity="other" msgid="5075283252850066610">"Wirklich löschen?"</item>
</plurals>
<string name="share" msgid="8581089487762243115">"Teilen"</string>
<string name="share_panorama" msgid="3558466186935359444">"Panorama teilen"</string>
diff --git a/src/com/android/camera/ui/ModeListView.java b/src/com/android/camera/ui/ModeListView.java
index df04d74..08171ef 100644
--- a/src/com/android/camera/ui/ModeListView.java
+++ b/src/com/android/camera/ui/ModeListView.java
@@ -1379,10 +1379,13 @@
@Override
public void draw(Canvas canvas) {
ModeListState currentState = mCurrentStateManager.getCurrentState();
- if (currentState.getCurrentAnimationEffects() != null) {
- currentState.getCurrentAnimationEffects().drawBackground(canvas);
- super.draw(canvas);
- currentState.getCurrentAnimationEffects().drawForeground(canvas);
+ AnimationEffects currentEffects = currentState.getCurrentAnimationEffects();
+ if (currentEffects != null) {
+ currentEffects.drawBackground(canvas);
+ if (currentEffects.shouldDrawSuper()) {
+ super.draw(canvas);
+ }
+ currentEffects.drawForeground(canvas);
} else {
super.draw(canvas);
}
@@ -1957,6 +1960,13 @@
}
@Override
+ public boolean shouldDrawSuper() {
+ // No need to draw super when mBackgroundOverlay is being drawn, as
+ // background overlay already contains what's drawn in super.
+ return (mBackground == null || mBackgroundOverlay == null);
+ }
+
+ @Override
public void startAnimation(Animator.AnimatorListener listener) {
if (mPeepHoleAnimator != null && mPeepHoleAnimator.isRunning()) {
return;
diff --git a/src/com/android/camera/widget/AnimationEffects.java b/src/com/android/camera/widget/AnimationEffects.java
index 82f31ca..281282f 100644
--- a/src/com/android/camera/widget/AnimationEffects.java
+++ b/src/com/android/camera/widget/AnimationEffects.java
@@ -68,4 +68,11 @@
* canceled as well, to make sure all the states are properly set.
*/
public abstract void endAnimation();
+
+ /**
+ * Returns whether super should be drawn when the animation is going on.
+ */
+ public boolean shouldDrawSuper() {
+ return true;
+ }
}