[Android] Code refactoring