Updated from AndroidStudio library source code.