-
- public static void register_map_cache_listener(AltosUIMapCacheListener l) {
- synchronized(backend) {
- map_cache_listeners.add(l);
- }
- }
-
- public static void unregister_map_cache_listener(AltosUIMapCacheListener l) {
- synchronized (backend) {
- map_cache_listeners.remove(l);
- }
- }
-
- public static void set_map_cache(int new_map_cache) {
- synchronized(backend) {
- map_cache = new_map_cache;
- backend.putInt(mapCachePreference, map_cache);
- flush_preferences();
- for (AltosUIMapCacheListener l: map_cache_listeners)
- l.map_cache_changed(map_cache);
- }
- }
-
- public static int map_cache() {
- synchronized(backend) {
- return map_cache;
- }
- }