Merge "Solve the infinite loop on clearExternalStorageDataSync"
This commit is contained in:
@@ -13330,8 +13330,9 @@ public class PackageManagerService extends IPackageManager.Stub {
|
|||||||
for (int curUser : users) {
|
for (int curUser : users) {
|
||||||
long timeout = SystemClock.uptimeMillis() + 5000;
|
long timeout = SystemClock.uptimeMillis() + 5000;
|
||||||
synchronized (conn) {
|
synchronized (conn) {
|
||||||
long now = SystemClock.uptimeMillis();
|
long now;
|
||||||
while (conn.mContainerService == null && now < timeout) {
|
while (conn.mContainerService == null &&
|
||||||
|
(now = SystemClock.uptimeMillis()) < timeout) {
|
||||||
try {
|
try {
|
||||||
conn.wait(timeout - now);
|
conn.wait(timeout - now);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user