[Android] Better factorization.