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

Commit

Permalink
[android] - activate filesource to list offline regions (#10531)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobrun authored Nov 22, 2017
1 parent d46641c commit 59a8fd2
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,16 @@ private Handler getHandler() {
*
* @param callback the callback to be invoked
*/
public void listOfflineRegions(@NonNull
final ListOfflineRegionsCallback callback) {
public void listOfflineRegions(@NonNull final ListOfflineRegionsCallback callback) {
fileSource.activate();
listOfflineRegions(fileSource, new ListOfflineRegionsCallback() {

@Override
public void onList(final OfflineRegion[] offlineRegions) {
getHandler().post(new Runnable() {
@Override
public void run() {
fileSource.deactivate();
callback.onList(offlineRegions);
}
});
Expand All @@ -168,6 +169,7 @@ public void onError(final String error) {
getHandler().post(new Runnable() {
@Override
public void run() {
fileSource.deactivate();
callback.onError(error);
}
});
Expand Down Expand Up @@ -241,6 +243,7 @@ private boolean isValidOfflineRegionDefinition(OfflineRegionDefinition definitio
/**
* Changing or bypassing this limit without permission from Mapbox is prohibited
* by the Mapbox Terms of Service.
*
* @param limit the new tile count limit.
*/
public native void setOfflineMapboxTileCountLimit(long limit);
Expand Down

0 comments on commit 59a8fd2

Please sign in to comment.