Loading src/com/android/settings/applications/ManageAssist.java +14 −2 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ public class ManageAssist extends SettingsPreferenceFragment private void updateUi() { mDefaultAssitPref.refreshAssistApps(); mVoiceInputPref.refreshVoiceInputs(); final ComponentName currentAssist = mDefaultAssitPref.getCurrentAssist(); final boolean hasAssistant = currentAssist != null; Loading @@ -115,8 +116,19 @@ public class ManageAssist extends SettingsPreferenceFragment getPreferenceScreen().removePreference(mScreenshotPref); } if (isCurrentAssistVoiceService()) { getPreferenceScreen().removePreference(mVoiceInputPref); } else { getPreferenceScreen().addPreference(mVoiceInputPref); mVoiceInputPref.setAssistRestrict(currentAssist); mVoiceInputPref.refreshVoiceInputs(); } } private boolean isCurrentAssistVoiceService() { ComponentName currentAssist = mDefaultAssitPref.getCurrentAssist(); ComponentName activeService = mVoiceInputPref.getCurrentService(); return currentAssist == null && activeService == null || currentAssist != null && currentAssist.equals(activeService); } private void confirmNewAssist(final String newAssitPackage) { Loading src/com/android/settings/voice/VoiceInputListPreference.java +10 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,16 @@ public class VoiceInputListPreference extends AppListPreferenceWithSettings { } } public ComponentName getCurrentService() { if (mHelper.mCurrentVoiceInteraction != null) { return mHelper.mCurrentVoiceInteraction; } else if (mHelper.mCurrentRecognizer != null) { return mHelper.mCurrentRecognizer; } else { return null; } } private class CustomAdapter extends ArrayAdapter<CharSequence> { public CustomAdapter(Context context, CharSequence[] objects) { Loading Loading
src/com/android/settings/applications/ManageAssist.java +14 −2 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ public class ManageAssist extends SettingsPreferenceFragment private void updateUi() { mDefaultAssitPref.refreshAssistApps(); mVoiceInputPref.refreshVoiceInputs(); final ComponentName currentAssist = mDefaultAssitPref.getCurrentAssist(); final boolean hasAssistant = currentAssist != null; Loading @@ -115,8 +116,19 @@ public class ManageAssist extends SettingsPreferenceFragment getPreferenceScreen().removePreference(mScreenshotPref); } if (isCurrentAssistVoiceService()) { getPreferenceScreen().removePreference(mVoiceInputPref); } else { getPreferenceScreen().addPreference(mVoiceInputPref); mVoiceInputPref.setAssistRestrict(currentAssist); mVoiceInputPref.refreshVoiceInputs(); } } private boolean isCurrentAssistVoiceService() { ComponentName currentAssist = mDefaultAssitPref.getCurrentAssist(); ComponentName activeService = mVoiceInputPref.getCurrentService(); return currentAssist == null && activeService == null || currentAssist != null && currentAssist.equals(activeService); } private void confirmNewAssist(final String newAssitPackage) { Loading
src/com/android/settings/voice/VoiceInputListPreference.java +10 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,16 @@ public class VoiceInputListPreference extends AppListPreferenceWithSettings { } } public ComponentName getCurrentService() { if (mHelper.mCurrentVoiceInteraction != null) { return mHelper.mCurrentVoiceInteraction; } else if (mHelper.mCurrentRecognizer != null) { return mHelper.mCurrentRecognizer; } else { return null; } } private class CustomAdapter extends ArrayAdapter<CharSequence> { public CustomAdapter(Context context, CharSequence[] objects) { Loading