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

Create Handler using the main thread looper #11021

Merged
merged 1 commit into from
Jan 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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