OSDN Git Service

Synchronize RootWindowContainerTests
authorchaviw <chaviw@google.com>
Tue, 24 Apr 2018 22:23:53 +0000 (15:23 -0700)
committerchaviw <chaviw@google.com>
Tue, 24 Apr 2018 22:39:32 +0000 (15:39 -0700)
commit0dc5880ab7dc350738ce3edc873e443c226718f4
treee3f5490673ae31b8fabd534d291d3c95f60b1d83
parent167710981c30ec8b23ecd7367a00c1d8fee7d263
Synchronize RootWindowContainerTests

There were a few failures that seem to be threading issues.
Specifically, IndexOutOfBounds within a for loop that was iterating the
size of the ArrayList and ArrayMap index failure. RootWindowContainerTests
calls into methods in WM that assume the WM lock is already held. Ensure
testSetDisplayOverrideConfigurationIfNeeded is synchronized.

Test: RootWindowContainerTests#testSetDisplayOverrideConfigurationIfNeeded
Change-Id: I5003fc4a59baae4990a1464dbbc85b0938312994
Fixes: 78349285
services/tests/servicestests/src/com/android/server/wm/RootWindowContainerTests.java