Implement wait/notify properly
This commit is contained in:
parent
fdb3e0b238
commit
d37c151b02
@ -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) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user