diff options
author | Tobrun <tobrun.van.nuland@gmail.com> | 2018-01-24 11:28:47 +0100 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2018-01-24 15:46:19 +0100 |
commit | 1a2c316f951ad4d19b0eb89eba2559801deaa385 (patch) | |
tree | b818006d38af49bbbc428390e8ea7a1dd9c04bb4 | |
parent | 4ff9fe762d2012080052b4c1fe3482286b30ca51 (diff) | |
download | qtlocation-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.java | 3 |
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 |