Android: Refactoring shared data adapter