Loading services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java +24 −1 Original line number Diff line number Diff line Loading @@ -126,6 +126,9 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne final ServiceConnection mConnection = new ServiceConnection() { @Override public void onServiceConnected(ComponentName name, IBinder service) { if (DEBUG) { Slog.d(TAG, "onServiceConnected to " + name + " for user(" + mUser + ")"); } synchronized (mServiceStub) { mService = IVoiceInteractionService.Stub.asInterface(service); try { Loading @@ -137,7 +140,13 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne @Override public void onServiceDisconnected(ComponentName name) { if (DEBUG) { Slog.d(TAG, "onServiceDisconnected to " + name); } synchronized (mServiceStub) { mService = null; resetHotwordDetectionConnectionLocked(); } } }; Loading Loading @@ -575,6 +584,20 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne mHotwordDetectionConnection.forceRestart(); } void resetHotwordDetectionConnectionLocked() { if (DEBUG) { Slog.d(TAG, "resetHotwordDetectionConnectionLocked"); } if (mHotwordDetectionConnection == null) { if (DEBUG) { Slog.w(TAG, "reset, but no hotword detection connection"); } return; } mHotwordDetectionConnection.cancelLocked(); mHotwordDetectionConnection = null; } public void dumpLocked(FileDescriptor fd, PrintWriter pw, String[] args) { if (!mValid) { pw.print(" NOT VALID: "); Loading Loading
services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java +24 −1 Original line number Diff line number Diff line Loading @@ -126,6 +126,9 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne final ServiceConnection mConnection = new ServiceConnection() { @Override public void onServiceConnected(ComponentName name, IBinder service) { if (DEBUG) { Slog.d(TAG, "onServiceConnected to " + name + " for user(" + mUser + ")"); } synchronized (mServiceStub) { mService = IVoiceInteractionService.Stub.asInterface(service); try { Loading @@ -137,7 +140,13 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne @Override public void onServiceDisconnected(ComponentName name) { if (DEBUG) { Slog.d(TAG, "onServiceDisconnected to " + name); } synchronized (mServiceStub) { mService = null; resetHotwordDetectionConnectionLocked(); } } }; Loading Loading @@ -575,6 +584,20 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne mHotwordDetectionConnection.forceRestart(); } void resetHotwordDetectionConnectionLocked() { if (DEBUG) { Slog.d(TAG, "resetHotwordDetectionConnectionLocked"); } if (mHotwordDetectionConnection == null) { if (DEBUG) { Slog.w(TAG, "reset, but no hotword detection connection"); } return; } mHotwordDetectionConnection.cancelLocked(); mHotwordDetectionConnection = null; } public void dumpLocked(FileDescriptor fd, PrintWriter pw, String[] args) { if (!mValid) { pw.print(" NOT VALID: "); Loading