Merge PR #909: Fix a race condition in initializing the android service
This commit is contained in:
commit
bdf77f1ce3
@ -119,7 +119,9 @@ public class NymeaAppServiceConnection implements ServiceConnection {
|
|||||||
nymeaHost.name = instanceMap.getString("name");
|
nymeaHost.name = instanceMap.getString("name");
|
||||||
nymeaHost.isReady = instanceMap.getBoolean("isReady");
|
nymeaHost.isReady = instanceMap.getBoolean("isReady");
|
||||||
m_nymeaHosts.put(nymeaHost.id, nymeaHost);
|
m_nymeaHosts.put(nymeaHost.id, nymeaHost);
|
||||||
|
if (nymeaHost.isReady) {
|
||||||
|
fetchThings(nymeaHost.id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Log.d(TAG, "Error while processing JSON in communication with NymeaAppService: " + e.toString());
|
Log.d(TAG, "Error while processing JSON in communication with NymeaAppService: " + e.toString());
|
||||||
|
|||||||
Reference in New Issue
Block a user