handle manual port switching

ag/5032489

Bug: 112478040
Test: make;
Change-Id: I260b354b95f184cc0359477bd09418625ff23201
7 files changed