Home
last modified time | relevance | path

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

1234

/aosp12/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/overlay/
H A 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()
/aosp12/frameworks/base/core/tests/coretests/src/android/accessibilityservice/
H A DAccessibilityShortcutInfoTest.java54 private Context mTargetContext; field in AccessibilityShortcutInfoTest
61 mTargetContext = InstrumentationRegistry.getInstrumentation() in setUp()
63 mPackageManager = mTargetContext.getPackageManager(); in setUp()
64 mComponentName = new ComponentName(mTargetContext, AccessibilityTestActivity.class); in setUp()
71 final String description = mTargetContext.getResources() in testDescription()
81 final String summary = mTargetContext.getResources() in testSummary()
98 mShortcutInfo.loadAnimatedImage(mTargetContext)); in testLoadAnimatedImage()
103 final String htmlDescription = mTargetContext.getResources() in testHtmlDescription()
137 final AccessibilityManager accessibilityManager = (AccessibilityManager) mTargetContext in getAccessibilityShortcutInfo()
141 mTargetContext, mTargetContext.getUserId()); in getAccessibilityShortcutInfo()
/aosp12/packages/apps/EmergencyInfo/tests/unit/src/com/android/emergency/edit/
H A DEditInfoActivityTest.java59 private Context mTargetContext; field in EditInfoActivityTest
64 mTargetContext = mInstrumentation.getTargetContext(); in setUp()
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()
117 .createContact(mTargetContext.getContentResolver(), "Michael", "789"); in testClearAllPreferences()
118 PreferenceManager.getDefaultSharedPreferences(mTargetContext) in testClearAllPreferences()
122 final PackageManager packageManager = mTargetContext.getPackageManager(); in testClearAllPreferences()
123 final String packageName = mTargetContext.getPackageName(); in testClearAllPreferences()
[all …]
/aosp12/packages/apps/Contacts/tests/src/com/android/contacts/
H A 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()
/aosp12/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/pbapclient/
H A 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()
154 mTargetContext.getContentResolver().delete(Calls.CONTENT_URI, null, null); in cleanupCallLog()
166 Cursor cursor = mTargetContext.getContentResolver() in verifyCallLog()
[all …]
H A 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()
/aosp12/packages/apps/EmergencyInfo/tests/unit/src/com/android/emergency/view/
H A 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()
169 ContactTestUtils.createContact(mTargetContext.getContentResolver(), in testMedicalInfoAndEmergencyContactsSet()
171 PreferenceManager.getDefaultSharedPreferences(mTargetContext) in testMedicalInfoAndEmergencyContactsSet()
174 PreferenceManager.getDefaultSharedPreferences(mTargetContext) in testMedicalInfoAndEmergencyContactsSet()
[all …]
/aosp12/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/
H A 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()
/aosp12/packages/apps/EmergencyInfo/tests/unit/src/com/android/emergency/preferences/
H A 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()
H A 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()
/aosp12/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/ui/
H A 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()
/aosp12/packages/apps/Settings/tests/legacy_unit/src/com/android/settings/display/
H A 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()
/aosp12/packages/apps/Settings/tests/legacy_unit/src/com/android/settings/notification/
H A 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()
H A 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()
/aosp12/packages/apps/Launcher3/tests/src/com/android/launcher3/model/
H A DAddWorkspaceItemsTaskTest.java52 private Context mTargetContext; field in AddWorkspaceItemsTaskTest
64 mTargetContext = mModelHelper.sandboxContext; in setup()
65 mIdp = InvariantDeviceProfile.INSTANCE.get(mTargetContext); in setup()
67 mAppState = LauncherAppState.getInstance(mTargetContext); in setup()
190 bgDataModel.addItem(mTargetContext, info, false); in writeWorkspaceWithHoles()
192 ContentWriter writer = new ContentWriter(mTargetContext); in writeWorkspaceWithHoles()
195 mTargetContext.getContentResolver().insert(Favorites.CONTENT_URI, in writeWorkspaceWithHoles()
196 writer.getValues(mTargetContext)); in writeWorkspaceWithHoles()
/aosp12/bootable/recovery/updater_sample/tests/src/com/example/android/systemupdatersample/util/
H A DFileDownloaderTest.java50 private Context mTargetContext; field in FileDownloaderTest
55 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp()
62 .get(mTargetContext.getCacheDir().getAbsolutePath(), "ota.zip") in download_downloadsChunkOfZip()
70 .get(mTargetContext.getCacheDir().getAbsolutePath(), "care_map.txt") in download_downloadsChunkOfZip()
/aosp12/packages/apps/Launcher3/tests/src/com/android/launcher3/ui/
H A DAbstractLauncherUiTest.java110 protected Context mTargetContext; field in AbstractLauncherUiTest
200 mTargetContext.registerReceiver(broadcastReceiver, in clearPackageData()
206 mTargetContext.unregisterReceiver(broadcastReceiver); in clearPackageData()
260 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp()
261 mTargetPackage = mTargetContext.getPackageName(); in setUp()
297 LauncherSettings.Settings.call(mTargetContext.getContentResolver(), in clearHomescreen()
299 LauncherSettings.Settings.call(mTargetContext.getContentResolver(), in clearHomescreen()
308 mTargetContext).getModel().forceReload()); in resetLoaderState()
319 WidgetUtils.addItemToScreen(item, mTargetContext); in addItemToScreen()
423 return mTargetContext.getSystemService(LauncherApps.class) in getSettingsApp()
[all …]
/aosp12/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/archives/
H A 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()
/aosp12/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/avrcpcontroller/
H A 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()
/aosp12/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/opp/
H A 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()
/aosp12/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/sap/
H A 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()
/aosp12/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/map/
H A 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()
/aosp12/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/pbap/
H A 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()
/aosp12/frameworks/base/tests/testables/src/android/testing/
H A DLayoutInflaterBuilder.java40 private Context mTargetContext; field in LayoutInflaterBuilder
54 mTargetContext = fromContext; in LayoutInflaterBuilder()
69 mTargetContext = targetContext; in target()
125 LayoutInflater.from(mFromContext).cloneInContext(mTargetContext); in build()
/aosp12/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/gatt/
H A DGattServiceTest.java33 private Context mTargetContext; field in GattServiceTest
42 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp()
44 mTargetContext.getResources().getBoolean(R.bool.profile_supported_gatt)); in setUp()
55 if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_gatt)) { in tearDown()

1234