Allow clients to specify the launch bounds of a new activity
This commit is contained in:
parent
14d8bb2390
commit
324407eeaa
9 changed files with 43 additions and 12 deletions
|
|
@ -28,6 +28,7 @@
|
|||
#include <binder/IServiceManager.h>
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
namespace {
|
||||
std::map<std::string,std::string> common_env = {
|
||||
|
|
@ -48,9 +49,9 @@ void AndroidApiSkeleton::wait_for_process(core::posix::ChildProcess &process,
|
|||
const auto result = process.wait_for(core::posix::wait::Flags::untraced);
|
||||
if (result.status != core::posix::wait::Result::Status::exited ||
|
||||
result.detail.if_exited.status != core::posix::exit::Status::success) {
|
||||
response->set_error("Failed to install application");
|
||||
response->set_error("Failed to execute process");
|
||||
// FIXME once we add proper error codes/domains we need to add structured error
|
||||
// info the response here.
|
||||
// info to the response here.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -76,6 +77,16 @@ void AndroidApiSkeleton::launch_application(anbox::protobuf::bridge::LaunchAppli
|
|||
"--stack", "2",
|
||||
};
|
||||
|
||||
if (request->has_launch_bounds()) {
|
||||
argv.push_back("--launch-bounds");
|
||||
std::stringstream launch_bounds;
|
||||
launch_bounds << request->launch_bounds().left() << " "
|
||||
<< request->launch_bounds().top() << " "
|
||||
<< request->launch_bounds().right() << " "
|
||||
<< request->launch_bounds().bottom();
|
||||
argv.push_back(launch_bounds.str());
|
||||
}
|
||||
|
||||
if (intent.has_action()) {
|
||||
argv.push_back("-a");
|
||||
argv.push_back(intent.action());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue