Remove application launcher when its android counterpart is removed
This commit is contained in:
parent
d30e8f1a74
commit
69631a1bfc
10 changed files with 131 additions and 22 deletions
|
|
@ -88,6 +88,12 @@ void PlatformApiStub::update_application_list(const ApplicationListUpdate &updat
|
|||
app->set_icon(a.icon.data(), a.icon.size());
|
||||
}
|
||||
|
||||
for (const auto &package : update.removed_applications) {
|
||||
auto app = event->add_removed_applications();
|
||||
app->set_name("unknown");
|
||||
app->set_package(package);
|
||||
}
|
||||
|
||||
rpc_channel_->send_event(seq);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ public:
|
|||
std::vector<int8_t> icon;
|
||||
};
|
||||
std::vector<Application> applications;
|
||||
std::vector<std::string> removed_applications;
|
||||
};
|
||||
|
||||
void update_application_list(const ApplicationListUpdate &update);
|
||||
|
|
|
|||
|
|
@ -120,6 +120,12 @@ status_t PlatformService::update_application_list(const Parcel &data) {
|
|||
update.applications.push_back(p);
|
||||
}
|
||||
|
||||
const auto num_removed_packages = data.readInt32();
|
||||
for (auto n = 0; n < num_removed_packages; n++) {
|
||||
String8 package_name(data.readString16());
|
||||
update.removed_applications.push_back(package_name.string());
|
||||
}
|
||||
|
||||
platform_api_stub_->update_application_list(update);
|
||||
|
||||
return OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue