Remove AppWindowToken lists.

No longer necessary.

Change-Id: I0d2b96f69152fb93b6ba56f02ce9693ff1370cbc
diff --git a/services/java/com/android/server/wm/DisplayContent.java b/services/java/com/android/server/wm/DisplayContent.java
index 0b6c514d..b48a004 100644
--- a/services/java/com/android/server/wm/DisplayContent.java
+++ b/services/java/com/android/server/wm/DisplayContent.java
@@ -16,8 +16,6 @@
 
 package com.android.server.wm;
 
-import android.os.Debug;
-import android.util.Slog;
 import android.util.SparseArray;
 import android.view.Display;
 import android.view.DisplayInfo;
@@ -38,7 +36,7 @@
  * WindowManagerService.mWindowMap.
  */
 class DisplayContent {
-    private final static String TAG = "DisplayContent";
+//    private final static String TAG = "DisplayContent";
 
     /** Unique identifier of this stack. */
     private final int mDisplayId;
@@ -73,20 +71,6 @@
     final boolean isDefaultDisplay;
 
     /**
-     * List controlling the ordering of windows in different applications which must
-     * be kept in sync with ActivityManager.
-     */
-    final AppTokenList mAppTokens = new AppTokenList();
-
-    /**
-     * AppWindowTokens in the Z order they were in at the start of an animation. Between
-     * animations this list is maintained in the exact order of mAppTokens. If tokens
-     * are added to mAppTokens during an animation an attempt is made to insert them at the same
-     * logical location in this list. Note that this list is always in sync with mWindows.
-     */
-    AppTokenList mAnimatingAppTokens = new AppTokenList();
-
-    /**
      * Window tokens that are in the process of exiting, but still
      * on screen for animations.
      */
@@ -140,18 +124,6 @@
      * @param wtoken The token to insert.
      */
     void addAppToken(final int addPos, final AppWindowToken wtoken) {
-        mAppTokens.add(addPos, wtoken);
-
-        if (addPos == 0 || addPos == mAnimatingAppTokens.size()) {
-            // It was inserted into the beginning or end of mAppTokens. Honor that.
-            mAnimatingAppTokens.add(addPos, wtoken);
-        } else {
-            // Find the item immediately above the mAppTokens insertion point and put the token
-            // immediately below that one in mAnimatingAppTokens.
-            final AppWindowToken aboveAnchor = mAppTokens.get(addPos + 1);
-            mAnimatingAppTokens.add(mAnimatingAppTokens.indexOf(aboveAnchor), wtoken);
-        }
-
         TaskList task = mTaskIdToTaskList.get(wtoken.groupId);
         if (task == null) {
             task = new TaskList(wtoken, this);
@@ -163,8 +135,6 @@
     }
 
     void removeAppToken(final AppWindowToken wtoken) {
-        mAppTokens.remove(wtoken);
-        mAnimatingAppTokens.remove(wtoken);
         final int taskId = wtoken.groupId;
         final TaskList task = mTaskIdToTaskList.get(taskId);
         if (task != null) {
@@ -177,14 +147,6 @@
         }
     }
 
-    void refillAnimatingAppTokens() {
-        mAnimatingAppTokens.clear();
-        AppTokenIterator iterator = new AppTokenIterator();
-        while (iterator.hasNext()) {
-            mAnimatingAppTokens.add(iterator.next());
-        }
-    }
-
     void setAppTaskId(AppWindowToken wtoken, int newTaskId) {
         final int taskId = wtoken.groupId;
         TaskList task = mTaskIdToTaskList.get(taskId);