add handleException to startRemoteUpdates
This commit is contained in:
parent
5ce94dc933
commit
2f731a9036
1 changed files with 15 additions and 15 deletions
|
@ -618,23 +618,23 @@ public class OsmandAidlService extends Service {
|
||||||
callbacks.remove(callbackId);
|
callbacks.remove(callbackId);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
void startRemoteUpdates(final long updateTimeMS, final long callbackId, final IOsmAndAidlCallback callback) {
|
void startRemoteUpdates(final long updateTimeMS, final long callbackId, final IOsmAndAidlCallback callback) {
|
||||||
mHandler.postDelayed(new Runnable() {
|
mHandler.postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
if (callbacks.containsKey(callbackId)) {
|
if (callbacks.containsKey(callbackId)) {
|
||||||
if (getApi("isUpdateAllowed").isUpdateAllowed()) {
|
if (getApi("isUpdateAllowed").isUpdateAllowed()) {
|
||||||
callback.onUpdate();
|
callback.onUpdate();
|
||||||
|
}
|
||||||
|
startRemoteUpdates(updateTimeMS, callbackId, callback);
|
||||||
}
|
}
|
||||||
startRemoteUpdates(updateTimeMS, callbackId, callback);
|
} catch (RemoteException e) {
|
||||||
|
handleException(e);
|
||||||
}
|
}
|
||||||
} catch (RemoteException e) {
|
|
||||||
LOG.error("AIDL e.getMessage()", e);
|
|
||||||
}
|
}
|
||||||
}
|
}, updateTimeMS);
|
||||||
}, updateTimeMS);
|
}
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue