Back-port fixes for b/62196835 am: fd0ca151 am: 3c4d2492 -s ours am: 68efc2e5 am: e06843fe am: e11e076f am: 62eca82f Change-Id: I9a274bfc59f545076adeb2a82cde269457eecc67