Merge "Don't change the voice interactor setting if it's explicitly unset." into rvc-qpr-dev
This commit is contained in:
@@ -395,8 +395,9 @@ public class VoiceInteractionManagerService extends SystemService {
|
|||||||
+ interactorInfo + ")");
|
+ interactorInfo + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initializing settings, look for an interactor first (but only on non-svelte).
|
// Initializing settings. Look for an interactor first, but only on non-svelte and only
|
||||||
if (curInteractorInfo == null && mEnableService) {
|
// if the user hasn't explicitly unset it.
|
||||||
|
if (curInteractorInfo == null && mEnableService && !"".equals(curInteractorStr)) {
|
||||||
curInteractorInfo = findAvailInteractor(userHandle, null);
|
curInteractorInfo = findAvailInteractor(userHandle, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1692,8 +1693,13 @@ public class VoiceInteractionManagerService extends SystemService {
|
|||||||
if (isPackageAppearing(pkgName) != PACKAGE_UNCHANGED) {
|
if (isPackageAppearing(pkgName) != PACKAGE_UNCHANGED) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
final String curInteractorStr = Settings.Secure.getStringForUser(
|
||||||
|
mContext.getContentResolver(),
|
||||||
|
Settings.Secure.VOICE_INTERACTION_SERVICE, mCurUser);
|
||||||
final ComponentName curInteractor = getCurInteractor(mCurUser);
|
final ComponentName curInteractor = getCurInteractor(mCurUser);
|
||||||
if (curInteractor == null) {
|
// If there's no interactor and the user hasn't explicitly unset it, check if the
|
||||||
|
// modified package offers one.
|
||||||
|
if (curInteractor == null && !"".equals(curInteractorStr)) {
|
||||||
final VoiceInteractionServiceInfo availInteractorInfo
|
final VoiceInteractionServiceInfo availInteractorInfo
|
||||||
= findAvailInteractor(mCurUser, pkgName);
|
= findAvailInteractor(mCurUser, pkgName);
|
||||||
if (availInteractorInfo != null) {
|
if (availInteractorInfo != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user