summaryrefslogtreecommitdiffstats
path: root/policy/src
diff options
context:
space:
mode:
authorCraig Mautner <cmautner@google.com>2014-11-04 15:32:57 -0800
committerCraig Mautner <cmautner@google.com>2014-11-04 15:38:05 -0800
commitb83408018176ec58f50e792590a22fdc9eb87fff (patch)
treebee0a6c49fc9e9b66dd554bc1abda6b8196e274f /policy/src
parent9c95015b0ccaa02b97b4c96950e2b07e6a5a7b4e (diff)
downloadframeworks_base-b83408018176ec58f50e792590a22fdc9eb87fff.zip
frameworks_base-b83408018176ec58f50e792590a22fdc9eb87fff.tar.gz
frameworks_base-b83408018176ec58f50e792590a22fdc9eb87fff.tar.bz2
When keyguard exits use same anim for all windows
The entering animations were only applied to the incoming windows one time. If those windows weren't drawn yet then they never had an animation assigned. Furthermore if a starting window was drawn in time it would get the animation but its main window would not get it if it weren't drawn. Even if an animation were assigned later they wouldn't be synced with each other. This change creates a single animation which is shared by all incoming windows. As windows are drawn they can then animate with the starting window. (Also refactorings to eliminate redundant code and unnecessary variables.) Fixes bug 15991916. Change-Id: I9949ef0a1639c831754316da34de97cb86403f5a
Diffstat (limited to 'policy/src')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java26
1 files changed, 11 insertions, 15 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 792712f..b516f00 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -116,6 +116,7 @@ import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
+import java.util.List;
import static android.view.WindowManager.LayoutParams.*;
import static android.view.WindowManagerPolicy.WindowManagerFuncs.LID_ABSENT;
@@ -2299,24 +2300,19 @@ public class PhoneWindowManager implements WindowManagerPolicy {
boolean goingToNotificationShade) {
if (goingToNotificationShade) {
return AnimationUtils.loadAnimation(mContext, R.anim.lock_screen_behind_enter_fade_in);
- } else if (onWallpaper) {
- Animation a = AnimationUtils.loadAnimation(mContext,
- R.anim.lock_screen_behind_enter_wallpaper);
- AnimationSet set = (AnimationSet) a;
-
- // TODO: Use XML interpolators when we have log interpolators available in XML.
- set.getAnimations().get(0).setInterpolator(mLogDecelerateInterpolator);
- set.getAnimations().get(1).setInterpolator(mLogDecelerateInterpolator);
- return set;
- } else {
- Animation a = AnimationUtils.loadAnimation(mContext,
+ }
+
+ AnimationSet set = (AnimationSet) AnimationUtils.loadAnimation(mContext, onWallpaper ?
+ R.anim.lock_screen_behind_enter_wallpaper :
R.anim.lock_screen_behind_enter);
- AnimationSet set = (AnimationSet) a;
- // TODO: Use XML interpolators when we have log interpolators available in XML.
- set.getAnimations().get(0).setInterpolator(mLogDecelerateInterpolator);
- return set;
+ // TODO: Use XML interpolators when we have log interpolators available in XML.
+ final List<Animation> animations = set.getAnimations();
+ for (int i = animations.size() - 1; i >= 0; --i) {
+ animations.get(i).setInterpolator(mLogDecelerateInterpolator);
}
+
+ return set;
}