public static Boolean hasOfflineMap(final Context context){
  final SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(context);
  final String map=prefs.getString(Preferences.KEY_MAP_FILE,Preferences.VAL_MAP_FILE);
  Log.i(TAG,"Selected map: " + map);
  return (!map.equals(Preferences.VAL_MAP_NONE) && !map.equals(Preferences.VAL_MAP_ONLINE));
}

public static Boolean hasOfflineMap ( final Context context ) { final SharedPreferences prefs = PreferenceManager . getDefaultSharedPreferences ( context ) ; final String map = prefs . getString ( Preferences . KEY_MAP_FILE , Preferences . VAL_MAP_FILE ) ; Log . i ( TAG , "Selected map: " + map ) ; return ( ! map . equals ( Preferences . VAL_MAP_NONE ) && ! map . equals ( Preferences . VAL_MAP_ONLINE ) ) ; }
checks whether a valid map file has been selected
