android: Remove android:process from GetExecutableFilename

In Android Q, apps that use android:process will have a colon and
text in the result of cmdline, breaking the intent of the function.

https://developer.android.com/guide/topics/manifest/service-element#proc
This commit is contained in:
Cody Northrop
2019-05-28 14:07:11 -06:00
committed by baldurk
parent ecb704f014
commit b2ef4884e0
@@ -90,7 +90,10 @@ void GetExecutableFilename(std::string &selfName)
return;
}
selfName = buf;
// Strip any process name from cmdline (android:process)
std::string cmdline = buf;
std::string filename = cmdline.substr(0, cmdline.find(":"));
selfName = filename;
}
void GetLibraryFilename(std::string &selfName)