mapzen / eraser-map

Privacy-focused mapping application for Android
GNU General Public License v3.0
74 stars 24 forks source link

Dont invoke client connect when already connected #752

Closed sarahsnow1 closed 7 years ago

sarahsnow1 commented 7 years ago

This change fixes a crash caused when mock routing was enabled. Previously, calls to connect an already connected client created an infinite loop in MainActivity#checkPermissionAndEnableLocation. LostApiClient#connect invoked ConnectionCallbacks#onConnected. This would trigger queued runnables to run in LostClientManager which would start the loop again...now the underlying client will not be called if it is already connected.

Closes #751