Merge "Reinitialize voice interaction service on unlock" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ea61e63bf8
@@ -127,6 +127,12 @@ public class VoiceInteractionManagerService extends SystemService {
|
||||
mServiceStub.initForUser(userHandle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUnlockUser(int userHandle) {
|
||||
mServiceStub.initForUser(userHandle);
|
||||
mServiceStub.switchImplementationIfNeeded(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSwitchUser(int userHandle) {
|
||||
mServiceStub.switchUser(userHandle);
|
||||
@@ -362,6 +368,12 @@ public class VoiceInteractionManagerService extends SystemService {
|
||||
}
|
||||
}
|
||||
|
||||
void switchImplementationIfNeeded(boolean force) {
|
||||
synchronized (this) {
|
||||
switchImplementationIfNeededLocked(force);
|
||||
}
|
||||
}
|
||||
|
||||
void switchImplementationIfNeededLocked(boolean force) {
|
||||
if (!mSafeMode) {
|
||||
String curService = Settings.Secure.getStringForUser(
|
||||
|
||||
Reference in New Issue
Block a user