am e622edeb: am b04e02b9: am 3a77d009: am 2376bd68: Merge "Bug fix in SensorManager." into mnc-dev
* commit 'e622edebfb980e9697977fe5bd32cbef08297a7a':
Bug fix in SensorManager.
diff --git a/cmds/dumpstate/utils.c b/cmds/dumpstate/utils.c
index d679787..0dd0c21 100644
--- a/cmds/dumpstate/utils.c
+++ b/cmds/dumpstate/utils.c
@@ -626,24 +626,6 @@
return NULL; // Can't rename old traces.txt -- no permission? -- leave it alone instead
}
- /* make the directory if necessary */
- char anr_traces_dir[PATH_MAX];
- strlcpy(anr_traces_dir, traces_path, sizeof(anr_traces_dir));
- char *slash = strrchr(anr_traces_dir, '/');
- if (slash != NULL) {
- *slash = '\0';
- if (!mkdir(anr_traces_dir, 0775)) {
- chown(anr_traces_dir, AID_SYSTEM, AID_SYSTEM);
- chmod(anr_traces_dir, 0775);
- if (selinux_android_restorecon(anr_traces_dir, 0) == -1) {
- fprintf(stderr, "restorecon failed for %s: %s\n", anr_traces_dir, strerror(errno));
- }
- } else if (errno != EEXIST) {
- fprintf(stderr, "mkdir(%s): %s\n", anr_traces_dir, strerror(errno));
- return NULL;
- }
- }
-
/* create a new, empty traces.txt file to receive stack dumps */
int fd = TEMP_FAILURE_RETRY(open(traces_path, O_CREAT | O_WRONLY | O_TRUNC | O_NOFOLLOW | O_CLOEXEC,
0666)); /* -rw-rw-rw- */
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index 016d3c5..821ab6c 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -350,10 +350,6 @@
, mThreadPoolSeq(1)
{
if (mDriverFD >= 0) {
- // XXX Ideally, there should be a specific define for whether we
- // have mmap (or whether we could possibly have the kernel module
- // availabla).
-#if !defined(HAVE_WIN32_IPC)
// mmap the binder, providing a chunk of virtual address space to receive transactions.
mVMStart = mmap(0, BINDER_VM_SIZE, PROT_READ, MAP_PRIVATE | MAP_NORESERVE, mDriverFD, 0);
if (mVMStart == MAP_FAILED) {
@@ -362,9 +358,6 @@
close(mDriverFD);
mDriverFD = -1;
}
-#else
- mDriverFD = -1;
-#endif
}
LOG_ALWAYS_FATAL_IF(mDriverFD < 0, "Binder driver could not be opened. Terminating.");
diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk
index 18ad300..8d42690 100644
--- a/opengl/libs/Android.mk
+++ b/opengl/libs/Android.mk
@@ -59,6 +59,11 @@
LOCAL_CFLAGS += -DMAX_EGL_CACHE_SIZE=$(MAX_EGL_CACHE_SIZE)
endif
+ifeq (address, $(strip $(SANITIZE_TARGET)))
+ LOCAL_CFLAGS_32 += -DEGL_WRAPPER_DIR=\"/$(TARGET_COPY_OUT_DATA)/lib\"
+ LOCAL_CFLAGS_64 += -DEGL_WRAPPER_DIR=\"/$(TARGET_COPY_OUT_DATA)/lib64\"
+endif
+
LOCAL_REQUIRED_MODULES := $(egl.cfg_config_module)
egl.cfg_config_module :=
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp
index 1fcc048..8df9af3 100644
--- a/opengl/libs/EGL/Loader.cpp
+++ b/opengl/libs/EGL/Loader.cpp
@@ -167,6 +167,14 @@
return so;
}
+#ifndef EGL_WRAPPER_DIR
+#if defined(__LP64__)
+#define EGL_WRAPPER_DIR "/system/lib64"
+#else
+#define EGL_WRAPPER_DIR "/system/lib"
+#endif
+#endif
+
void* Loader::open(egl_connection_t* cnx)
{
void* dso;
@@ -187,15 +195,10 @@
LOG_ALWAYS_FATAL_IF(!hnd, "couldn't find an OpenGL ES implementation");
-#if defined(__LP64__)
- cnx->libEgl = load_wrapper("/system/lib64/libEGL.so");
- cnx->libGles2 = load_wrapper("/system/lib64/libGLESv2.so");
- cnx->libGles1 = load_wrapper("/system/lib64/libGLESv1_CM.so");
-#else
- cnx->libEgl = load_wrapper("/system/lib/libEGL.so");
- cnx->libGles2 = load_wrapper("/system/lib/libGLESv2.so");
- cnx->libGles1 = load_wrapper("/system/lib/libGLESv1_CM.so");
-#endif
+ cnx->libEgl = load_wrapper(EGL_WRAPPER_DIR "/libEGL.so");
+ cnx->libGles2 = load_wrapper(EGL_WRAPPER_DIR "/libGLESv2.so");
+ cnx->libGles1 = load_wrapper(EGL_WRAPPER_DIR "/libGLESv1_CM.so");
+
LOG_ALWAYS_FATAL_IF(!cnx->libEgl,
"couldn't load system EGL wrapper libraries");