Loading tools/aapt2/Resource.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -96,8 +96,6 @@ StringPiece to_string(ResourceType type) { return "styleable"; case ResourceType::kTransition: return "transition"; case ResourceType::kUnknown: return "unknown"; case ResourceType::kXml: return "xml"; } Loading tools/aapt2/Resource.h +0 −5 Original line number Diff line number Diff line Loading @@ -66,11 +66,6 @@ enum class ResourceType { kStyle, kStyleable, kTransition, // Not a parsed type. It is only used when loading resource tables that may have modified type // names kUnknown, kXml, }; Loading tools/aapt2/cmd/Link.cpp +9 −5 Original line number Diff line number Diff line Loading @@ -2334,11 +2334,15 @@ int LinkCommand::Action(const std::vector<std::string>& args) { } // Populate some default no-compress extensions that are already compressed. options_.extensions_to_not_compress.insert( {".jpg", ".jpeg", ".png", ".gif", ".wav", ".mp2", ".mp3", ".ogg", ".aac", ".mpg", ".mpeg", ".mid", ".midi", ".smf", ".jet", ".rtttl", ".imy", ".xmf", ".mp4", ".m4a", ".m4v", ".3gp", ".3gpp", ".3g2", ".3gpp2", ".amr", ".awb", ".wma", ".wmv", ".webm", ".mkv"}); options_.extensions_to_not_compress.insert({ // Image extensions ".jpg", ".jpeg", ".png", ".gif", ".webp", // Audio extensions ".wav", ".mp2", ".mp3", ".ogg", ".aac", ".mid", ".midi", ".smf", ".jet", ".rtttl", ".imy", ".xmf", ".amr", ".awb", // Audio/video extensions ".mpg", ".mpeg", ".mp4", ".m4a", ".m4v", ".3gp", ".3gpp", ".3g2", ".3gpp2", ".wma", ".wmv", ".webm", ".mkv"}); // Turn off auto versioning for static-libs. if (context.GetPackageType() == PackageType::kStaticLib) { Loading tools/aapt2/format/binary/BinaryResourceParser.cpp +10 −11 Original line number Diff line number Diff line Loading @@ -352,15 +352,15 @@ bool BinaryResourceParser::ParseType(const ResourceTablePackage* package, config.copyFromDtoH(type->config); const std::string type_str = util::GetString(type_pool_, type->id - 1); const ResourceType* parsed_type = ParseResourceType(type_str); if (!parsed_type) { // Be lenient on the name of the type if the table is lenient on resource validation. auto parsed_type = ResourceType::kUnknown; if (const ResourceType* parsed = ParseResourceType(type_str)) { parsed_type = *parsed; } else if (table_->GetValidateResources()) { diag_->Error(DiagMessage(source_) << "invalid type name '" << type_str << "' for type with ID " << (int) type->id); return false; bool log_error = table_->GetValidateResources(); if (log_error) { diag_->Error(DiagMessage(source_) << "invalid type name '" << type_str << "' for type with ID " << type->id); } return !log_error; } TypeVariant tv(type); Loading @@ -370,9 +370,8 @@ bool BinaryResourceParser::ParseType(const ResourceTablePackage* package, continue; } const ResourceName name(package->name, parsed_type, const ResourceName name(package->name, *parsed_type, util::GetString(key_pool_, util::DeviceToHost32(entry->key.index))); const ResourceId res_id(package->id.value(), type->id, static_cast<uint16_t>(it.index())); std::unique_ptr<Value> resource_value; Loading Loading
tools/aapt2/Resource.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -96,8 +96,6 @@ StringPiece to_string(ResourceType type) { return "styleable"; case ResourceType::kTransition: return "transition"; case ResourceType::kUnknown: return "unknown"; case ResourceType::kXml: return "xml"; } Loading
tools/aapt2/Resource.h +0 −5 Original line number Diff line number Diff line Loading @@ -66,11 +66,6 @@ enum class ResourceType { kStyle, kStyleable, kTransition, // Not a parsed type. It is only used when loading resource tables that may have modified type // names kUnknown, kXml, }; Loading
tools/aapt2/cmd/Link.cpp +9 −5 Original line number Diff line number Diff line Loading @@ -2334,11 +2334,15 @@ int LinkCommand::Action(const std::vector<std::string>& args) { } // Populate some default no-compress extensions that are already compressed. options_.extensions_to_not_compress.insert( {".jpg", ".jpeg", ".png", ".gif", ".wav", ".mp2", ".mp3", ".ogg", ".aac", ".mpg", ".mpeg", ".mid", ".midi", ".smf", ".jet", ".rtttl", ".imy", ".xmf", ".mp4", ".m4a", ".m4v", ".3gp", ".3gpp", ".3g2", ".3gpp2", ".amr", ".awb", ".wma", ".wmv", ".webm", ".mkv"}); options_.extensions_to_not_compress.insert({ // Image extensions ".jpg", ".jpeg", ".png", ".gif", ".webp", // Audio extensions ".wav", ".mp2", ".mp3", ".ogg", ".aac", ".mid", ".midi", ".smf", ".jet", ".rtttl", ".imy", ".xmf", ".amr", ".awb", // Audio/video extensions ".mpg", ".mpeg", ".mp4", ".m4a", ".m4v", ".3gp", ".3gpp", ".3g2", ".3gpp2", ".wma", ".wmv", ".webm", ".mkv"}); // Turn off auto versioning for static-libs. if (context.GetPackageType() == PackageType::kStaticLib) { Loading
tools/aapt2/format/binary/BinaryResourceParser.cpp +10 −11 Original line number Diff line number Diff line Loading @@ -352,15 +352,15 @@ bool BinaryResourceParser::ParseType(const ResourceTablePackage* package, config.copyFromDtoH(type->config); const std::string type_str = util::GetString(type_pool_, type->id - 1); const ResourceType* parsed_type = ParseResourceType(type_str); if (!parsed_type) { // Be lenient on the name of the type if the table is lenient on resource validation. auto parsed_type = ResourceType::kUnknown; if (const ResourceType* parsed = ParseResourceType(type_str)) { parsed_type = *parsed; } else if (table_->GetValidateResources()) { diag_->Error(DiagMessage(source_) << "invalid type name '" << type_str << "' for type with ID " << (int) type->id); return false; bool log_error = table_->GetValidateResources(); if (log_error) { diag_->Error(DiagMessage(source_) << "invalid type name '" << type_str << "' for type with ID " << type->id); } return !log_error; } TypeVariant tv(type); Loading @@ -370,9 +370,8 @@ bool BinaryResourceParser::ParseType(const ResourceTablePackage* package, continue; } const ResourceName name(package->name, parsed_type, const ResourceName name(package->name, *parsed_type, util::GetString(key_pool_, util::DeviceToHost32(entry->key.index))); const ResourceId res_id(package->id.value(), type->id, static_cast<uint16_t>(it.index())); std::unique_ptr<Value> resource_value; Loading