Skip to content

Commit

Permalink
fixed LocationTracking issue delayed permissions (#958)
Browse files Browse the repository at this point in the history
* fixed LocationTracking issue delayed permissions

* code review changes
  • Loading branch information
felix-ht committed Mar 24, 2022
1 parent 21a81ee commit 17a701f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ public boolean onTouch(View v, MotionEvent event) {
mapView.addOnDidBecomeIdleListener(this);

setStyleString(styleStringInitial);
// updateMyLocationEnabled();
}

@Override
Expand Down Expand Up @@ -1366,6 +1365,10 @@ public void setMyLocationEnabled(boolean myLocationEnabled) {

@Override
public void setMyLocationTrackingMode(int myLocationTrackingMode) {
if (mapboxMap != null) {
// ensure that location is trackable
updateMyLocationEnabled();
}
if (this.myLocationTrackingMode == myLocationTrackingMode) {
return;
}
Expand Down

0 comments on commit 17a701f

Please sign in to comment.