From 0a9b16d158d0c8d3be3c19ba1ed15920a3f44a9d Mon Sep 17 00:00:00 2001 From: Bruce Beare Date: Fri, 25 Jun 2010 09:08:12 -0700 Subject: [PATCH 1/2] Fix missing NL Orig-Change-Id: I323f0c01d2e9ad4c9f07cad24bf6b63edc28ad62 Signed-off-by: Bruce Beare --- libs/rs/rsNoise.cpp | 2 +- opengl/tests/gl_jni/jni/gl_code.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/rs/rsNoise.cpp b/libs/rs/rsNoise.cpp index 764dc1a8cdd14..4b675861e7914 100644 --- a/libs/rs/rsNoise.cpp +++ b/libs/rs/rsNoise.cpp @@ -253,4 +253,4 @@ float SC_turbulencef3(float x, float y, float z, float octaves) } } -} \ No newline at end of file +} diff --git a/opengl/tests/gl_jni/jni/gl_code.cpp b/opengl/tests/gl_jni/jni/gl_code.cpp index f031c79cd33e6..ef66841f2792a 100644 --- a/opengl/tests/gl_jni/jni/gl_code.cpp +++ b/opengl/tests/gl_jni/jni/gl_code.cpp @@ -181,4 +181,3 @@ JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_changeBackground(JNIEnv * { background = 1.0f - background; } - From 2435a927f30efe38c673bfaed64a9880028da9e8 Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Thu, 16 Jun 2011 17:40:23 +0200 Subject: [PATCH 2/2] NativeDaemonConnector: Fix SDCard mounting bug in the emulator. This patch fixes a really annoying bug that prevented the emulator from properly mounting the SD Card. The issue was that mOutputStream was not initialized when the onDaemonConnected callbacks are called, just after the daemon's socket connection is established. In one specific case (MountService a.k.a. VoldConnector), the corresponding callback function immediately tried to perform a doCommandList() call on the connector object. The request failed because mOutputStream was still defined as null when it happened. By moving the initialization of the variable just before the callback is invoked, we ensure that things work properly. Change-Id: I46726a50ef69eaafe70081ff4eda1244b744beba --- services/java/com/android/server/NativeDaemonConnector.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/java/com/android/server/NativeDaemonConnector.java b/services/java/com/android/server/NativeDaemonConnector.java index cf87a9d3937e5..88af1b264dc26 100644 --- a/services/java/com/android/server/NativeDaemonConnector.java +++ b/services/java/com/android/server/NativeDaemonConnector.java @@ -97,10 +97,11 @@ final class NativeDaemonConnector implements Runnable { LocalSocketAddress.Namespace.RESERVED); socket.connect(address); + + mOutputStream = socket.getOutputStream(); mCallbacks.onDaemonConnected(); InputStream inputStream = socket.getInputStream(); - mOutputStream = socket.getOutputStream(); byte[] buffer = new byte[BUFFER_SIZE]; int start = 0;