Send updates with icons separately to not overflow protobuf
This commit is contained in:
parent
31c64f0a19
commit
14774c0177
2 changed files with 10 additions and 2 deletions
|
|
@ -99,7 +99,8 @@ void PlatformApiStub::update_application_list(const ApplicationListUpdate &updat
|
||||||
*c = category;
|
*c = category;
|
||||||
}
|
}
|
||||||
|
|
||||||
app->set_icon(a.icon.data(), a.icon.size());
|
if (a.icon.size() > 0)
|
||||||
|
app->set_icon(a.icon.data(), a.icon.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &package : update.removed_applications) {
|
for (const auto &package : update.removed_applications) {
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,14 @@ status_t PlatformService::update_application_list(const Parcel &data) {
|
||||||
|
|
||||||
data.readByteVector(&p.icon);
|
data.readByteVector(&p.icon);
|
||||||
|
|
||||||
update.applications.push_back(p);
|
// Send updates with icons separately to not overflow protobuf
|
||||||
|
if (p.icon.size() > 0) {
|
||||||
|
anbox::PlatformApiStub::ApplicationListUpdate with_icon_update;
|
||||||
|
with_icon_update.applications.push_back(p);
|
||||||
|
platform_api_stub_->update_application_list(with_icon_update);
|
||||||
|
} else {
|
||||||
|
update.applications.push_back(p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto num_removed_packages = data.readInt32();
|
const auto num_removed_packages = data.readInt32();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue