Loading tests/robotests/src/com/android/settings/applications/appinfo/DefaultSmsShortcutPreferenceControllerTest.java +6 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.settings.applications.appinfo; import static com.google.common.truth.Truth.assertThat; import android.app.role.RoleControllerManager; import android.app.role.RoleManager; import android.content.Context; import org.junit.Before; Loading @@ -36,6 +37,8 @@ public class DefaultSmsShortcutPreferenceControllerTest { private static final String TEST_PACKAGE_NAME = "TestPackage"; private static final String PREFERENCE_KEY = "default_sms_app"; @Mock private RoleManager mRoleManager; @Mock private RoleControllerManager mRoleControllerManager; Loading @@ -44,8 +47,9 @@ public class DefaultSmsShortcutPreferenceControllerTest { @Before public void setUp() { MockitoAnnotations.initMocks(this); ShadowApplication.getInstance().setSystemService(Context.ROLE_CONTROLLER_SERVICE, mRoleControllerManager); final ShadowApplication shadowApplication = ShadowApplication.getInstance(); shadowApplication.setSystemService(Context.ROLE_SERVICE, mRoleManager); shadowApplication.setSystemService(Context.ROLE_CONTROLLER_SERVICE, mRoleControllerManager); mController = new DefaultSmsShortcutPreferenceController(RuntimeEnvironment.application, TEST_PACKAGE_NAME); } Loading Loading
tests/robotests/src/com/android/settings/applications/appinfo/DefaultSmsShortcutPreferenceControllerTest.java +6 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.settings.applications.appinfo; import static com.google.common.truth.Truth.assertThat; import android.app.role.RoleControllerManager; import android.app.role.RoleManager; import android.content.Context; import org.junit.Before; Loading @@ -36,6 +37,8 @@ public class DefaultSmsShortcutPreferenceControllerTest { private static final String TEST_PACKAGE_NAME = "TestPackage"; private static final String PREFERENCE_KEY = "default_sms_app"; @Mock private RoleManager mRoleManager; @Mock private RoleControllerManager mRoleControllerManager; Loading @@ -44,8 +47,9 @@ public class DefaultSmsShortcutPreferenceControllerTest { @Before public void setUp() { MockitoAnnotations.initMocks(this); ShadowApplication.getInstance().setSystemService(Context.ROLE_CONTROLLER_SERVICE, mRoleControllerManager); final ShadowApplication shadowApplication = ShadowApplication.getInstance(); shadowApplication.setSystemService(Context.ROLE_SERVICE, mRoleManager); shadowApplication.setSystemService(Context.ROLE_CONTROLLER_SERVICE, mRoleControllerManager); mController = new DefaultSmsShortcutPreferenceController(RuntimeEnvironment.application, TEST_PACKAGE_NAME); } Loading