[DF-3966] fix android compilation and add "const" to some methods