Merge "Remove property_area_initialized"
This commit is contained in:
commit
93f82d0897
3 changed files with 1 additions and 18 deletions
|
|
@ -60,17 +60,10 @@
|
||||||
#define RECOVERY_MOUNT_POINT "/recovery"
|
#define RECOVERY_MOUNT_POINT "/recovery"
|
||||||
|
|
||||||
static int persistent_properties_loaded = 0;
|
static int persistent_properties_loaded = 0;
|
||||||
static bool property_area_initialized = false;
|
|
||||||
|
|
||||||
static int property_set_fd = -1;
|
static int property_set_fd = -1;
|
||||||
|
|
||||||
void property_init() {
|
void property_init() {
|
||||||
if (property_area_initialized) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
property_area_initialized = true;
|
|
||||||
|
|
||||||
if (__system_property_area_init()) {
|
if (__system_property_area_init()) {
|
||||||
ERROR("Failed to initialize property area\n");
|
ERROR("Failed to initialize property area\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
@ -478,10 +471,6 @@ void property_load_boot_defaults() {
|
||||||
load_properties_from_file(PROP_PATH_RAMDISK_DEFAULT, NULL);
|
load_properties_from_file(PROP_PATH_RAMDISK_DEFAULT, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool properties_initialized() {
|
|
||||||
return property_area_initialized;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void load_override_properties() {
|
static void load_override_properties() {
|
||||||
if (ALLOW_LOCAL_PROP_OVERRIDE) {
|
if (ALLOW_LOCAL_PROP_OVERRIDE) {
|
||||||
std::string debuggable = property_get("ro.debuggable");
|
std::string debuggable = property_get("ro.debuggable");
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ extern void load_system_props(void);
|
||||||
extern void start_property_service(void);
|
extern void start_property_service(void);
|
||||||
std::string property_get(const char* name);
|
std::string property_get(const char* name);
|
||||||
extern int property_set(const char *name, const char *value);
|
extern int property_set(const char *name, const char *value);
|
||||||
extern bool properties_initialized();
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* _INIT_PROPERTY_H */
|
#endif /* _INIT_PROPERTY_H */
|
||||||
|
|
|
||||||
|
|
@ -76,11 +76,6 @@ Service::Service(const std::string& name, const std::string& classname,
|
||||||
}
|
}
|
||||||
|
|
||||||
void Service::NotifyStateChange(const std::string& new_state) const {
|
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) {
|
if ((flags_ & SVC_EXEC) != 0) {
|
||||||
// 'exec' commands don't have properties tracking their state.
|
// 'exec' commands don't have properties tracking their state.
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue