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

Commit f2c5ee59 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "AAPT2: partial files contain only local resources"

parents 031bfca1 f67d486e
Loading
Loading
Loading
Loading
+39 −35
Original line number Diff line number Diff line
@@ -288,6 +288,8 @@ static bool CompileTable(IAaptContext* context, const CompileOptions& options,

    Printer r_txt_printer(&fout_text);
    for (const auto& package : table.packages) {
      // Only print resources defined locally, e.g. don't write android attributes.
      if (package->name.empty()) {
        for (const auto& type : package->types) {
          for (const auto& entry : type->entries) {
            // Check access modifiers.
@@ -312,7 +314,8 @@ static bool CompileTable(IAaptContext* context, const CompileOptions& options,
              r_txt_printer.Println(entry->name);

              if (!entry->values.empty()) {
              auto styleable = static_cast<const Styleable*>(entry->values.front()->value.get());
                auto styleable =
                    static_cast<const Styleable*>(entry->values.front()->value.get());
                for (const auto& attr : styleable->entries) {
                  // The visibility of the children under the styleable does not matter as they are
                  // nested under their parent and use its visibility.
@@ -333,6 +336,7 @@ static bool CompileTable(IAaptContext* context, const CompileOptions& options,
        }
      }
    }
  }

  return true;
}