If you are sure that onLocationChanged() is called before finished, try this:
Declare an Activity field private bolean isAllDone = true;
Declare a lock object private final Object lock = new Object();
Then at onLocationChange test it:
public void onLocationChanged(Location location) {
if(isAllDone){
synchronized (lock){
if(isAllDone){
isAllDone = false;
//do alot of job
isAllDone = true;
}
}
}
}