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

Commit

Permalink
[android] #3891 - rename OFFLINE_MAX_CACHE_SIZE to DEFAULT_MAX_CACHE_…
Browse files Browse the repository at this point in the history
…SIZE and adjust value
  • Loading branch information
zugaldia committed Feb 23, 2016
1 parent 6a7228d commit 3e4f8f7
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
*/
public class OfflineManager {

// Default database name and size (1GB)
// Default database name
private final static String OFFLINE_DATABASE_NAME = "mbgl-offline.db";
private final static long OFFLINE_MAX_CACHE_SIZE = 1024 * 1024 * 1024;

// Resources required by offline regions are exempt from this limit
private final static long DEFAULT_MAX_CACHE_SIZE = 50 * 1024 * 1024;

// Holds the pointer to JNI DefaultFileSource
private long mDefaultFileSourcePtr = 0;
Expand Down Expand Up @@ -52,7 +54,7 @@ private OfflineManager(Context context) {
// Get a pointer to the DefaultFileSource instance
String assetRoot = context.getFilesDir().getAbsolutePath();
String cachePath = assetRoot + File.separator + OFFLINE_DATABASE_NAME;
mDefaultFileSourcePtr = createDefaultFileSource(cachePath, assetRoot, OFFLINE_MAX_CACHE_SIZE);
mDefaultFileSourcePtr = createDefaultFileSource(cachePath, assetRoot, DEFAULT_MAX_CACHE_SIZE);
}

public static synchronized OfflineManager getInstance(Context context) {
Expand Down

0 comments on commit 3e4f8f7

Please sign in to comment.