Remove property_area_initialized

This is deadcode as property_init() will only ever be called once and
the only remaining caller of properties_initialized() is
Service::NotifyStateChange() which can only be called after properties
have been initialized.

Change-Id: Ie071af84fcdbead72d259890fc8fb8db624282e7
This commit is contained in:
Tom Cherry 2015-12-07 17:40:04 -08:00
parent c68998441c
commit 1563d6546c
3 changed files with 1 additions and 18 deletions

View File

@ -60,17 +60,10 @@
#define RECOVERY_MOUNT_POINT "/recovery"
static int persistent_properties_loaded = 0;
static bool property_area_initialized = false;
static int property_set_fd = -1;
void property_init() {
if (property_area_initialized) {
return;
}
property_area_initialized = true;
if (__system_property_area_init()) {
ERROR("Failed to initialize property area\n");
exit(1);
@ -478,10 +471,6 @@ void property_load_boot_defaults() {
load_properties_from_file(PROP_PATH_RAMDISK_DEFAULT, NULL);
}
bool properties_initialized() {
return property_area_initialized;
}
static void load_override_properties() {
if (ALLOW_LOCAL_PROP_OVERRIDE) {
std::string debuggable = property_get("ro.debuggable");

View File

@ -34,7 +34,6 @@ extern void load_system_props(void);
extern void start_property_service(void);
std::string property_get(const char* name);
extern int property_set(const char *name, const char *value);
extern bool properties_initialized();
#endif /* _INIT_PROPERTY_H */
#endif /* _INIT_PROPERTY_H */

View File

@ -76,11 +76,6 @@ Service::Service(const std::string& name, const std::string& classname,
}
void Service::NotifyStateChange(const std::string& new_state) const {
if (!properties_initialized()) {
// If properties aren't available yet, we can't set them.
return;
}
if ((flags_ & SVC_EXEC) != 0) {
// 'exec' commands don't have properties tracking their state.
return;