Merge "DO NOT MERGE Add empty ArrayList check." into klp-modular-dev

This commit is contained in:
Prashant Malani
2014-10-15 17:02:00 +00:00
committed by Android (Google) Code Review

View File

@@ -4855,8 +4855,11 @@ public class WindowManagerService extends IWindowManager.Stub
// Where to start adding?
for (int taskNdx = 0; taskNdx < numTasks; ++taskNdx) {
AppTokenList tokens = tasks.get(taskNdx).mAppTokens;
int pos = findAppWindowInsertionPointLocked(tokens.get(0));
final int numTokens = tokens.size();
if (numTokens == 0) {
continue;
}
int pos = findAppWindowInsertionPointLocked(tokens.get(0));
for (int tokenNdx = 0; tokenNdx < numTokens; ++tokenNdx) {
final AppWindowToken wtoken = tokens.get(tokenNdx);
if (wtoken != null) {