summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeith Bade <leith@mapbox.com>2015-08-17 15:38:07 +1000
committerLeith Bade <leith@mapbox.com>2015-08-17 15:38:07 +1000
commit39e1e81b8c8727db8c05b4d099c767acf029b12c (patch)
tree7273037e309769b20a2e242662585ae5dd4584d4
parentadab9a6b3f6cf1f8fbee5703f73e4b00ec3116e5 (diff)
downloadqtlocation-mapboxgl-39e1e81b8c8727db8c05b4d099c767acf029b12c.tar.gz
Move validateAccessToken to onCreate
-rw-r--r--android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/views/MapView.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/views/MapView.java b/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/views/MapView.java
index d73eb31fba..ae221964b6 100644
--- a/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/views/MapView.java
+++ b/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/views/MapView.java
@@ -645,6 +645,9 @@ public class MapView extends FrameLayout implements LocationListener {
mNativeMapView.setDefaultTransitionDuration(savedInstanceState.getLong(STATE_DEFAULT_TRANSITION_DURATION));
}
+ // Force a check for an access token
+ validateAccessToken(getAccessToken());
+
mNativeMapView.initializeDisplay();
mNativeMapView.initializeContext();
@@ -682,7 +685,6 @@ public class MapView extends FrameLayout implements LocationListener {
// Called when we need to create the GL context
// Must be called from Activity onStart
public void onStart() {
- validateAccessToken(getAccessToken());
}
// Called when we need to terminate the GL context