summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2018-01-24 11:28:47 +0100
committerTobrun <tobrun@mapbox.com>2018-01-24 15:46:19 +0100
commit1a2c316f951ad4d19b0eb89eba2559801deaa385 (patch)
treeb818006d38af49bbbc428390e8ea7a1dd9c04bb4
parent4ff9fe762d2012080052b4c1fe3482286b30ca51 (diff)
downloadqtlocation-mapboxgl-1a2c316f951ad4d19b0eb89eba2559801deaa385.tar.gz
[android] - create Handler using the main thread looper
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java
index 29dc581ea3..090e9576ee 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java
@@ -1,6 +1,7 @@
package com.mapbox.mapboxsdk.offline;
import android.os.Handler;
+import android.os.Looper;
import android.support.annotation.IntDef;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
@@ -51,7 +52,7 @@ public class OfflineRegion {
private byte[] metadata;
// Makes sure callbacks come back to the main thread
- private final Handler handler = new Handler();
+ private final Handler handler = new Handler(Looper.getMainLooper());
/**
* A region can have a single observer, which gets notified whenever a change