How to optimize Android development code