summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2018-01-24 11:28:47 +0100
committerTobrun <tobrun@mapbox.com>2018-02-05 12:03:19 +0100
commitff29a0cb99d5e8aedc66207080d7e83a7e2dc0dd (patch)
tree846201ece9c15a031d2efe7c74627fdea86415c0
parentc8a96bb24ff23513b67c258e60f5820ee3134802 (diff)
downloadqtlocation-mapboxgl-ff29a0cb99d5e8aedc66207080d7e83a7e2dc0dd.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 c033b1cbcb..987756876b 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