Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e01fdf5 authored by Eric Miao's avatar Eric Miao
Browse files

Fix the condition to use compact resource entries

Use/encode the resources with compact entries only when minSdkVersion is
U+.

Change-Id: I36380f6856e5fdaa82a0cc290d480a4ec453ea60
parent 22f996bc
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -145,8 +145,7 @@ class PackageFlattener {
  // 2) the entries will be accessed on platforms U+, and
  // 3) all entry keys can be encoded in 16 bits
  bool UseCompactEntries(const ConfigDescription& config, std::vector<FlatEntry>* entries) const {
    return compact_entries_ &&
        (context_->GetMinSdkVersion() > SDK_TIRAMISU || config.sdkVersion > SDK_TIRAMISU) &&
    return compact_entries_ && context_->GetMinSdkVersion() > SDK_TIRAMISU &&
      std::none_of(entries->cbegin(), entries->cend(),
        [](const auto& e) { return e.entry_key >= std::numeric_limits<uint16_t>::max(); });
  }