Implement wait/notify properly

This commit is contained in:
Christopher Eby 2011-09-11 18:40:39 -05:00
parent fdb3e0b238
commit d37c151b02

View File

@ -97,7 +97,9 @@ public class ContextApplication extends Application {
mInstance.startService(new Intent(mInstance, PlaybackService.class)); mInstance.startService(new Intent(mInstance, PlaybackService.class));
while (mService == null) { while (mService == null) {
try { try {
synchronized (mInstance) {
mInstance.wait(); mInstance.wait();
}
} catch (InterruptedException e) { } catch (InterruptedException e) {
} }
} }