summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-07-17 13:58:40 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2009-07-17 13:58:40 -0700
commit0fde7de9d660e4acdb8404f954f75d8c331b5d45 (patch)
tree9be145df09757f1963f18ba465f15906840900fe /services
parent1007bf2e50ab6d8bfe96479c1e44d7a1f9cb4e7a (diff)
parent54f09101381fa63dca35ae4ea0ba3802ee863236 (diff)
downloadframeworks_base-0fde7de9d660e4acdb8404f954f75d8c331b5d45.zip
frameworks_base-0fde7de9d660e4acdb8404f954f75d8c331b5d45.tar.gz
frameworks_base-0fde7de9d660e4acdb8404f954f75d8c331b5d45.tar.bz2
am 54f09101: Merge change 7613 into donut
Merge commit '54f09101381fa63dca35ae4ea0ba3802ee863236' * commit '54f09101381fa63dca35ae4ea0ba3802ee863236': * Use Fede In/Out animation if one of opening/closing apps is in compatibility mode.
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/WindowManagerService.java45
1 files changed, 32 insertions, 13 deletions
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index e41524e..f04cfd6 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -1898,7 +1898,7 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo
break;
case WindowManagerPolicy.TRANSIT_TASK_TO_BACK:
animAttr = enter
- ? com.android.internal.R.styleable.WindowAnimation_taskToBackEnterAnimation
+ ? com.android.internal.R.styleable.WindowAnimation_taskToBackEnterAnimation
: com.android.internal.R.styleable.WindowAnimation_taskToBackExitAnimation;
break;
}
@@ -7281,17 +7281,27 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo
public static WindowManager.LayoutParams findAnimations(
ArrayList<AppWindowToken> order,
- ArrayList<AppWindowToken> tokenList1,
- ArrayList<AppWindowToken> tokenList2) {
+ ArrayList<AppWindowToken> openingTokenList1,
+ ArrayList<AppWindowToken> closingTokenList2) {
// We need to figure out which animation to use...
+
+ // First, check if there is a compatible window in opening/closing
+ // apps, and use it if exists.
WindowManager.LayoutParams animParams = null;
int animSrc = 0;
-
+ animParams = findCompatibleWindowParams(openingTokenList1);
+ if (animParams == null) {
+ animParams = findCompatibleWindowParams(closingTokenList2);
+ }
+ if (animParams != null) {
+ return animParams;
+ }
+
//Log.i(TAG, "Looking for animations...");
for (int i=order.size()-1; i>=0; i--) {
AppWindowToken wtoken = order.get(i);
//Log.i(TAG, "Token " + wtoken + " with " + wtoken.windows.size() + " windows");
- if (tokenList1.contains(wtoken) || tokenList2.contains(wtoken)) {
+ if (openingTokenList1.contains(wtoken) || closingTokenList2.contains(wtoken)) {
int j = wtoken.windows.size();
while (j > 0) {
j--;
@@ -7319,6 +7329,21 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo
return animParams;
}
+ private static LayoutParams findCompatibleWindowParams(ArrayList<AppWindowToken> tokenList) {
+ for (int appCount = tokenList.size() - 1; appCount >= 0; appCount--) {
+ AppWindowToken wtoken = tokenList.get(appCount);
+ // Just checking one window is sufficient as all windows have the compatible flag
+ // if the application is in compatibility mode.
+ if (wtoken.windows.size() > 0) {
+ WindowManager.LayoutParams params = wtoken.windows.get(0).mAttrs;
+ if ((params.flags & FLAG_COMPATIBLE_WINDOW) != 0) {
+ return params;
+ }
+ }
+ }
+ return null;
+ }
+
// -------------------------------------------------------------
// DummyAnimation
// -------------------------------------------------------------
@@ -9326,16 +9351,10 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo
// width is the screen width {@see AppWindowToken#stepAnimatinoLocked}
mWidth = width;
}
-
- @Override
- public boolean willChangeTransformationMatrix() {
- return true;
- }
@Override
- public boolean willChangeBounds() {
- return true;
+ public int getZAdjustment() {
+ return Animation.ZORDER_TOP;
}
}
}
-