Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] #4328 - Make Telemetry start only when savedInstanceState i…
Browse files Browse the repository at this point in the history
…s null
  • Loading branch information
bleege committed Mar 18, 2016
1 parent 4f816dc commit d33cee7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -371,13 +371,13 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
trackingSettings.setMyLocationTrackingMode(savedInstanceState.getInt(MapboxConstants.STATE_MY_LOCATION_TRACKING_MODE, MyLocationTracking.TRACKING_NONE));
//noinspection ResourceType
trackingSettings.setMyBearingTrackingMode(savedInstanceState.getInt(MapboxConstants.STATE_MY_BEARING_TRACKING_MODE, MyBearingTracking.NONE));
} else {
} else if (savedInstanceState == null) {
// Force a check for Telemetry
validateTelemetryServiceConfigured();

// Start Telemetry (authorization determined in initial MapboxEventManager constructor)
MapboxEventManager eventManager = MapboxEventManager.getMapboxEventManager();
eventManager.initialise(getContext(), getAccessToken());
eventManager.initialize(getContext(), getAccessToken());
}

// Initialize EGL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private MapboxEventManager() {
* @param context The context associated with MapView
* @param accessToken The accessToken to load MapView
*/
public void initialise(@NonNull Context context, @NonNull String accessToken) {
public void initialize(@NonNull Context context, @NonNull String accessToken) {
this.context = context.getApplicationContext();
this.accessToken = accessToken;

Expand Down

0 comments on commit d33cee7

Please sign in to comment.