This change also cleanups compiler warnings. Bug: 2897373 Change-Id: If972cf45c1eb40436adbddbf71969e5409f4c9c5