Home
last modified time | relevance | path

Searched refs:mTargetContext (Results 1 – 25 of 77) sorted by relevance

1234

/packages/apps/EmergencyInfo/tests/unit/src/com/android/emergency/edit/
DEditInfoActivityTest.java59 private Context mTargetContext; field in EditInfoActivityTest
64 mTargetContext = mInstrumentation.getTargetContext(); in setUp()
66 PreferenceManager.getDefaultSharedPreferences(mTargetContext).edit().clear().commit(); in setUp()
71 PreferenceManager.getDefaultSharedPreferences(mTargetContext).edit().clear().commit(); in tearDown()
92 final PackageManager packageManager = mTargetContext.getPackageManager(); in testInitialState()
93 final String packageName = mTargetContext.getPackageName(); in testInitialState()
103 PreferenceManager.getDefaultSharedPreferences(mTargetContext).edit().putString( in testClearAllPreferences()
105 PreferenceManager.getDefaultSharedPreferences(mTargetContext).edit().putString( in testClearAllPreferences()
107 PreferenceManager.getDefaultSharedPreferences(mTargetContext).edit().putString( in testClearAllPreferences()
109 PreferenceManager.getDefaultSharedPreferences(mTargetContext).edit().putString( in testClearAllPreferences()
[all …]
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/overlay/
DOverlayableTest.java49 mTargetContext.getResources().getBoolean(R.bool.is_launcher_enabled)).isNotNull(); in testConfig_isLauncherEnable_isNotNull()
55 mTargetContext.getResources().getString(R.string.default_root_uri)).isNotEmpty(); in testConfig_defaultRootUri_isNotEmpty()
61 mTargetContext.getResources().getString( in testConfig_preferredRootPackage_isNotNull()
68 mTargetContext.getResources().getString( in testConfig_trustedQuickViewerPackage_isNotNull()
75 mTargetContext.getResources().getDrawable( in testDrawable_icEject_isVectorDrawable()
82 mTargetContext.getResources().getDrawable( in testDrawable_icRootDownload_isVectorDrawable()
89 mTargetContext.getResources().getDrawable( in testDrawable_icSdStorage_isVectorDrawable()
96 mTargetContext.getResources().getDrawable( in testDrawable_icRootListSelector_isDrawable()
104 mTargetContext.getResources().getDimensionPixelSize( in testDimen_gridItemRadius_isReasonable()
107 mTargetContext.getResources().getDimensionPixelSize( in testDimen_gridItemRadius_isReasonable()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/pbapclient/
DPbapParserTest.java50 private Context mTargetContext; field in PbapParserTest
56 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp()
58 mTargetContext.getResources().getBoolean(R.bool.profile_supported_pbapclient)); in setUp()
60 mTargetContext.getString(com.android.bluetooth.R.string.pbap_account_type)); in setUp()
62 mTestResources = mTargetContext.getPackageManager() in setUp()
81 new CallLogPullRequest(mTargetContext, PbapClientConnectionHandler.MCH_PATH, in testNoTimestamp()
103 new CallLogPullRequest(mTargetContext, PbapClientConnectionHandler.MCH_PATH, in testMissedCall()
124 new CallLogPullRequest(mTargetContext, PbapClientConnectionHandler.MCH_PATH, in testUnknownCall()
146 PhonebookPullRequest processor = new PhonebookPullRequest(mTargetContext, mAccount); in testPullPhoneBook()
154 mTargetContext.getContentResolver().delete(Calls.CONTENT_URI, null, null); in cleanupCallLog()
[all …]
DPbapClientServiceTest.java49 private Context mTargetContext; field in PbapClientServiceTest
59 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp()
61 mTargetContext.getResources().getBoolean(R.bool.profile_supported_pbapclient)); in setUp()
76 if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_pbapclient)) { in tearDown()
/packages/apps/EmergencyInfo/tests/unit/src/com/android/emergency/view/
DViewInfoActivityTest.java51 private Context mTargetContext; field in ViewInfoActivityTest
59 mTargetContext = mInstrumentation.getTargetContext(); in setUp()
82 PreferenceManager.getDefaultSharedPreferences(mTargetContext).edit().clear().commit(); in tearDown()
102 PreferenceManager.getDefaultSharedPreferences(mTargetContext) in testNameSet()
124 PreferenceManager.getDefaultSharedPreferences(mTargetContext) in testMedicalInfoSet()
144 ContactTestUtils.createContact(mTargetContext.getContentResolver(), in testEmergencyContactsSet()
146 PreferenceManager.getDefaultSharedPreferences(mTargetContext) in testEmergencyContactsSet()
162 ContactTestUtils.deleteContact(mTargetContext.getContentResolver(), "John", "123")) in testEmergencyContactsSet()
169 ContactTestUtils.createContact(mTargetContext.getContentResolver(), in testMedicalInfoAndEmergencyContactsSet()
171 PreferenceManager.getDefaultSharedPreferences(mTargetContext) in testMedicalInfoAndEmergencyContactsSet()
[all …]
/packages/apps/Contacts/tests/src/com/android/contacts/
DNoPermissionsLaunchSmokeTest.java47 private Context mTargetContext; field in NoPermissionsLaunchSmokeTest
51 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp()
52 assumeTrue(!hasPermission(mTargetContext, Manifest.permission.READ_CONTACTS)); in setUp()
53 assumeTrue(!hasPermission(mTargetContext, Manifest.permission.WRITE_CONTACTS)); in setUp()
54 assumeTrue(!hasPermission(mTargetContext, Manifest.permission.GET_ACCOUNTS)); in setUp()
55 assumeTrue(!hasPermission(mTargetContext, Manifest.permission.READ_PHONE_STATE)); in setUp()
56 assumeTrue(!hasPermission(mTargetContext, Manifest.permission.CALL_PHONE)); in setUp()
60 DynamicShortcuts.reset(mTargetContext); in setUp()
82 final PackageManager packageManager = mTargetContext.getPackageManager(); in launchingMainActivityDoesntCrash()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/
DIconUtilsTest.java36 private Context mTargetContext; field in IconUtilsTest
40 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp()
45 assertThat(IconUtils.loadMimeIcon(mTargetContext, AUDIO_MIME_TYPE)).isNotNull(); in testLoadMimeIcon_isAudioMimeType()
50 assertThat(IconUtils.loadMimeIcon(mTargetContext, IMAGE_MIME_TYPE)).isNotNull(); in testLoadMimeIcon_isImageMimeType()
55 assertThat(IconUtils.loadMimeIcon(mTargetContext, GENERIC_MIME_TYPE)).isNotNull(); in testLoadMimeIcon_isGenericMimeType()
60 assertThat(IconUtils.loadMimeIcon(mTargetContext, VIDEO_MIME_TYPE)).isNotNull(); in testLoadMimeIcon_isVideoMimeType()
65 assertThat(IconUtils.loadMimeIcon(mTargetContext, TEXT_MIME_TYPE)).isNotNull(); in testLoadMimeIcon_isTextMimeType()
70 assertThat(IconUtils.loadMimeIcon(mTargetContext, null)).isNull(); in testLoadMimeIcon_isMimeTypeNull_shouldReturnNull()
/packages/apps/EmergencyInfo/tests/unit/src/com/android/emergency/preferences/
DEmergencyListPreferenceTest.java44 private Context mTargetContext; field in EmergencyListPreferenceTest
49 mTargetContext = mInstrumentation.getTargetContext(); in setUp()
50 PreferenceManager.getDefaultSharedPreferences(mTargetContext).edit().clear().commit(); in setUp()
55 PreferenceManager.getDefaultSharedPreferences(mTargetContext).edit().clear().commit(); in tearDown()
66 mTargetContext.getResources().getString(R.string.unknown_organ_donor); in testSummary_organDonor()
78 mTargetContext.getResources().getString(R.string.unknown_blood_type); in testSummary_bloodType()
89 String titleExp = mTargetContext.getResources().getString(R.string.organ_donor); in testTitle_organDonor()
100 CharSequence titleExp = mTargetContext.getResources().getString(R.string.blood_type); in testTitle_bloodType()
152 final Intent editActivityIntent = new Intent(mTargetContext, EditInfoActivity.class); in startEditInfoActivity()
DEmergencyContactsPreferenceTest.java59 private Context mTargetContext; field in EmergencyContactsPreferenceTest
72 mTargetContext = mInstrumentation.getTargetContext(); in setUp()
75 PreferenceManager.getDefaultSharedPreferences(mTargetContext).edit().clear().commit(); in setUp()
79 mTargetContext.getContentResolver(), NAME, PHONE_NUMBER); in setUp()
80 PreferenceManager.getDefaultSharedPreferences(mTargetContext) in setUp()
92 mTargetContext.getContentResolver(), NAME, PHONE_NUMBER)).isTrue(); in tearDown()
93 PreferenceManager.getDefaultSharedPreferences(mTargetContext).edit().clear().commit(); in tearDown()
121 final Intent editActivityIntent = new Intent(mTargetContext, EditInfoActivity.class); in startActivityAndGetEmergencyContactsPreference()
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/ui/
DThemeUiTestBase.java44 protected Context mTargetContext; field in ThemeUiTestBase
52 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp()
53 mConfiguration = mTargetContext.getResources().getConfiguration(); in setUp()
54 mDisplayMetrics = mTargetContext.getResources().getDisplayMetrics(); in setUp()
55 mCompatibilityInfo = mTargetContext.getResources().getCompatibilityInfo(); in setUp()
60 mTargetContext.getResources().updateConfiguration(mConfiguration, mDisplayMetrics, in tearDown()
/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/model/
DAddWorkspaceItemsTaskTest.java51 private Context mTargetContext; field in AddWorkspaceItemsTaskTest
63 mTargetContext = RuntimeEnvironment.application; in setup()
64 mIdp = InvariantDeviceProfile.INSTANCE.get(mTargetContext); in setup()
66 mAppState = LauncherAppState.getInstance(mTargetContext); in setup()
184 bgDataModel.addItem(mTargetContext, info, false); in writeWorkspaceWithHoles()
186 ContentWriter writer = new ContentWriter(mTargetContext); in writeWorkspaceWithHoles()
189 mTargetContext.getContentResolver().insert(Favorites.CONTENT_URI, in writeWorkspaceWithHoles()
190 writer.getValues(mTargetContext)); in writeWorkspaceWithHoles()
/packages/apps/Settings/tests/legacy_unit/src/com/android/settings/notification/
DChannelNotificationSettingsTest.java55 private Context mTargetContext; field in ChannelNotificationSettingsTest
63 mTargetContext = mInstrumentation.getTargetContext(); in setUp()
69 mNm = (NotificationManager) mTargetContext.getSystemService(Context.NOTIFICATION_SERVICE); in setUp()
78 .putExtra(Settings.EXTRA_APP_PACKAGE, mTargetContext.getPackageName()) in launchNotificationSetting_shouldNotCrash()
97 mTargetContext.getPackageName(), Process.myUid(), blocked); in launchNotificationSettings_blockedChannel()
100 .putExtra(Settings.EXTRA_APP_PACKAGE, mTargetContext.getPackageName()) in launchNotificationSettings_blockedChannel()
DAppBubbleNotificationSettingsTest.java47 private Context mTargetContext; field in AppBubbleNotificationSettingsTest
53 mTargetContext = mInstrumentation.getTargetContext(); in setUp()
63 .putExtra(Settings.EXTRA_APP_PACKAGE, mTargetContext.getPackageName()) in launchBubbleNotificationSetting_shouldNotCrash()
68 CharSequence name = mTargetContext.getApplicationInfo().loadLabel( in launchBubbleNotificationSetting_shouldNotCrash()
69 mTargetContext.getPackageManager()); in launchBubbleNotificationSetting_shouldNotCrash()
/packages/apps/Launcher3/tests/src/com/android/launcher3/ui/
DAbstractLauncherUiTest.java111 protected Context mTargetContext; field in AbstractLauncherUiTest
222 mTargetContext.registerReceiver(broadcastReceiver, in clearPackageData()
228 mTargetContext.unregisterReceiver(broadcastReceiver); in clearPackageData()
295 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp()
296 mTargetPackage = mTargetContext.getPackageName(); in setUp()
299 UserManager userManager = mTargetContext.getSystemService(UserManager.class); in setUp()
334 LauncherSettings.Settings.call(mTargetContext.getContentResolver(), in clearHomescreen()
336 LauncherSettings.Settings.call(mTargetContext.getContentResolver(), in clearHomescreen()
345 mTargetContext).getModel().forceReload()); in resetLoaderState()
356 WidgetUtils.addItemToScreen(item, mTargetContext); in addItemToScreen()
[all …]
/packages/apps/Settings/tests/legacy_unit/src/com/android/settings/display/
DNightDisplaySettingsActivityTest.java41 private Context mTargetContext; field in NightDisplaySettingsActivityTest
46 mTargetContext = instrumentation.getTargetContext(); in setUp()
51 final boolean nightDisplayAvailable = mTargetContext.getResources().getBoolean( in nightDisplaySettingsIntent_resolvesCorrectly()
53 final PackageManager pm = mTargetContext.getPackageManager(); in nightDisplaySettingsIntent_resolvesCorrectly()
59 Assert.assertEquals(mTargetContext.getPackageName(), ri.activityInfo.packageName); in nightDisplaySettingsIntent_resolvesCorrectly()
/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/secondarydisplay/
DSDWorkModeTest.java58 private Context mTargetContext; field in SDWorkModeTest
65 mTargetContext = RuntimeEnvironment.application; in setup()
66 mIdp = InvariantDeviceProfile.INSTANCE.get(mTargetContext); in setup()
67 Settings.Global.putFloat(mTargetContext.getContentResolver(), in setup()
84 ShadowUserManager sum = Shadow.extract(mTargetContext.getSystemService(UserManager.class)); in testAllAppsList_workProfile()
/packages/apps/Launcher3/tests/src/com/android/launcher3/ui/widget/
DBindWidgetTest.java85 mResolver = mTargetContext.getContentResolver(); in setUp()
100 mTargetContext.getPackageManager().getPackageInstaller().abandonSession(mSessionId); in tearDown()
173 assertNotNull(AppWidgetManager.getInstance(mTargetContext) in testPendingWidget_withConfigScreen()
180 AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(mTargetContext); in testPendingWidget_withConfigScreen()
248 PackageInstaller installer = mTargetContext.getPackageManager().getPackageInstaller(); in testPendingWidget_notRestored_activeInstall()
288 InstallSessionHelper.INSTANCE.get(mTargetContext).getActiveSessions() in getInvalidWidgetInfo()
294 mTargetContext.getPackageManager().getPackageInfo( in getInvalidWidgetInfo()
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/archives/
DTestUtils.java34 public final Context mTargetContext; field in TestUtils
39 mTargetContext = targetContext; in TestUtils()
49 "}.zip", mTargetContext.getCacheDir()); in createTemporaryFile()
60 "}.zip", mTargetContext.getCacheDir()); in getSeekableDescriptor()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/opp/
DBluetoothOppServiceTest.java48 private Context mTargetContext; field in BluetoothOppServiceTest
56 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp()
58 mTargetContext.getResources().getBoolean(R.bool.profile_supported_opp)); in setUp()
72 if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_opp)) { in tearDown()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/sap/
DSapServiceTest.java48 private Context mTargetContext; field in SapServiceTest
56 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp()
58 mTargetContext.getResources().getBoolean(R.bool.profile_supported_sap)); in setUp()
72 if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_sap)) { in tearDown()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/avrcpcontroller/
DAvrcpControllerServiceTest.java48 private Context mTargetContext; field in AvrcpControllerServiceTest
56 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp()
58 mTargetContext.getResources() in setUp()
73 if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_avrcp_controller)) { in tearDown()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/pbap/
DBluetoothPbapServiceTest.java49 private Context mTargetContext; field in BluetoothPbapServiceTest
58 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp()
60 mTargetContext.getResources().getBoolean(R.bool.profile_supported_pbap)); in setUp()
75 if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_pbap)) { in tearDown()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/map/
DBluetoothMapServiceTest.java49 private Context mTargetContext; field in BluetoothMapServiceTest
58 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp()
60 mTargetContext.getResources().getBoolean(R.bool.profile_supported_map)); in setUp()
75 if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_map)) { in tearDown()
/packages/apps/TV/tuner/tests/unittests/javatests/com/android/tv/tuner/
DZappingTimeTest.java92 private Context mTargetContext; field in ZappingTimeTest
106 mTargetContext = getInstrumentation().getTargetContext(); in setUp()
107 mTrickplayBufferDir = mTargetContext.getCacheDir(); in setUp()
122 File tsCacheFile = createCacheFile(context, mTargetContext, TEST_TS_FILE_PATH); in setUp()
177 mTargetContext, in setUp()
189 mTargetContext, in setUp()
200 mTargetContext, in setUp()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/pan/
DPanServiceTest.java52 private Context mTargetContext; field in PanServiceTest
62 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp()
64 mTargetContext.getResources().getBoolean(R.bool.profile_supported_pan)); in setUp()
80 if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_pan)) { in tearDown()

1234