Loading tools/aapt2/cmd/Compile.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -677,6 +677,10 @@ class CompileContext : public IAaptContext { return 0; } bool IsAutoNamespace() override { return false; } private: DISALLOW_COPY_AND_ASSIGN(CompileContext); Loading tools/aapt2/cmd/Convert.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -310,6 +310,10 @@ class Context : public IAaptContext { return 0u; } bool IsAutoNamespace() override { return false; } bool verbose_ = false; std::string package_; Loading tools/aapt2/cmd/Diff.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,10 @@ class DiffContext : public IAaptContext { return 0; } bool IsAutoNamespace() override { return false; } private: std::string empty_; StdErrDiagnostics diagnostics_; Loading tools/aapt2/cmd/Dump.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -298,6 +298,10 @@ class DumpContext : public IAaptContext { return 0; } bool IsAutoNamespace() override { return false; } private: StdErrDiagnostics diagnostics_; bool verbose_ = false; Loading tools/aapt2/cmd/Link.cpp +24 −1 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ struct LinkOptions { // Static lib options. bool no_static_lib_packages = false; bool auto_namespace_static_lib = false; // AndroidManifest.xml massaging options. ManifestFixerOptions manifest_fixer_options; Loading Loading @@ -193,6 +194,14 @@ class LinkContext : public IAaptContext { min_sdk_version_ = minSdk; } bool IsAutoNamespace() override { return auto_namespace_; } void SetAutoNamespace(bool val) { auto_namespace_ = val; } private: DISALLOW_COPY_AND_ASSIGN(LinkContext); Loading @@ -204,6 +213,7 @@ class LinkContext : public IAaptContext { SymbolTable symbols_; bool verbose_ = false; int min_sdk_version_ = 0; bool auto_namespace_ = false; }; // A custom delegate that generates compatible pre-O IDs for use with feature splits. Loading Loading @@ -2112,6 +2122,10 @@ int Link(const std::vector<StringPiece>& args, IDiagnostics* diagnostics) { .OptionalSwitch("--no-static-lib-packages", "Merge all library resources under the app's package.", &options.no_static_lib_packages) .OptionalSwitch("--auto-namespace-static-lib", "Automatically namespace resource references when building a static\n" "library.", &options.auto_namespace_static_lib) .OptionalSwitch("--non-final-ids", "Generates R.java without the final modifier. This is implied when\n" "--static-lib is specified.", Loading Loading @@ -2221,6 +2235,15 @@ int Link(const std::vector<StringPiece>& args, IDiagnostics* diagnostics) { options.output_format = OutputFormat::kProto; } if (options.auto_namespace_static_lib) { if (!static_lib) { context.GetDiagnostics()->Error( DiagMessage() << "--auto-namespace-static-lib can only be used with --static-lib"); return 1; } context.SetAutoNamespace(true); } if (package_id) { if (context.GetPackageType() != PackageType::kApp) { context.GetDiagnostics()->Error( Loading Loading
tools/aapt2/cmd/Compile.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -677,6 +677,10 @@ class CompileContext : public IAaptContext { return 0; } bool IsAutoNamespace() override { return false; } private: DISALLOW_COPY_AND_ASSIGN(CompileContext); Loading
tools/aapt2/cmd/Convert.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -310,6 +310,10 @@ class Context : public IAaptContext { return 0u; } bool IsAutoNamespace() override { return false; } bool verbose_ = false; std::string package_; Loading
tools/aapt2/cmd/Diff.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,10 @@ class DiffContext : public IAaptContext { return 0; } bool IsAutoNamespace() override { return false; } private: std::string empty_; StdErrDiagnostics diagnostics_; Loading
tools/aapt2/cmd/Dump.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -298,6 +298,10 @@ class DumpContext : public IAaptContext { return 0; } bool IsAutoNamespace() override { return false; } private: StdErrDiagnostics diagnostics_; bool verbose_ = false; Loading
tools/aapt2/cmd/Link.cpp +24 −1 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ struct LinkOptions { // Static lib options. bool no_static_lib_packages = false; bool auto_namespace_static_lib = false; // AndroidManifest.xml massaging options. ManifestFixerOptions manifest_fixer_options; Loading Loading @@ -193,6 +194,14 @@ class LinkContext : public IAaptContext { min_sdk_version_ = minSdk; } bool IsAutoNamespace() override { return auto_namespace_; } void SetAutoNamespace(bool val) { auto_namespace_ = val; } private: DISALLOW_COPY_AND_ASSIGN(LinkContext); Loading @@ -204,6 +213,7 @@ class LinkContext : public IAaptContext { SymbolTable symbols_; bool verbose_ = false; int min_sdk_version_ = 0; bool auto_namespace_ = false; }; // A custom delegate that generates compatible pre-O IDs for use with feature splits. Loading Loading @@ -2112,6 +2122,10 @@ int Link(const std::vector<StringPiece>& args, IDiagnostics* diagnostics) { .OptionalSwitch("--no-static-lib-packages", "Merge all library resources under the app's package.", &options.no_static_lib_packages) .OptionalSwitch("--auto-namespace-static-lib", "Automatically namespace resource references when building a static\n" "library.", &options.auto_namespace_static_lib) .OptionalSwitch("--non-final-ids", "Generates R.java without the final modifier. This is implied when\n" "--static-lib is specified.", Loading Loading @@ -2221,6 +2235,15 @@ int Link(const std::vector<StringPiece>& args, IDiagnostics* diagnostics) { options.output_format = OutputFormat::kProto; } if (options.auto_namespace_static_lib) { if (!static_lib) { context.GetDiagnostics()->Error( DiagMessage() << "--auto-namespace-static-lib can only be used with --static-lib"); return 1; } context.SetAutoNamespace(true); } if (package_id) { if (context.GetPackageType() != PackageType::kApp) { context.GetDiagnostics()->Error( Loading