Android: Minor changes

- Use the character version of lastIndexOf
- Use a StringBuilder instead of a raw String. Doesn't destroy/recreate the string every time we append to it.