am 5785e05d: Merge "Clear sendingToBottom when animation is complete." into jb-dev

* commit '5785e05d44cd1f4453b887ac8de05ff3466b179e':
  Clear sendingToBottom when animation is complete.
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 5efbe2c..c329174 100755
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -8257,6 +8257,9 @@
 
         mAppTransitionRunning = false;
         // Restore window app tokens to the ActivityManager views
+        for (int i = mAnimatingAppTokens.size() - 1; i >= 0; i--) {
+            mAnimatingAppTokens.get(i).sendingToBottom = false;
+        }
         mAnimatingAppTokens.clear();
         mAnimatingAppTokens.addAll(mAppTokens);
         rebuildAppWindowListLocked();
@@ -9120,6 +9123,8 @@
 
             // If this window's application has been removed, just skip it.
             if (thisApp != null && (thisApp.removed || thisApp.sendingToBottom)) {
+                if (DEBUG_FOCUS) Slog.v(TAG, "Skipping app because " + (thisApp.removed
+                        ? "removed" : "sendingToBottom"));
                 continue;
             }