aconfig: rename namespace -> package
What used to be referred to as a namespace is now called a package.
This CL is a semantic change only.
Bug: 285000854
Test: m nothing
Test: atest aconfig.test
Change-Id: If3fca67c415af75b44f316e16666b97089407069
diff --git a/tools/aconfig/templates/cpp.template b/tools/aconfig/templates/cpp.template
index ae8b59f..deb5012 100644
--- a/tools/aconfig/templates/cpp.template
+++ b/tools/aconfig/templates/cpp.template
@@ -1,18 +1,18 @@
-#ifndef {namespace}_HEADER_H
-#define {namespace}_HEADER_H
-#include "{namespace}.h"
+#ifndef {package}_HEADER_H
+#define {package}_HEADER_H
+#include "{package}.h"
{{ if readwrite }}
#include <server_configurable_flags/get_flags.h>
using namespace server_configurable_flags;
{{ endif }}
-namespace {namespace} \{
+namespace {package} \{
{{ for item in class_elements}}
class {item.flag_name} \{
public:
virtual const bool value() \{
{{ if item.readwrite- }}
return GetServerConfigurableFlag(
- "{namespace}",
+ "{package}",
"{item.flag_name}",
"{item.default_value}") == "true";
{{ -else- }}
diff --git a/tools/aconfig/templates/java.template b/tools/aconfig/templates/java.template
index 30c7ad7..44c470c 100644
--- a/tools/aconfig/templates/java.template
+++ b/tools/aconfig/templates/java.template
@@ -1,4 +1,4 @@
-package aconfig.{namespace};
+package aconfig.{package};
{{ if readwrite }}
import android.provider.DeviceConfig;
{{ endif }}
@@ -7,7 +7,7 @@
public static boolean {item.method_name}() \{
{{ if item.readwrite- }}
return DeviceConfig.getBoolean(
- "{namespace}",
+ "{package}",
"{item.feature_name}__{item.flag_name}",
{item.default_value}
);
diff --git a/tools/aconfig/templates/rust.template b/tools/aconfig/templates/rust.template
index d7f4e8d..a3c58c0 100644
--- a/tools/aconfig/templates/rust.template
+++ b/tools/aconfig/templates/rust.template
@@ -16,7 +16,7 @@
{{- if parsed_flag.is_read_write -}}
#[inline(always)]
pub fn r#{parsed_flag.fn_name}() -> bool \{
- flags_rust::GetServerConfigurableFlag("{namespace}", "{parsed_flag.name}", "false") == "true"
+ flags_rust::GetServerConfigurableFlag("{package}", "{parsed_flag.name}", "false") == "true"
}
{{ endif -}}