Merge upstream changes from android.googlesource.com