/cts/tests/tests/tv/src/android/media/tv/cts/ |
D | TvInputInfoTest.java | 59 if (!Utils.hasTvInputFramework(getContext())) { in setUp() 63 (TvInputManager) getContext().getSystemService(Context.TV_INPUT_SERVICE); in setUp() 71 mPackageManager = getContext().getPackageManager(); in setUp() 75 if (!Utils.hasTvInputFramework(getContext())) { in testTvInputInfoOp() 86 new ComponentName(getContext(), StubTunerTvInputService.class); in testTvInputInfoOp() 91 assertEquals(getContext().getPackageManager().getServiceInfo(componentName, 0).name, in testTvInputInfoOp() 106 TvInputInfoTest.compareTvInputInfos(getContext(), mStubInfo, infoFromParcel)); in testTvInputInfoOp() 113 assertEquals(mStubInfo.loadIcon(getContext()).getConstantState(), in testTvInputInfoOp() 114 infoFromParcel.loadIcon(getContext()).getConstantState()); in testTvInputInfoOp() 115 assertEquals(mStubInfo.loadLabel(getContext()), infoFromParcel.loadLabel(getContext())); in testTvInputInfoOp() [all …]
|
/cts/tests/tests/rscpp/src/android/cts/rscpp/ |
D | RSAllocationTest.java | 32 assertTrue(typedTest(this.getContext().getCacheDir().toString())); in testRSAllocationTypes() 37 assertTrue(test1DCopy(this.getContext().getCacheDir().toString())); in testRSAllocationCopy1D() 42 assertTrue(test2DCopy(this.getContext().getCacheDir().toString())); in testRSAllocationCopy2D() 47 assertTrue(test3DCopy(this.getContext().getCacheDir().toString())); in testRSAllocationCopy3D() 52 assertTrue(test1DCopyPadded(this.getContext().getCacheDir().toString())); in testRSAllocationCopy1DPadded() 57 assertTrue(test2DCopyPadded(this.getContext().getCacheDir().toString())); in testRSAllocationCopy2DPadded() 62 assertTrue(test3DCopyPadded(this.getContext().getCacheDir().toString())); in testRSAllocationCopy3DPadded() 67 assertTrue(testSetElementAt(this.getContext().getCacheDir().toString())); in testRSAllocationSetElementAt()
|
D | RSElementTest.java | 32 assertTrue(testCreatePixel(this.getContext().getCacheDir().toString())); in testRSElementTestCreatePixel() 37 assertTrue(testCreateVector(this.getContext().getCacheDir().toString())); in testRSElementTestCreateVector() 42 assertTrue(testPrebuiltElements(this.getContext().getCacheDir().toString())); in testRSElementTestPrebuiltElements() 47 assertTrue(testIsCompatible(this.getContext().getCacheDir().toString())); in testRSElementTestIsCompatible() 52 assertTrue(testElementBuilder(this.getContext().getCacheDir().toString())); in testRSElementElementBuilder()
|
D | RSObjectTest.java | 32 assertTrue(testClearObjectElement(this.getContext().getCacheDir().toString())); in testRSObjectTestClearObjectElement() 37 assertTrue(testClearObjectType(this.getContext().getCacheDir().toString())); in testRSObjectTestClearObjectType() 42 assertTrue(testClearObjectAllocation(this.getContext().getCacheDir().toString())); in testRSObjectTestClearObjectAllocation() 47 assertTrue(testClearObjectSampler(this.getContext().getCacheDir().toString())); in testRSObjectTestClearObjectSampler() 52 assertTrue(testClearObjectScript(this.getContext().getCacheDir().toString())); in testRSObjectTestClearObjectScript()
|
/cts/hostsidetests/shortcuts/deviceside/multiuser/src/android/content/pm/cts/shortcut/multiuser/ |
D | ShortcutManagerManagedUserTest.java | 35 Launcher.setAsDefaultLauncher(getInstrumentation(), getContext()); in test01_managedProfileNotStarted() 52 new ShortcutInfo.Builder(getContext(), "s1") in test02_createShortuctsOnPrimaryUser() 55 new ComponentName(getContext(), MainActivity.class))).build()))); in test02_createShortuctsOnPrimaryUser() 60 new ShortcutInfo.Builder(getContext(), "s1") in test03_createShortuctsOnManagedProfile() 63 new ComponentName(getContext(), MainActivity.class))).build()))); in test03_createShortuctsOnManagedProfile() 67 Launcher.setAsDefaultLauncher(getInstrumentation(), getContext()); in test04_getAndLaunch_primary() 74 .setPackage(getContext().getPackageName()) in test04_getAndLaunch_primary() 92 getLauncherApps().startShortcut(getContext().getPackageName(), "s1", null, null, in test04_getAndLaunch_primary() 96 getLauncherApps().startShortcut(getContext().getPackageName(), "s1", null, null, in test04_getAndLaunch_primary() 102 Launcher.setAsDefaultLauncher(getInstrumentation(), getContext()); in test05_getAndLaunch_managed() [all …]
|
/cts/tests/tests/contactsprovider/src/android/provider/cts/contacts/ |
D | Contacts_PhonesTest.java | 26 String display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabel() 42 String display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabelCharSequenceArray() 46 display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabelCharSequenceArray() 50 display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabelCharSequenceArray() 54 display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabelCharSequenceArray() 58 display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabelCharSequenceArray() 62 display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabelCharSequenceArray() 66 display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabelCharSequenceArray() 70 display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabelCharSequenceArray()
|
/cts/tests/tests/os/src/android/os/cts/ |
D | BinderTest.java | 213 getContext().bindService(mService, conn1, 0); in testTransact() 214 getContext().startService(mService); in testTransact() 218 getContext().bindService(mService, conn2, 0); in testTransact() 221 getContext().unbindService(conn2); in testTransact() 226 getContext().stopService(mService); in testTransact() 227 getContext().unbindService(conn1); in testTransact() 228 getContext().unbindService(conn2); in testTransact() 237 getContext().stopService(mService); in testTransact() 240 getContext().unbindService(conn1); in testTransact() 249 getContext().bindService(mService, conn1, 0); in testTransact() [all …]
|
/cts/hostsidetests/appsecurity/test-apps/InstantUpgradeApp/src/com/android/cts/instantupgradeapp/ |
D | ClientTest.java | 43 assertTrue(InstrumentationRegistry.getContext().getPackageManager().isInstantApp()); in testInstantApplicationWritePreferences() 45 InstrumentationRegistry.getContext().getSharedPreferences("preferences", 0); in testInstantApplicationWritePreferences() 51 assertFalse(InstrumentationRegistry.getContext().getPackageManager().isInstantApp()); in testFullApplicationReadPreferences() 53 InstrumentationRegistry.getContext().getSharedPreferences("preferences", 0); in testFullApplicationReadPreferences() 59 assertTrue(InstrumentationRegistry.getContext().getPackageManager().isInstantApp()); in testInstantApplicationWriteFile() 61 .getContext().openFileOutput("test.txt", Context.MODE_PRIVATE)) { in testInstantApplicationWriteFile() 68 assertFalse(InstrumentationRegistry.getContext().getPackageManager().isInstantApp()); in testFullApplicationReadFile() 70 .getContext().openFileInput("test.txt")) { in testFullApplicationReadFile()
|
/cts/hostsidetests/appsecurity/test-apps/StorageApp/src/com/android/cts/storageapp/ |
D | StorageTest.java | 65 private Context getContext() { in getContext() method in StorageTest 66 return getInstrumentation().getContext(); in getContext() 70 useSpace(getContext()); in testAllocate() 74 final StorageStatsManager stats = getContext() in testFullDisk() 77 final File dataDir = getContext().getDataDir(); in testFullDisk() 85 getContext().getPackageManager().setComponentEnabledSetting( in testTweakComponent() 86 new ComponentName(getContext().getPackageName(), UtilsReceiver.class.getName()), in testTweakComponent() 92 assertTrue(getContext().getDataDir().getUsableSpace() < 256_000_000); in testClearSpace() 116 assertTrue(getContext().getDataDir().getUsableSpace() > 256_000_000); in testClearSpace() 194 getSizeManual(getContext().getDataDir())); in testVerifySpaceManual() [all …]
|
/cts/tests/tests/permission/src/android/permission/cts/ |
D | ContactsProviderTest.java | 38 getContext().getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, in testQueryContacts() 56 getContext().getContentResolver().insert(ContactsContract.Contacts.CONTENT_URI, in testInsertContacts() 74 getContext().getContentResolver().query(ContactsContract.Profile.CONTENT_URI, in testQueryProfile() 94 getContext().getContentResolver().insert(ContactsContract.Profile.CONTENT_URI, in testInsertProfile() 112 getContext().getContentResolver().update(ContactsContract.Profile.CONTENT_URI, in testUpdateProfile() 130 getContext().getContentResolver().query( in testQueryPhoneEnterprise() 149 getContext().getContentResolver().query( in testRawContactsEntityCorp()
|
/cts/tests/filesystem/src/android/filesystem/cts/ |
D | RandomRWTest.java | 19 import static androidx.test.InstrumentationRegistry.getContext; 56 FileUtil.removeFileOrDir(getContext(), DIR_RANDOM_WR); in tearDown() 57 FileUtil.removeFileOrDir(getContext(), DIR_RANDOM_RD); in tearDown() 64 final long fileSize = FileUtil.getFileSizeExceedingMemory(getContext(), READ_BUFFER_SIZE); in testRandomRead() 68 FileActivity.startFileActivity(getContext()); in testRandomRead() 71 double mbps = FileUtil.doRandomReadTest(getContext(), DIR_RANDOM_RD, report, fileSize, in testRandomRead() 90 FileActivity.startFileActivity(getContext()); in testRandomUpdate() 96 mbps = FileUtil.doRandomWriteTest(getContext(), DIR_RANDOM_WR, report, fileSize, in testRandomUpdate()
|
D | SequentialRWTest.java | 21 import static androidx.test.InstrumentationRegistry.getContext; 69 FileUtil.removeFileOrDir(getContext(), DIR_SEQ_WR); in tearDown() 70 FileUtil.removeFileOrDir(getContext(), DIR_SEQ_UPDATE); in tearDown() 71 FileUtil.removeFileOrDir(getContext(), DIR_SEQ_RD); in tearDown() 77 final long fileSize = FileUtil.getFileSizeExceedingMemory(getContext(), BUFFER_SIZE); in testSingleSequentialWrite() 81 FileActivity.startFileActivity(getContext()); in testSingleSequentialWrite() 87 final File[] files = FileUtil.createNewFiles(getContext(), DIR_SEQ_WR, in testSingleSequentialWrite() 115 final long fileSize = FileUtil.getFileSizeExceedingMemory(getContext(), BUFFER_SIZE); in testSingleSequentialUpdate() 119 FileActivity.startFileActivity(getContext()); in testSingleSequentialUpdate() 122 FileUtil.doSequentialUpdateTest(getContext(), DIR_SEQ_UPDATE, fileSize, BUFFER_SIZE, in testSingleSequentialUpdate() [all …]
|
/cts/hostsidetests/shortcuts/deviceside/upgrade/src/android/content/pm/cts/shortcut/upgrade/ |
D | ShortcutManagerPreUpgradeTest.java | 36 final Icon icon1 = Icon.createWithResource(getContext(), R.drawable.black_32x32); in testPreUpgrade() 37 final Icon icon2 = Icon.createWithResource(getContext(), R.drawable.black_64x64); in testPreUpgrade() 42 final ShortcutInfo s1 = new ShortcutInfo.Builder(getContext(), "s1") in testPreUpgrade() 51 final ShortcutInfo s2 = new ShortcutInfo.Builder(getContext(), "s2") in testPreUpgrade() 61 Launcher.setAsDefaultLauncher(getInstrumentation(), getContext()); in testPreUpgrade() 64 assertIconDimensions(getContext().getPackageName(), "s1", icon1); in testPreUpgrade() 65 assertIconDimensions(getContext().getPackageName(), "s2", icon2); in testPreUpgrade() 70 assertIconDimensions(getContext().getPackageName(), "s1", icon2); in testPreUpgrade()
|
D | ShortcutManagerPostUpgradeTest.java | 50 final Icon icon1 = Icon.createWithResource(getContext(), R.drawable.black_32x32); in testPostUpgrade() 51 final Icon icon2 = Icon.createWithResource(getContext(), R.drawable.black_64x64); in testPostUpgrade() 54 Launcher.setAsDefaultLauncher(getInstrumentation(), getContext()); in testPostUpgrade() 57 assertIconDimensions(getContext().getPackageName(), "s1", icon1); in testPostUpgrade() 58 assertIconDimensions(getContext().getPackageName(), "s2", icon2); in testPostUpgrade() 63 assertIconDimensions(getContext().getPackageName(), "s1", icon2); in testPostUpgrade()
|
/cts/tests/tests/keystore/src/android/keystore/cts/ |
D | KeyPairGeneratorSpecTest.java | 43 KeyPairGeneratorSpec spec = new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_Unencrypted_Success() 51 assertEquals("Context should be the one specified", getContext(), spec.getContext()); in testBuilder_Unencrypted_Success() 74 new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_MissingAlias_Failure() 87 new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_MissingSubjectDN_Failure() 100 new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_MissingSerialNumber_Failure() 113 new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_MissingStartDate_Failure() 126 new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_MissingEndDate_Failure() 139 new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_EndBeforeStart_Failure()
|
/cts/hostsidetests/appsecurity/test-apps/EphemeralTestApp/EphemeralApp1/src/com/android/cts/ephemeralapp1/ |
D | ClientTest.java | 126 InstrumentationRegistry.getContext() in setUp() 132 InstrumentationRegistry.getContext().unregisterReceiver(mReceiver); in tearDown() 140 final List<ResolveInfo> resolveInfo = InstrumentationRegistry.getContext() in testQuery() 163 final List<ResolveInfo> resolveInfo = InstrumentationRegistry.getContext() in testQuery() 186 final List<ResolveInfo> resolveInfo = InstrumentationRegistry.getContext() in testQuery() 211 final List<ResolveInfo> resolveInfo = InstrumentationRegistry.getContext() in testQuery() 236 final List<ResolveInfo> resolveInfo = InstrumentationRegistry.getContext() in testQuery() 255 .getContext().getPackageManager().queryIntentServices(queryIntent, 0 /*flags*/); in testQuery() 277 .getContext().getPackageManager().queryIntentServices(queryIntent, 0 /*flags*/); in testQuery() 295 .getContext().getPackageManager().queryIntentServices(queryIntent, 0 /*flags*/); in testQuery() [all …]
|
/cts/tests/app/src/android/app/cts/ |
D | LaunchTest.java | 31 mIntent.putExtra("component", new ComponentName(getContext(), ClearTop.class)); in testClearTopWhilResumed() 37 mIntent.putExtra("component", new ComponentName(getContext(), ClearTop.class)); in testClearTopInCreate() 46 mIntent.putExtra("component", new ComponentName(getContext(), LocalScreen.class)); in testLocalScreen() 51 mIntent.putExtra("component", new ComponentName(getContext(), TestedScreen.class)); in testColdScreen() 56 mIntent.putExtra("component", new ComponentName(getContext(), LocalActivity.class)); in testLocalActivity() 61 mIntent.putExtra("component", new ComponentName(getContext(), TestedActivity.class)); in testColdActivity()
|
/cts/hostsidetests/devicepolicy/app/DeviceAdminService/src/com/android/cts/deviceadminservice/ |
D | ComponentController.java | 28 getContext().getPackageManager().setComponentEnabledSetting(cn, in enableComponent() 37 enableComponent(new ComponentName(getContext(), MyService.class), true); in testEnableService1() 41 enableComponent(new ComponentName(getContext(), MyService.class), false); in testDisableService1() 45 enableComponent(new ComponentName(getContext(), MyService2.class), true); in testEnableService2() 49 enableComponent(new ComponentName(getContext(), MyService2.class), false); in testDisableService2()
|
/cts/tests/tests/provider/src/android/provider/cts/settings/ |
D | SettingsTest.java | 90 ContentResolver cr = getContext().getContentResolver(); in testSystemTable() 141 ContentResolver cr = getContext().getContentResolver(); in testSecureTable() 165 ContentResolver cr = getContext().getContentResolver(); in tryBadTableAccess() 238 final ResolveInfo ri = getContext().getPackageManager().resolveActivity( in testUserDictionarySettingsExists() 245 final int initialValue = Settings.System.getInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromSameProcess() 250 Settings.System.putInt(getInstrumentation().getContext().getContentResolver(), in testNoStaleValueModifiedFromSameProcess() 252 final int actualValue = Settings.System.getInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromSameProcess() 257 Settings.System.putInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromSameProcess() 264 final int initialValue = Settings.System.getInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromOtherProcess() 271 final int actualValue = Settings.System.getInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromOtherProcess() [all …]
|
/cts/hostsidetests/appsecurity/test-apps/InstantCookieApp/src/test/instant/cookie/ |
D | CookieTest.java | 36 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testCookieUpdateAndRetrieval() 66 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testCookiePersistedAcrossInstantInstalls1() 74 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testCookiePersistedAcrossInstantInstalls2() 82 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testCookiePersistedUpgradeFromInstant1() 93 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testCookiePersistedUpgradeFromInstant2() 104 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testCookieResetOnNonInstantReinstall1() 112 PackageManager pm = InstrumentationRegistry.getContext().getPackageManager(); in testCookieResetOnNonInstantReinstall2()
|
/cts/tests/tests/permission/telephony/src/android/permission/cts/telephony/ |
D | TelephonyManagerPermissionTest.java | 52 mHasTelephony = getContext().getPackageManager().hasSystemFeature( in setUp() 55 (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE); in setUp() 57 mAudioManager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE); in setUp() 226 getContext().sendBroadcast(intent); in testProtectedBroadcasts() 231 getContext().sendBroadcast(intent); in testProtectedBroadcasts() 236 getContext().sendBroadcast(intent); in testProtectedBroadcasts() 242 getContext().sendBroadcast(intent); in testProtectedBroadcasts() 248 getContext().sendBroadcast(intent); in testProtectedBroadcasts() 254 getContext().sendBroadcast(intent); in testProtectedBroadcasts() 259 getContext().sendBroadcast(intent); in testProtectedBroadcasts() [all …]
|
/cts/hostsidetests/incident/apps/batterystatsapp/src/com/android/server/cts/device/batterystats/ |
D | BatteryStatsSyncTest.java | 34 private static Context getContext() { in getContext() method in BatteryStatsSyncTest 35 return InstrumentationRegistry.getContext(); in getContext() 40 BatteryStatsAuthenticator.removeAllAccounts(getContext()); in setUp() 45 BatteryStatsAuthenticator.removeAllAccounts(getContext()); in tearDown() 56 BatteryStatsAuthenticator.ensureTestAccount(getContext()); in testRunSyncs()
|
/cts/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/src/com/android/cts/writeexternalstorageapp/ |
D | WriteGiftTest.java | 38 final List<File> writeList = getAllPackageSpecificNoGiftPaths(getContext(), PACKAGE_WRITE); in testStageNonGifts() 50 final List<File> noneList = getAllPackageSpecificNoGiftPaths(getContext(), PACKAGE_NONE); in testNoGifts() 55 final List<File> writeList = getAllPackageSpecificNoGiftPaths(getContext(), PACKAGE_WRITE); in testNoGifts() 66 final List<File> noneList = getAllPackageSpecificObbGiftPaths(getContext(), PACKAGE_NONE); in testObbGifts() 82 final List<File> noneList = getAllPackageSpecificObbGiftPaths(getContext(), PACKAGE_NONE); in testAccessObbGifts() 93 final List<File> noneList = getAllPackageSpecificObbGiftPaths(getContext(), PACKAGE_NONE); in testCantAccessObbGifts() 101 for (File dir : getAllPackageSpecificPaths(getContext())) { in testClearingWrite() 109 for (File dir : getAllPackageSpecificPaths(getContext())) { in testClearingRead()
|
/cts/tests/tests/permission2/src/android/permission2/cts/ |
D | ContactsProviderTest.java | 38 getContext().getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, in testQueryContacts() 49 getContext().getContentResolver().insert(ContactsContract.Contacts.CONTENT_URI, in testInsertContacts() 64 getContext().getContentResolver().query(ContactsContract.Profile.CONTENT_URI, in testQueryProfile() 76 getContext().getContentResolver().insert(ContactsContract.Profile.CONTENT_URI, in testInsertProfile() 91 getContext().getContentResolver().update(ContactsContract.Profile.CONTENT_URI, in testUpdateProfile()
|
/cts/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/src/com/android/cts/comp/ |
D | ManagementTest.java | 41 AdminReceiver.getComponentName(getContext()))); in testIsManagedProfile() 42 assertTrue(mDevicePolicyManager.isProfileOwnerApp(getContext().getPackageName())); in testIsManagedProfile() 44 AdminReceiver.getComponentName(getContext()))); in testIsManagedProfile() 50 AdminReceiver.getComponentName(getContext()))); in testIsDeviceOwner() 51 assertTrue(mDevicePolicyManager.isDeviceOwnerApp(getContext().getPackageName())); in testIsDeviceOwner() 53 AdminReceiver.getComponentName(getContext()))); in testIsDeviceOwner()
|