OSDN Git Service

Synchronized access to mService.
authorFelipe Leme <felipeal@google.com>
Wed, 19 Oct 2016 22:23:08 +0000 (15:23 -0700)
committerFelipe Leme <felipeal@google.com>
Wed, 19 Oct 2016 22:23:08 +0000 (15:23 -0700)
Test: none
Change-Id: Ibab1211384c1c579fa24be19821c2784faa22b8c

services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java

index c3075b3..e58fe70 100644 (file)
@@ -570,7 +570,9 @@ final class VoiceInteractionSessionConnection implements ServiceConnection {
     @Override
     public void onServiceDisconnected(ComponentName name) {
         mCallback.sessionConnectionGone(this);
-        mService = null;
+        synchronized (mLock) {
+            mService = null;
+        }
     }
 
     public void dump(String prefix, PrintWriter pw) {