Merge "Abort FDN delete when number is empty (instead of name)"
diff --git a/libs/ui/SurfaceComposerClient.cpp b/libs/ui/SurfaceComposerClient.cpp
index eda84ef..764e644 100644
--- a/libs/ui/SurfaceComposerClient.cpp
+++ b/libs/ui/SurfaceComposerClient.cpp
@@ -56,7 +56,7 @@
// Must not be holding SurfaceComposerClient::mLock when acquiring gLock here.
static Mutex gLock;
static sp<ISurfaceComposer> gSurfaceManager;
-static DefaultKeyedVector< sp<IBinder>, sp<SurfaceComposerClient> > gActiveConnections;
+static DefaultKeyedVector< sp<IBinder>, wp<SurfaceComposerClient> > gActiveConnections;
static SortedVector<sp<SurfaceComposerClient> > gOpenTransactions;
static sp<IMemoryHeap> gServerCblkMemory;
static volatile surface_flinger_cblk_t* gServerCblk;
@@ -193,7 +193,7 @@
{ // scope for lock
Mutex::Autolock _l(gLock);
- client = gActiveConnections.valueFor(conn);
+ client = gActiveConnections.valueFor(conn).promote();
}
if (client == 0) {
@@ -361,8 +361,8 @@
const size_t N = gActiveConnections.size();
VERBOSE("openGlobalTransaction (%ld clients)", N);
for (size_t i=0; i<N; i++) {
- sp<SurfaceComposerClient> client(gActiveConnections.valueAt(i));
- if (gOpenTransactions.indexOf(client) < 0) {
+ sp<SurfaceComposerClient> client(gActiveConnections.valueAt(i).promote());
+ if (client != 0 && gOpenTransactions.indexOf(client) < 0) {
if (client->openTransaction() == NO_ERROR) {
if (gOpenTransactions.add(client) < 0) {
// Ooops!
diff --git a/opengl/libagl/Android.mk b/opengl/libagl/Android.mk
index 9837845..518be8b 100644
--- a/opengl/libagl/Android.mk
+++ b/opengl/libagl/Android.mk
@@ -37,6 +37,10 @@
LOCAL_CFLAGS += -fstrict-aliasing
endif
+ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
+ LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
+endif
+
ifneq ($(TARGET_SIMULATOR),true)
# we need to access the private Bionic header <bionic_tls.h>
LOCAL_C_INCLUDES += bionic/libc/private
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
index 13d078e..89a19b6 100644
--- a/opengl/libagl/texture.cpp
+++ b/opengl/libagl/texture.cpp
@@ -1467,7 +1467,7 @@
ogles_error(c, GL_INVALID_VALUE);
return;
}
- if (x<0 || x<0) {
+ if (x<0 || y<0) {
ogles_error(c, GL_INVALID_VALUE);
return;
}