Merge "Clean up key handling in adb." am: b859830450
am: 81a3f71e45

Change-Id: I7013113e72eefd68a9329d0da72a45946d860e14