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

Commit

Permalink
[android] - create Handler using the main thread looper
Browse files Browse the repository at this point in the history
  • Loading branch information
tobrun committed Jan 24, 2018
1 parent 4ff9fe7 commit 1a2c316
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1a2c316

Please sign in to comment.