Rebase against code from Android 4.4.4_r2

Resolves #21