RequestResult mode = RequestResult::NORMAL) {
const char* argv[] = {"", "-b", recovery_file.c_str(), "-u",
kTestUserIdStr.c_str()};
- TestPkgmgrInstaller pkgmgr_installer;
- std::unique_ptr<ci::AppQueryInterface> query_interface =
- CreateQueryInterface();
- auto pkgmgr =
- ci::PkgMgrInterface::Create(SIZEOFARRAY(argv), const_cast<char**>(argv),
- &pkgmgr_installer, query_interface.get());
- if (!pkgmgr) {
- LOG(ERROR) << "Failed to initialize pkgmgr interface";
- return ci::AppInstaller::Result::UNKNOWN;
- }
- return RunInstallerWithPkgrmgr(pkgmgr, type, mode);
+ return CallBackend(SIZEOFARRAY(argv), argv, type, mode);
}
void BackupPath(const bf::path& path) {