Skip to content

Commit

Permalink
fixing bug with idle listener and regin change events
Browse files Browse the repository at this point in the history
  • Loading branch information
cpetzel committed Jun 11, 2018
1 parent 499b986 commit 5b3b5cc
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,11 @@ public void onCameraIdle() {
long curTimestamp = System.currentTimeMillis();
boolean curAnimated = mCameraChangeTracker.isAnimated();
if (curTimestamp - lastTimestamp < 500 && curAnimated == lastAnimated) {
// even if we don't send the change event, we need to set the reason...
//this happens when you have multiple calls to setCamera very quickly. This method will short circuit,
//and then the next time the user moves the map, it will think it is NOT from a user interaction , because
// this flag was not reset
mCameraChangeTracker.setReason(-1);
return;
}

Expand Down

0 comments on commit 5b3b5cc

Please sign in to comment.