提交 0d073699 编写于 作者: H hanyuhang

Anbox:add_or_update:Skip 5 apk's desktop

com-android-calendar
com-android-deskclock
com-android-contacts
com-android-email
com-android-music
上级 a5933f40
......@@ -34,9 +34,17 @@ constexpr const char *snap_exe_path{"/snap/bin/anbox"};
namespace anbox {
namespace application {
LauncherStorage::LauncherStorage(const fs::path &path) :
path_(path) {}
path_(path) {
set_.insert("com-android-contacts");
set_.insert("com-android-calendar");
set_.insert("com-android-deskclock");
set_.insert("com-android-email");
set_.insert("com-android-music");
}
LauncherStorage::~LauncherStorage() {}
LauncherStorage::~LauncherStorage() {
set_.clear();
}
void LauncherStorage::reset() {
if (fs::exists(path_)) {
......@@ -69,6 +77,11 @@ void LauncherStorage::add_or_update(const Database::Item &item) {
auto package_name = item.package;
std::replace(package_name.begin(), package_name.end(), '.', '-');
if(set_.count(package_name)) {
DEBUG("package_name:%s skip!!!\n", package_name);
return ;
}
auto exe_path = utils::process_get_exe_path(getpid());
if (utils::get_env_value("SNAP").length() > 0)
......
......@@ -23,6 +23,7 @@
#include <string>
#include <vector>
#include <set>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string/predicate.hpp>
......@@ -44,6 +45,7 @@ class LauncherStorage {
boost::filesystem::path path_for_item_icon(const std::string &package_name);
boost::filesystem::path path_;
std::set<std::string> set_;
};
} // namespace application
} // namespace anbox
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册