Move disconnect command handling to a common place
am: 02242d7b36

Change-Id: Iad00e1d96a353f6889425e1efb1c81f90a99dd52