Add an abstracted interface around android-specific handling

* This makes it easier to use the same kind of interface to manage other kinds
  of devices.
This commit is contained in:
baldurk committed 2019-07-31 17:51:13 +01:00
1 parent 06f2e61b8f
commit e2704fa2eb
34 files changed
+2340 -1492

No files matched your search

+4 -2
View File
@@ -678,7 +678,8 @@ void CaptureDialog::on_exePathBrowse_clicked()
{
SetExecutableFilename(filename);
if(m_Ctx.Replay().CurrentRemote().IsADB())
if(m_Ctx.Replay().CurrentRemote().Protocol() &&
m_Ctx.Replay().CurrentRemote().Protocol()->GetProtocolName() == "adb")
{
CheckAndroidSetup(filename);
}
@@ -1122,7 +1123,8 @@ void CaptureDialog::UpdateGlobalHook()
void CaptureDialog::UpdateRemoteHost()
{
if(m_Ctx.Replay().CurrentRemote().IsADB())
if(m_Ctx.Replay().CurrentRemote().Protocol() &&
m_Ctx.Replay().CurrentRemote().Protocol()->GetProtocolName() == "adb")
ui->cmdLineLabel->setText(tr("Intent Arguments"));
else
ui->cmdLineLabel->setText(tr("Command-line Arguments"));
+3 -5
View File
@@ -105,8 +105,6 @@ RemoteManager::RemoteManager(ICaptureContext &ctx, MainWindow *main)
vertical->addWidget(lookupsProgressFlow);
vertical->addWidget(ui->bottomLayout->parentWidget());
m_Ctx.Config().AddAndroidHosts();
for(RemoteHost h : m_Ctx.Config().GetRemoteHosts())
addHost(h);
@@ -446,9 +444,9 @@ void RemoteManager::on_hosts_itemSelectionChanged()
ui->addUpdateHost->setText(tr("Update"));
if(host.IsLocalhost() || host.IsADB())
if(host.IsLocalhost() || host.Protocol())
{
// localhost and android hosts cannot be updated or have their run command changed
// localhost and protocol-configured hosts cannot be updated or have their run command changed
ui->addUpdateHost->setEnabled(false);
ui->runCommand->setEnabled(false);
}
@@ -601,7 +599,7 @@ void RemoteManager::on_connect_clicked()
{
IRemoteServer *server = NULL;
ReplayStatus status =
RENDERDOC_CreateRemoteServerConnection(host.Hostname().c_str(), 0, &server);
RENDERDOC_CreateRemoteServerConnection(host.Hostname().c_str(), &server);
if(server)
server->ShutdownServerAndConnection();
setRemoteServerLive(node, false, false);