Search in sources :

Example 26 with AssistUtils

use of com.android.internal.app.AssistUtils in project android_packages_apps_Settings by SudaMod.

the class DefaultAssistPreferenceControllerTest method getSettingIntent_doNotShowSetting_shouldNotTryToGetSettingIntent.

@Test
public void getSettingIntent_doNotShowSetting_shouldNotTryToGetSettingIntent() {
    final AssistUtils assistUtils = mock(AssistUtils.class);
    final DefaultAssistPreferenceController controller = new DefaultAssistPreferenceController(mContext, TEST_KEY, false);
    ReflectionHelpers.setField(controller, "mAssistUtils", assistUtils);
    controller.getSettingIntent(null);
    verifyZeroInteractions(assistUtils);
}
Also used : AssistUtils(com.android.internal.app.AssistUtils) Test(org.junit.Test)

Example 27 with AssistUtils

use of com.android.internal.app.AssistUtils in project platform_packages_apps_Settings by BlissRoms.

the class DefaultVoiceInputPicker method onAttach.

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    mAssistUtils = new AssistUtils(context);
    mHelper = new VoiceInputHelper(context);
    mHelper.buildUi();
    final ComponentName assist = getCurrentAssist();
    if (isCurrentAssistVoiceService(assist, getCurrentService(mHelper))) {
        mAssistRestrict = assist.flattenToShortString();
    }
}
Also used : AssistUtils(com.android.internal.app.AssistUtils) ComponentName(android.content.ComponentName)

Aggregations

AssistUtils (com.android.internal.app.AssistUtils)27 ComponentName (android.content.ComponentName)12 Test (org.junit.Test)7 PackageInfo (android.content.pm.PackageInfo)5 Icon (android.graphics.drawable.Icon)5 RemoteException (android.os.RemoteException)5 KeyboardShortcutGroup (android.view.KeyboardShortcutGroup)5 KeyboardShortcutInfo (android.view.KeyboardShortcutInfo)5 ArrayList (java.util.ArrayList)5