diff --git a/tools/aapt2/LoadedApk.h b/tools/aapt2/LoadedApk.h index 4cd7eae0a5e2a..27c354a7b08eb 100644 --- a/tools/aapt2/LoadedApk.h +++ b/tools/aapt2/LoadedApk.h @@ -40,10 +40,8 @@ enum ApkFormat { }; // Info about an APK loaded in memory. -class LoadedApk { +class LoadedApk final { public: - virtual ~LoadedApk() = default; - // Loads both binary and proto APKs from disk. static std::unique_ptr LoadApkFromPath(android::StringPiece path, android::IDiagnostics* diag); @@ -96,8 +94,8 @@ class LoadedApk { * Writes the APK on disk at the given path, while also removing the resource * files that are not referenced in the resource table. */ - virtual bool WriteToArchive(IAaptContext* context, const TableFlattenerOptions& options, - IArchiveWriter* writer); + bool WriteToArchive(IAaptContext* context, const TableFlattenerOptions& options, + IArchiveWriter* writer); /** * Writes the APK on disk at the given path, while also removing the resource files that are not @@ -108,9 +106,9 @@ class LoadedApk { * original manifest will be written. The manifest is only required if the contents of the new APK * have been modified in a way that require the AndroidManifest.xml to also be modified. */ - virtual bool WriteToArchive(IAaptContext* context, ResourceTable* split_table, - const TableFlattenerOptions& options, FilterChain* filters, - IArchiveWriter* writer, xml::XmlResource* manifest = nullptr); + bool WriteToArchive(IAaptContext* context, ResourceTable* split_table, + const TableFlattenerOptions& options, FilterChain* filters, + IArchiveWriter* writer, xml::XmlResource* manifest = nullptr); /** Loads the file as an xml document. */ std::unique_ptr LoadXml(const std::string& file_path,