Add support for multiple connected android devices

* We forward a different range of ports to each device so we can pick
  and choose which to communicate with based on its index.
* The index is encoded in the 'hostname' like so: adb:X:deviceidhere
* Whenever we want to interact with an android device we always specify
  the device, never leave it to a default.
This commit is contained in:
baldurk
2017-06-14 16:12:20 +01:00
committed by Baldur Karlsson
parent 06b5b300c3
commit 6423a82d18
13 changed files with 143 additions and 69 deletions
@@ -197,14 +197,12 @@ void PersistantConfig::AddAndroidHosts()
{
RemoteHost *host = NULL;
QString fullHostname = lit("adb:") + hostName;
if(oldHosts.contains(fullHostname))
host = oldHosts.take(fullHostname);
if(oldHosts.contains(hostName))
host = oldHosts.take(hostName);
else
host = new RemoteHost();
host->Hostname = fullHostname;
host->Hostname = hostName;
rdctype::str friendly;
RENDERDOC_GetAndroidFriendlyName(hostName.toUtf8().data(), friendly);
host->FriendlyName = ToQStr(friendly);