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);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
void startRemoteUpdates(final long updateTimeMS, final long callbackId, final IOsmAndAidlCallback callback) {
|
||||
mHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
if (callbacks.containsKey(callbackId)) {
|
||||
if (getApi("isUpdateAllowed").isUpdateAllowed()) {
|
||||
callback.onUpdate();
|
||||
void startRemoteUpdates(final long updateTimeMS, final long callbackId, final IOsmAndAidlCallback callback) {
|
||||
mHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
if (callbacks.containsKey(callbackId)) {
|
||||
if (getApi("isUpdateAllowed").isUpdateAllowed()) {
|
||||
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