Made Task.mAppTokens private scoped
Also, remove TaskStack.getTask() method.
Bug: 30060889
Change-Id: I1ed9710ff630b390d28e6f2146db4202e2bc860b
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 5c6cb6b..837f0d3 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -54,7 +54,7 @@
static final int BOUNDS_CHANGE_SIZE = 1 << 1;
TaskStack mStack;
- final AppTokenList mAppTokens = new AppTokenList();
+ private final AppTokenList mAppTokens = new AppTokenList();
final int mTaskId;
final int mUserId;
boolean mDeferRemoval = false;
@@ -182,6 +182,17 @@
}
}
+ boolean checkCompleteDeferredRemoval() {
+ boolean stillDeferringRemoval = false;
+
+ for (int tokenNdx = mAppTokens.size() - 1; tokenNdx >= 0; --tokenNdx) {
+ final AppWindowToken token = mAppTokens.get(tokenNdx);
+ stillDeferringRemoval |= token.checkCompleteDeferredRemoval();
+ }
+
+ return stillDeferringRemoval;
+ }
+
// TODO: Don't forget to switch to WC.detachChild
void detachChild(AppWindowToken wtoken) {
if (!removeAppToken(wtoken)) {
@@ -684,6 +695,27 @@
return false;
}
+ void checkAppWindowsReadyToShow(int displayId) {
+ for (int i = mAppTokens.size() - 1; i >= 0; --i) {
+ final AppWindowToken aToken = mAppTokens.get(i);
+ aToken.checkAppWindowsReadyToShow(displayId);
+ }
+ }
+
+ void updateAllDrawn(int displayId) {
+ for (int i = mAppTokens.size() - 1; i >= 0; --i) {
+ final AppWindowToken aToken = mAppTokens.get(i);
+ aToken.updateAllDrawn(displayId);
+ }
+ }
+
+ void stepAppWindowsAnimation(long currentTime, int displayId) {
+ for (int i = mAppTokens.size() - 1; i >= 0; --i) {
+ final AppWindowToken aToken = mAppTokens.get(i);
+ aToken.stepAppWindowsAnimation(currentTime, displayId);
+ }
+ }
+
void onAppTransitionDone() {
for (int i = mAppTokens.size() - 1; i >= 0; --i) {
final AppWindowToken token = mAppTokens.get(i);
@@ -706,7 +738,7 @@
}
void getWindowOnDisplayBeforeToken(DisplayContent dc, WindowToken token,
- DisplayContent.GetWindowOnDisplaySearchResults result) {
+ DisplayContent.GetWindowOnDisplaySearchResult result) {
for (int i = mAppTokens.size() - 1; i >= 0; --i) {
final AppWindowToken current = mAppTokens.get(i);
if (current == token) {
@@ -725,7 +757,7 @@
}
void getWindowOnDisplayAfterToken(DisplayContent dc, WindowToken token,
- DisplayContent.GetWindowOnDisplaySearchResults result) {
+ DisplayContent.GetWindowOnDisplaySearchResult result) {
for (int i = mAppTokens.size() - 1; i >= 0; --i) {
final AppWindowToken current = mAppTokens.get(i);
if (!result.reachedToken) {