Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93f82d08 authored by Tom Cherry's avatar Tom Cherry Committed by Gerrit Code Review
Browse files

Merge "Remove property_area_initialized"

parents 4ab13d02 1563d654
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -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");
+1 −2
Original line number Diff line number Diff line
@@ -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 */
+0 −5
Original line number Diff line number Diff line
@@ -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;