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

Commit 59e7faed authored by Ryan Prichard's avatar Ryan Prichard Committed by Android (Google) Code Review
Browse files

Merge changes I241c8b2b,I9ab51f29,I6c231184 into main

* changes:
  Add missing <iterator> include for std::inserter
  Fix std::unique_ptr error with incomplete CommonFeatureGroup
  Move Theme::Entry definition to top of file
parents 57c84f5d 30170b1f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <algorithm>
#include <cassert>
#include <iomanip>
#include <iterator>
#include <memory>
#include <ostream>
#include <set>
+6 −6
Original line number Diff line number Diff line
@@ -91,6 +91,12 @@ struct FindEntryResult {
  StringPoolRef entry_string_ref;
};

struct Theme::Entry {
  ApkAssetsCookie cookie;
  uint32_t type_spec_flags;
  Res_value value;
};

AssetManager2::AssetManager2(ApkAssetsList apk_assets, const ResTable_config& configuration) {
  configurations_.push_back(configuration);

@@ -1605,12 +1611,6 @@ Theme::Theme(AssetManager2* asset_manager) : asset_manager_(asset_manager) {

Theme::~Theme() = default;

struct Theme::Entry {
  ApkAssetsCookie cookie;
  uint32_t type_spec_flags;
  Res_value value;
};

base::expected<std::monostate, NullOrIOError> Theme::ApplyStyle(uint32_t resid, bool force) {
  ATRACE_NAME("Theme::ApplyStyle");

+8 −4
Original line number Diff line number Diff line
@@ -216,9 +216,7 @@ class SupportsScreen;

class ManifestExtractor {
 public:

  explicit ManifestExtractor(LoadedApk* apk, DumpManifestOptions& options)
      : apk_(apk), options_(options) { }
  explicit ManifestExtractor(LoadedApk* apk, DumpManifestOptions& options);

  class Element {
   public:
@@ -509,7 +507,7 @@ class ManifestExtractor {

 private:
  std::unique_ptr<xml::XmlResource> doc_;
  std::unique_ptr<CommonFeatureGroup> commonFeatureGroup_ = util::make_unique<CommonFeatureGroup>();
  std::unique_ptr<CommonFeatureGroup> commonFeatureGroup_;
  std::map<std::string, ConfigDescription> locales_;
  std::map<uint16_t, ConfigDescription> densities_;
  std::vector<Element*> parent_stack_;
@@ -2471,6 +2469,12 @@ static void ToProto(ManifestExtractor::Element* el, pb::Badging* out_badging) {
  }
}

// Define this constructor after the CommonFeatureGroup class definition to avoid errors with using
// std::unique_ptr on an incomplete type.
ManifestExtractor::ManifestExtractor(LoadedApk* apk, DumpManifestOptions& options)
    : apk_(apk), options_(options), commonFeatureGroup_(util::make_unique<CommonFeatureGroup>()) {
}

bool ManifestExtractor::Extract(android::IDiagnostics* diag) {
  // Load the manifest
  doc_ = apk_->LoadXml("AndroidManifest.xml", diag);