mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-05 06:11:05 +00:00
Warn user if layer config application failed before JDWP failure
This commit is contained in:
committed by
Baldur Karlsson
parent
fa22effc77
commit
b031e69597
@@ -1459,11 +1459,14 @@ ExecuteResult AndroidRemoteServer::ExecuteAndInject(const rdcstr &packageAndActi
|
||||
{
|
||||
info =
|
||||
"Do you have a strange device that requires extra setup?\n"
|
||||
"E.g. Xiaomi requires a developer account and \"USB debugging (Security Settings)\"\n";
|
||||
"E.g. Xiaomi requires a developer account and \"USB debugging (Security Settings)\"";
|
||||
|
||||
RDCERR("Couldn't verify that debug settings are set:\n%s\n%s", inString.c_str(),
|
||||
info.c_str());
|
||||
|
||||
result = RDResult(ResultCode::AndroidLayerConfFailed);
|
||||
result.message = info;
|
||||
|
||||
hookWithJDWP = true;
|
||||
|
||||
// need to tell the hooks to ignore the fact that layers are present because they're not
|
||||
@@ -1601,11 +1604,17 @@ ExecuteResult AndroidRemoteServer::ExecuteAndInject(const rdcstr &packageAndActi
|
||||
{
|
||||
RDCERR("Failed to inject using JDWP");
|
||||
ident = 0;
|
||||
result = RDResult(ResultCode::JDWPFailure);
|
||||
result.message = StringFormat::Fmt(
|
||||
"Failed to inject using JDWP when launching '%s' with activity '%s' and intent args "
|
||||
"'%s'",
|
||||
packageName.c_str(), activityName.c_str(), intentArgs.c_str());
|
||||
|
||||
// If layer configuration failed first, then report that to the user as it is usually easier
|
||||
// to fix
|
||||
if(result.code != ResultCode::AndroidLayerConfFailed)
|
||||
{
|
||||
result = RDResult(ResultCode::JDWPFailure);
|
||||
result.message = StringFormat::Fmt(
|
||||
"Failed to inject using JDWP when launching '%s' with activity '%s' and intent args "
|
||||
"'%s'",
|
||||
packageName.c_str(), activityName.c_str(), intentArgs.c_str());
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user