(Android) Change some autodetection logic