Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions plugin-offline/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Mapbox welcomes participation and contributions from everyone.

### mapbox-android-plugin-offline-v9:0.8.0 - XXX
#### Bugs
- Cancel download should remove region definition [#1145](https://github.com/mapbox/mapbox-plugins-android/pull/1145)

### mapbox-android-plugin-offline-v9:0.7.0 - March 5, 2020
#### Features
- Switching all plugins to AndroidX [#1100](https://github.com/mapbox/mapbox-plugins-android/pull/1100)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ void showNotification(final OfflineDownloadOptions offlineDownload) {
createMapSnapshot(offlineDownload.definition(), new MapSnapshotter.SnapshotReadyCallback() {
@Override
public void onSnapshotReady(MapSnapshot snapshot) {
final int regionId = offlineDownload.uuid().intValue();
final Long regionId = offlineDownload.uuid();
if (regionLongSparseArray.get(regionId) != null) {
notificationBuilder.setLargeIcon(snapshot.getBitmap());
notificationManager.notify(regionId, notificationBuilder.build());
notificationManager.notify(regionId.intValue(), notificationBuilder.build());
}
}
});
Expand All @@ -180,7 +180,7 @@ private void createMapSnapshot(OfflineRegionDefinition definition,
}

private void cancelDownload(final OfflineDownloadOptions offlineDownload) {
int serviceId = offlineDownload.uuid().intValue();
final Long serviceId = offlineDownload.uuid();
OfflineRegion offlineRegion = regionLongSparseArray.get(serviceId);
if (offlineRegion != null) {
offlineRegion.setDownloadState(OfflineRegion.STATE_INACTIVE);
Expand All @@ -198,7 +198,7 @@ public void onError(String error) {
});
}
OfflineDownloadStateReceiver.dispatchCancelBroadcast(getApplicationContext(), offlineDownload);
removeOfflineRegion(serviceId);
removeOfflineRegion(serviceId.intValue());
}

private synchronized void removeOfflineRegion(int regionId) {
Expand Down