extract methods and add getters in tradefed code.

This is a refactoring change that doesn't change functionality.
This change makes it easier to create subclass with multi-device support.

Test: local test through vts that uses cts tradefed
Test: presubmit cts unit tests
Bug: 32975551
Signed-off-by: Yuexi Ma <yuexima@google.com>
Change-Id: Ib69eb04229a664aef0e0630a77d09756bdb9d5f1
(cherry picked from commit 5729b0118b75634c6dcb5640cf72d72d4c86b77d)
3 files changed