Merge \"Solve the infinite loop on clearExternalStorageDataSync\" into nyc-dev

am: d25c718a12

Change-Id: I93d2a6fe287491b957e2851de2ead9d878702e63
This commit is contained in:
Tetsutoki Shiozawa
2016-06-10 23:20:50 +00:00
committed by android-build-merger

View File

@@ -16344,8 +16344,9 @@ public class PackageManagerService extends IPackageManager.Stub {
for (int curUser : users) {
long timeout = SystemClock.uptimeMillis() + 5000;
synchronized (conn) {
long now = SystemClock.uptimeMillis();
while (conn.mContainerService == null && now < timeout) {
long now;
while (conn.mContainerService == null &&
(now = SystemClock.uptimeMillis()) < timeout) {
try {
conn.wait(timeout - now);
} catch (InterruptedException e) {