project frameworks/base/ diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java index 6c2f1b2..c762074 100644 --- a/services/java/com/android/server/MountService.java +++ b/services/java/com/android/server/MountService.java @@ -990,7 +990,8 @@ class MountService extends IMountService.Stub private void setUmsEnabling(boolean enable) { synchronized (mListeners) { - mUmsEnabling = true; + //mUmsEnabling = true; //zhushi by wjn + mUmsEnabling = enable; // add by wjn } } diff --git a/services/java/com/android/server/NativeDaemonConnector.java b/services/java/com/android/server/NativeDaemonConnector.java index c452590..3a175f3 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); - mCallbacks.onDaemonConnected(); InputStream inputStream = socket.getInputStream(); mOutputStream = socket.getOutputStream(); + + mCallbacks.onDaemonConnected(); byte[] buffer = new byte[BUFFER_SIZE]; int start = 0;