"bmgr restore" really should wait until operation finishes.

Test: manual test
Bug 37246838

Change-Id: Ice381dc250e2d2a59cff48152dd3c8d6897d0804
This commit is contained in:
Makoto Onuki
2017-04-12 10:10:22 -07:00
parent 6acaa0382c
commit a56ba60c94

View File

@@ -580,6 +580,11 @@ public final class Bmgr {
}
}
/**
* Wait until either {@link #restoreFinished} or {@link #restoreStarting} is called.
* Once one is called, it clears the internal flag again, so that the same observer intance
* can be reused for a next operation.
*/
public void waitForCompletion() {
// The restoreFinished() callback will throw the 'done' flag; we
// just sit and wait on that notification.
@@ -590,6 +595,7 @@ public final class Bmgr {
} catch (InterruptedException ex) {
}
}
done = false;
}
}
}