summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorŁukasz Paczos <lukas.paczos@gmail.com>2019-04-11 14:04:30 +0200
committerŁukasz Paczos <lukasz.paczos@mapbox.com>2019-04-11 14:58:05 +0200
commitbd5527fea7da17bc5dd2f3611788702a2c708c09 (patch)
treec82fab37a976a5ef314498dc34ba96fe06f6950d /platform/android
parent51daaa1e3c842337aa37656d8cf7818bc5c5c38f (diff)
downloadqtlocation-mapboxgl-bd5527fea7da17bc5dd2f3611788702a2c708c09.tar.gz
[android] ignore equal offline region's download state updates
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegion.java4
1 files changed, 4 insertions, 0 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 a4f114e758..863219854b 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
@@ -313,6 +313,10 @@ public class OfflineRegion {
* @param state the download state
*/
public void setDownloadState(@DownloadState int state) {
+ if (this.state == state) {
+ return;
+ }
+
if (state == STATE_ACTIVE) {
ConnectivityReceiver.instance(context).activate();
fileSource.activate();