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

Commit 9b731aef authored by Ryan Mitchell's avatar Ryan Mitchell Committed by android-build-merger
Browse files

Merge "Check value in dump before printing" into qt-dev am: d8ec9971

am: acbf1c76

Change-Id: I9977935168e838b6d070200e25d41439c5a962cf
parents c26ed3c8 acbf1c76
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -129,12 +129,20 @@ class ValueBodyPrinter : public ConstValueVisitor {
    constexpr uint32_t kMask = android::ResTable_map::TYPE_ENUM | android::ResTable_map::TYPE_FLAGS;
    if (attr->type_mask & kMask) {
      for (const auto& symbol : attr->symbols) {
        if (symbol.symbol.name) {
          printer_->Print(symbol.symbol.name.value().entry);

          if (symbol.symbol.id) {
            printer_->Print("(");
            printer_->Print(symbol.symbol.id.value().to_string());
            printer_->Print(")");
          }
        } else if (symbol.symbol.id) {
          printer_->Print(symbol.symbol.id.value().to_string());
        } else {
          printer_->Print("???");
        }

        printer_->Println(StringPrintf("=0x%08x", symbol.value));
      }
    }