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

Commit 90900689 authored by Nick Kralevich's avatar Nick Kralevich Committed by Android (Google) Code Review
Browse files

Merge "libcutils: Don't build host property support"

parents cf41bbf3 b39e3a8a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -42,7 +42,6 @@ commonSources := \
	strdup16to8.c \
	strdup16to8.c \
	strdup8to16.c \
	strdup8to16.c \
	process_name.c \
	process_name.c \
	properties.c \
	threads.c \
	threads.c \
	sched_policy.c \
	sched_policy.c \
	iosched_policy.c \
	iosched_policy.c \
@@ -112,6 +111,7 @@ LOCAL_SRC_FILES := $(commonSources) \
        debugger.c \
        debugger.c \
        klog.c \
        klog.c \
        partition_utils.c \
        partition_utils.c \
        properties.c \
        qtaguid.c \
        qtaguid.c \
        trace.c \
        trace.c \
        uevent.c
        uevent.c
+6 −0
Original line number Original line Diff line number Diff line
@@ -17,7 +17,9 @@
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <cutils/process_name.h>
#include <cutils/process_name.h>
#ifdef HAVE_ANDROID_OS
#include <cutils/properties.h>
#include <cutils/properties.h>
#endif
#include <unistd.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/stat.h>
@@ -33,7 +35,9 @@ static const char* process_name = "unknown";
static int running_in_emulator = -1;
static int running_in_emulator = -1;


void set_process_name(const char* new_name) {
void set_process_name(const char* new_name) {
#ifdef HAVE_ANDROID_OS
    char  propBuf[PROPERTY_VALUE_MAX];
    char  propBuf[PROPERTY_VALUE_MAX];
#endif


    if (new_name == NULL) {
    if (new_name == NULL) {
        return;
        return;
@@ -53,6 +57,7 @@ void set_process_name(const char* new_name) {
    }
    }
#endif
#endif


#ifdef HAVE_ANDROID_OS
    // If we know we are not running in the emulator, then return.
    // If we know we are not running in the emulator, then return.
    if (running_in_emulator == 0) {
    if (running_in_emulator == 0) {
        return;
        return;
@@ -82,6 +87,7 @@ void set_process_name(const char* new_name) {
        return;
        return;
    write(fd, process_name, strlen(process_name) + 1);
    write(fd, process_name, strlen(process_name) + 1);
    close(fd);
    close(fd);
#endif
}
}


const char* get_process_name(void) {
const char* get_process_name(void) {