/packages/apps/EmergencyInfo/tests/unit/src/com/android/emergency/edit/ |
D | EditInfoActivityTest.java | 59 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/unit/com/android/documentsui/overlay/ |
D | OverlayableTest.java | 49 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/ |
D | PbapParserTest.java | 50 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 …]
|
D | PbapClientServiceTest.java | 48 private Context mTargetContext; field in PbapClientServiceTest 58 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp() 60 mTargetContext.getResources().getBoolean(R.bool.profile_supported_pbapclient)); in setUp() 74 if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_pbapclient)) { in tearDown()
|
/packages/apps/EmergencyInfo/tests/unit/src/com/android/emergency/view/ |
D | ViewInfoActivityTest.java | 51 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/ |
D | NoPermissionsLaunchSmokeTest.java | 47 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/ |
D | IconUtilsTest.java | 22 private Context mTargetContext; field in IconUtilsTest 26 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp() 31 assertThat(IconUtils.loadMimeIcon(mTargetContext, AUDIO_MIME_TYPE)).isNotNull(); in testLoadMimeIcon_isAudioMimeType() 36 assertThat(IconUtils.loadMimeIcon(mTargetContext, IMAGE_MIME_TYPE)).isNotNull(); in testLoadMimeIcon_isImageMimeType() 41 assertThat(IconUtils.loadMimeIcon(mTargetContext, GENERIC_MIME_TYPE)).isNotNull(); in testLoadMimeIcon_isGenericMimeType() 46 assertThat(IconUtils.loadMimeIcon(mTargetContext, VIDEO_MIME_TYPE)).isNotNull(); in testLoadMimeIcon_isVideoMimeType() 51 assertThat(IconUtils.loadMimeIcon(mTargetContext, TEXT_MIME_TYPE)).isNotNull(); in testLoadMimeIcon_isTextMimeType() 56 assertThat(IconUtils.loadMimeIcon(mTargetContext, null)).isNull(); in testLoadMimeIcon_isMimeTypeNull_shouldReturnNull()
|
/packages/apps/EmergencyInfo/tests/unit/src/com/android/emergency/preferences/ |
D | EmergencyListPreferenceTest.java | 44 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()
|
D | EmergencyContactsPreferenceTest.java | 59 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/Launcher3/tests/src/com/android/launcher3/ui/ |
D | AbstractLauncherUiTest.java | 97 protected Context mTargetContext; field in AbstractLauncherUiTest 137 mTargetContext.registerReceiver(broadcastReceiver, in clearPackageData() 143 mTargetContext.unregisterReceiver(broadcastReceiver); in clearPackageData() 173 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp() 174 mTargetPackage = mTargetContext.getPackageName(); in setUp() 193 LauncherSettings.Settings.call(mTargetContext.getContentResolver(), in clearLauncherData() 206 LauncherSettings.Settings.call(mTargetContext.getContentResolver(), in clearHomescreen() 208 LauncherSettings.Settings.call(mTargetContext.getContentResolver(), in clearHomescreen() 216 () -> LauncherAppState.getInstance(mTargetContext).getModel().forceReload()); in resetLoaderState() 225 final LauncherModel model = LauncherAppState.getInstance(mTargetContext).getModel(); in waitForModelLoaded() [all …]
|
/packages/apps/Launcher3/tests/src/com/android/launcher3/ui/widget/ |
D | BindWidgetTest.java | 87 mResolver = mTargetContext.getContentResolver(); in setUp() 88 mWidgetManager = AppWidgetManagerCompat.getInstance(mTargetContext); in setUp() 102 mTargetContext.getPackageManager().getPackageInstaller().abandonSession(mSessionId); in tearDown() 175 assertNotNull(AppWidgetManager.getInstance(mTargetContext) in testPendingWidget_withConfigScreen() 230 PackageInstaller installer = mTargetContext.getPackageManager().getPackageInstaller(); in testPendingWidget_notRestored_activeInstall() 262 ContentWriter writer = new ContentWriter(mTargetContext); in setupContents() 269 mResolver.insert(LauncherSettings.Favorites.CONTENT_URI, writer.getValues(mTargetContext)); in setupContents() 310 … Bundle options = WidgetHostViewLoader.getDefaultOptionsForWidget(mTargetContext, pendingInfo); in createWidgetInfo() 312 AppWidgetHost host = new LauncherAppWidgetHost(mTargetContext); in createWidgetInfo() 333 PackageInstallerCompat.getInstance(mTargetContext).updateAndGetActiveSessionCache() in getInvalidWidgetInfo() [all …]
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/ui/ |
D | ThemeUiTestBase.java | 44 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/Settings/tests/unit/src/com/android/settings/notification/ |
D | AppNotificationSettingsTest.java | 62 private Context mTargetContext; field in AppNotificationSettingsTest 76 mTargetContext = mInstrumentation.getTargetContext(); in setUp() 82 mNm = (NotificationManager) mTargetContext.getSystemService(Context.NOTIFICATION_SERVICE); in setUp() 98 .putExtra(Settings.EXTRA_APP_PACKAGE, mTargetContext.getPackageName()) in launchNotificationSetting_shouldNotHaveAppInfoLink() 111 .putExtra(Settings.EXTRA_APP_PACKAGE, mTargetContext.getPackageName()) in launchNotificationSetting_showGroupsWithMultipleChannels() 125 .putExtra(Settings.EXTRA_APP_PACKAGE, mTargetContext.getPackageName()) in launchNotificationSetting_showUngroupedChannels() 135 .putExtra(Settings.EXTRA_APP_PACKAGE, mTargetContext.getPackageName()) in launchNotificationSetting_showGroupsWithOneChannel()
|
D | ChannelNotificationSettingsTest.java | 55 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()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/development/ |
D | BluetoothMaxConnectedAudioDevicesPreferenceControllerInstrumentationTest.java | 39 private Context mTargetContext; field in BluetoothMaxConnectedAudioDevicesPreferenceControllerInstrumentationTest 46 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp() 48 mListValues = mTargetContext.getResources() in setUp() 50 mListEntries = mTargetContext.getResources() in setUp() 52 mDefaultMaxConnectedAudioDevices = String.valueOf(mTargetContext.getResources() in setUp()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/display/ |
D | NightDisplaySettingsActivityTest.java | 41 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/TV/tuner/tests/unittests/javatests/com/android/tv/tuner/ |
D | ZappingTimeTest.java | 92 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()
|
D | ZappingTimeTestExoV2.java | 99 private Context mTargetContext; field in ZappingTimeTestExoV2 114 mTargetContext = getInstrumentation().getTargetContext(); in setUp() 115 mTrickplayBufferDir = mTargetContext.getCacheDir(); in setUp() 130 File tsCacheFile = createCacheFile(context, mTargetContext, TEST_TS_FILE_PATH); in setUp() 218 mTargetContext, in handleMessageStartPlayback() 224 mPlayer = new MpegTsPlayerV2(mTargetContext, mMpegTsPlayerListener); in handleMessageStartPlayback() 228 mSourceManager.createDataSource(mTargetContext, mChannel, mEventListener); in handleMessageStartPlayback()
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/opp/ |
D | BluetoothOppServiceTest.java | 45 private Context mTargetContext; field in BluetoothOppServiceTest 53 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp() 55 mTargetContext.getResources().getBoolean(R.bool.profile_supported_opp)); in setUp() 68 if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_opp)) { in tearDown()
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/avrcpcontroller/ |
D | AvrcpControllerServiceTest.java | 45 private Context mTargetContext; field in AvrcpControllerServiceTest 53 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp() 55 mTargetContext.getResources() in setUp() 69 if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_avrcp_controller)) { in tearDown()
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/sap/ |
D | SapServiceTest.java | 45 private Context mTargetContext; field in SapServiceTest 53 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp() 55 mTargetContext.getResources().getBoolean(R.bool.profile_supported_sap)); in setUp() 68 if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_sap)) { in tearDown()
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/map/ |
D | BluetoothMapServiceTest.java | 48 private Context mTargetContext; field in BluetoothMapServiceTest 57 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp() 59 mTargetContext.getResources().getBoolean(R.bool.profile_supported_map)); in setUp() 73 if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_map)) { in tearDown()
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hfpclient/ |
D | HeadsetClientServiceTest.java | 49 private Context mTargetContext; field in HeadsetClientServiceTest 59 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp() 61 mTargetContext.getResources().getBoolean(R.bool.profile_supported_hfpclient)); in setUp() 76 if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_hfpclient)) { in tearDown()
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/pbap/ |
D | BluetoothPbapServiceTest.java | 48 private Context mTargetContext; field in BluetoothPbapServiceTest 57 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp() 59 mTargetContext.getResources().getBoolean(R.bool.profile_supported_pbap)); in setUp() 73 if (!mTargetContext.getResources().getBoolean(R.bool.profile_supported_pbap)) { in tearDown()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/archives/ |
D | TestUtils.java | 38 public final Context mTargetContext; field in TestUtils 43 mTargetContext = targetContext; in TestUtils() 53 "}.zip", mTargetContext.getCacheDir()); in createTemporaryFile() 65 "}.zip", mTargetContext.getCacheDir()); in getSeekableDescriptor()
|