/cts/tests/tests/content/src/android/content/pm/cts/ |
D | PermissionFeatureTest.java | 24 PackageManager pm = getContext().getPackageManager(); in testPermissionRequiredFeatureDefined() 27 getContext().getPackageName())); in testPermissionRequiredFeatureDefined() 31 PackageManager pm = getContext().getPackageManager(); in testPermissionRequiredFeatureUndefined() 34 getContext().getPackageName())); in testPermissionRequiredFeatureUndefined() 38 PackageManager pm = getContext().getPackageManager(); in testPermissionRequiredNotFeatureDefined() 41 getContext().getPackageName())); in testPermissionRequiredNotFeatureDefined() 45 PackageManager pm = getContext().getPackageManager(); in testPermissionRequiredNotFeatureUndefined() 48 getContext().getPackageName())); in testPermissionRequiredNotFeatureUndefined() 52 PackageManager pm = getContext().getPackageManager(); in testPermissionRequiredMultiDeny() 55 getContext().getPackageName())); in testPermissionRequiredMultiDeny() [all …]
|
/cts/tests/tests/tv/src/android/media/tv/cts/ |
D | TvInputInfoTest.java | 56 if (!Utils.hasTvInputFramework(getContext())) { in setUp() 60 (TvInputManager) getContext().getSystemService(Context.TV_INPUT_SERVICE); in setUp() 68 mPackageManager = getContext().getPackageManager(); in setUp() 72 if (!Utils.hasTvInputFramework(getContext())) { in testTvInputInfoOp() 83 new ComponentName(getContext(), StubTunerTvInputService.class); in testTvInputInfoOp() 88 assertEquals(getContext().getPackageManager().getServiceInfo(componentName, 0).name, in testTvInputInfoOp() 103 TvInputInfoTest.compareTvInputInfos(getContext(), mStubInfo, infoFromParcel)); in testTvInputInfoOp() 110 assertEquals(mStubInfo.loadIcon(getContext()).getConstantState(), in testTvInputInfoOp() 111 infoFromParcel.loadIcon(getContext()).getConstantState()); in testTvInputInfoOp() 112 assertEquals(mStubInfo.loadLabel(getContext()), infoFromParcel.loadLabel(getContext())); in testTvInputInfoOp() [all …]
|
/cts/hostsidetests/appsecurity/test-apps/UsePermissionApp22/src/com/android/cts/usepermission/ |
D | UsePermissionTest22.java | 47 final Context context = getInstrumentation().getContext(); in testCompatDefault() 64 assertMediaReadWriteAccess(getInstrumentation().getContext().getContentResolver()); in testCompatDefault() 75 final Context context = getInstrumentation().getContext(); in testCompatRevoked_part2() 94 assertMediaNoAccess(getInstrumentation().getContext().getContentResolver(), true); in testCompatRevoked_part2() 98 "/Android/data/" + getInstrumentation().getContext().getPackageName())); in testCompatRevoked_part2() 103 assertEquals(PackageManager.PERMISSION_GRANTED, getInstrumentation().getContext() in testAllPermissionsGrantedByDefault() 105 assertEquals(PackageManager.PERMISSION_GRANTED, getInstrumentation().getContext() in testAllPermissionsGrantedByDefault() 108 assertEquals(PackageManager.PERMISSION_GRANTED, getInstrumentation().getContext() in testAllPermissionsGrantedByDefault() 110 assertEquals(PackageManager.PERMISSION_GRANTED, getInstrumentation().getContext() in testAllPermissionsGrantedByDefault() 112 assertEquals(PackageManager.PERMISSION_GRANTED, getInstrumentation().getContext() in testAllPermissionsGrantedByDefault() [all …]
|
/cts/tests/tests/provider/src/android/provider/cts/contacts/ |
D | Contacts_PhonesTest.java | 26 String display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabel() 30 CharSequence[] labels = getContext().getResources().getTextArray( in testGetDisplayLabel() 32 display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabel() 36 display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabel() 40 display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabel() 44 display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabel() 48 display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabel() 52 display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabel() 56 display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabel() 72 String display = Phones.getDisplayLabel(getContext(), in testGetDisplayLabelCharSequenceArray() [all …]
|
D | Contacts_ContactMethodsTest.java | 56 String display = ContactMethods.getDisplayLabel(getContext(), Contacts.KIND_EMAIL, in test() 60 CharSequence[] labels = getContext().getResources().getTextArray( in test() 62 display = ContactMethods.getDisplayLabel(getContext(), Contacts.KIND_EMAIL, in test() 66 display = ContactMethods.getDisplayLabel(getContext(), Contacts.KIND_EMAIL, in test() 70 display = ContactMethods.getDisplayLabel(getContext(), Contacts.KIND_EMAIL, in test() 74 String untitled = getContext().getString(R.string.untitled); in test() 75 display = ContactMethods.getDisplayLabel(getContext(), Contacts.KIND_IM, in test() 79 display = ContactMethods.getDisplayLabel(getContext(), Contacts.KIND_ORGANIZATION, in test() 83 display = ContactMethods.getDisplayLabel(getContext(), Contacts.KIND_PHONE, in test() 87 display = ContactMethods.getDisplayLabel(getContext(), Contacts.KIND_POSTAL, in test() [all …]
|
/cts/hostsidetests/appsecurity/test-apps/StorageApp/src/com/android/cts/storageapp/ |
D | StorageTest.java | 53 private Context getContext() { in getContext() method in StorageTest 54 return getInstrumentation().getContext(); in getContext() 58 useSpace(getContext()); in testAllocate() 63 final File dataDir = getContext().getDataDir(); in testFullDisk() 80 getContext().getPackageManager().setComponentEnabledSetting( in testTweakComponent() 81 new ComponentName(getContext().getPackageName(), UtilsReceiver.class.getName()), in testTweakComponent() 90 getSizeManual(getContext().getDataDir())); in testVerifySpaceManual() 92 getSizeManual(getContext().getExternalCacheDir().getParentFile())); in testVerifySpaceManual() 99 final StorageManager sm = getContext().getSystemService(StorageManager.class); in testVerifySpaceApi() 100 final StorageStatsManager stats = getContext().getSystemService(StorageStatsManager.class); in testVerifySpaceApi() [all …]
|
/cts/tests/filesystem/src/android/filesystem/cts/ |
D | AlmostFullTest.java | 58 long freeDisk = SystemUtil.getFreeDiskSize(getContext()); in setUp() 74 FileUtil.createNewFilledFile(getContext(), in setUp() 79 Log.i(TAG, "free disk " + SystemUtil.getFreeDiskSize(getContext())); in setUp() 84 Log.i(TAG, "tearDown free disk " + SystemUtil.getFreeDiskSize(getContext())); in tearDown() 88 FileUtil.removeFileOrDir(getContext(), DIR_INITIAL_FILL); in tearDown() 90 FileUtil.removeFileOrDir(getContext(), DIR_SEQ_UPDATE); in tearDown() 91 FileUtil.removeFileOrDir(getContext(), DIR_RANDOM_WR); in tearDown() 92 FileUtil.removeFileOrDir(getContext(), DIR_RANDOM_RD); in tearDown() 93 Log.i(TAG, "tearDown free disk " + SystemUtil.getFreeDiskSize(getContext())); in tearDown() 101 long freeDisk = SystemUtil.getFreeDiskSize(getContext()); in testSequentialUpdate() [all …]
|
/cts/tests/tests/os/src/android/os/cts/ |
D | BinderTest.java | 210 getContext().bindService(mService, conn1, 0); in testTransact() 211 getContext().startService(mService); in testTransact() 215 getContext().bindService(mService, conn2, 0); in testTransact() 218 getContext().unbindService(conn2); in testTransact() 223 getContext().stopService(mService); in testTransact() 224 getContext().unbindService(conn1); in testTransact() 225 getContext().unbindService(conn2); in testTransact() 234 getContext().stopService(mService); in testTransact() 237 getContext().unbindService(conn1); in testTransact() 246 getContext().bindService(mService, conn1, 0); in testTransact() [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/tests/tests/permission/src/android/permission/cts/ |
D | TelephonyManagerPermissionTest.java | 48 mHasTelephony = getContext().getPackageManager().hasSystemFeature( in setUp() 51 (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE); in setUp() 53 mAudioManager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE); in setUp() 209 getContext().sendBroadcast(intent); in testProtectedBroadcasts() 214 getContext().sendBroadcast(intent); in testProtectedBroadcasts() 219 getContext().sendBroadcast(intent); in testProtectedBroadcasts() 225 getContext().sendBroadcast(intent); in testProtectedBroadcasts() 231 getContext().sendBroadcast(intent); in testProtectedBroadcasts() 237 getContext().sendBroadcast(intent); in testProtectedBroadcasts() 242 getContext().sendBroadcast(intent); in testProtectedBroadcasts() [all …]
|
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/hostsidetests/shortcuts/deviceside/multiuser/src/android/content/pm/cts/shortcut/multiuser/ |
D | ShortcutManagerManagedUserTest.java | 34 Launcher.setAsDefaultLauncher(getInstrumentation(), getContext()); in test01_managedProfileNotStarted() 51 new ShortcutInfo.Builder(getContext(), "s1") in test02_createShortuctsOnPrimaryUser() 54 new ComponentName(getContext(), MainActivity.class))).build()))); in test02_createShortuctsOnPrimaryUser() 59 new ShortcutInfo.Builder(getContext(), "s1") in test03_createShortuctsOnManagedProfile() 62 new ComponentName(getContext(), MainActivity.class))).build()))); in test03_createShortuctsOnManagedProfile() 66 Launcher.setAsDefaultLauncher(getInstrumentation(), getContext()); in test04_getAndLaunch_primary() 73 .setPackage(getContext().getPackageName()) in test04_getAndLaunch_primary() 91 getLauncherApps().startShortcut(getContext().getPackageName(), "s1", null, null, in test04_getAndLaunch_primary() 95 getLauncherApps().startShortcut(getContext().getPackageName(), "s1", null, null, in test04_getAndLaunch_primary() 100 Launcher.setAsDefaultLauncher(getInstrumentation(), getContext()); in test05_getAndLaunch_managed() [all …]
|
/cts/tests/autofillservice/src/android/autofillservice/cts/ |
D | SessionLifecycleTest.java | 81 eventually(() -> assertThat(getStoppedMarker(getContext()).exists()).isTrue()); in killOfProcessLoginActivityProcess() 97 Intent outOfProcessAcvitityStartIntent = new Intent(getContext(), in testDatasetAuthResponseWhileAutofilledAppIsLifecycled() 99 getContext().startActivity(outOfProcessAcvitityStartIntent); in testDatasetAuthResponseWhileAutofilledAppIsLifecycled() 106 IntentSender authentication = PendingIntent.getActivity(getContext(), 0, in testDatasetAuthResponseWhileAutofilledAppIsLifecycled() 107 new Intent(getContext(), ManualAuthenticationActivity.class), in testDatasetAuthResponseWhileAutofilledAppIsLifecycled() 138 getStoppedMarker(getContext()).delete(); in testDatasetAuthResponseWhileAutofilledAppIsLifecycled() 208 Intent outOfProcessAcvitityStartIntent = new Intent(getContext(), in testAuthCanceledWhileAutofilledAppIsLifecycled() 210 getContext().startActivity(outOfProcessAcvitityStartIntent); in testAuthCanceledWhileAutofilledAppIsLifecycled() 213 IntentSender authentication = PendingIntent.getActivity(getContext(), 0, in testAuthCanceledWhileAutofilledAppIsLifecycled() 214 new Intent(getContext(), ManualAuthenticationActivity.class), in testAuthCanceledWhileAutofilledAppIsLifecycled() [all …]
|
/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() 65 KeyPairGeneratorSpec spec = new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_Encrypted_Success() 74 assertEquals("Context should be the one specified", getContext(), spec.getContext()); in testBuilder_Encrypted_Success() 97 new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_MissingAlias_Failure() 110 new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_MissingSubjectDN_Failure() 123 new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_MissingSerialNumber_Failure() 136 new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_MissingStartDate_Failure() 149 new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_MissingEndDate_Failure() 162 new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_EndBeforeStart_Failure()
|
/cts/hostsidetests/appsecurity/test-apps/UsePermissionApp23/src/com/android/cts/usepermission/ |
D | UsePermissionTest23.java | 45 PackageManager pm = getInstrumentation().getContext().getPackageManager(); in initialize() 68 assertDirReadWriteAccess(getInstrumentation().getContext().getExternalCacheDir()); in testDefault() 69 assertMediaNoAccess(getInstrumentation().getContext().getContentResolver(), false); in testDefault() 76 assertEquals(PackageManager.PERMISSION_GRANTED, getInstrumentation().getContext() in testGranted() 78 assertEquals(PackageManager.PERMISSION_GRANTED, getInstrumentation().getContext() in testGranted() 82 assertDirReadWriteAccess(getInstrumentation().getContext().getExternalCacheDir()); in testGranted() 83 assertMediaReadWriteAccess(getInstrumentation().getContext().getContentResolver()); in testGranted() 91 assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext() in testInteractiveGrant() 93 assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext() in testInteractiveGrant() 97 assertDirReadWriteAccess(getInstrumentation().getContext().getExternalCacheDir()); in testInteractiveGrant() [all …]
|
/cts/tests/tests/provider/src/android/provider/cts/ |
D | SettingsTest.java | 54 ContentResolver cr = getContext().getContentResolver(); in testSystemTable() 114 ContentResolver cr = getContext().getContentResolver(); in testSecureTable() 138 ContentResolver cr = getContext().getContentResolver(); in tryBadTableAccess() 209 final ResolveInfo ri = getContext().getPackageManager().resolveActivity( in testUserDictionarySettingsExists() 215 final int initialValue = Settings.System.getInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromSameProcess() 220 Settings.System.putInt(getInstrumentation().getContext().getContentResolver(), in testNoStaleValueModifiedFromSameProcess() 222 final int actualValue = Settings.System.getInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromSameProcess() 227 Settings.System.putInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromSameProcess() 233 final int initialValue = Settings.System.getInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromOtherProcess() 240 final int actualValue = Settings.System.getInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromOtherProcess() [all …]
|
/cts/hostsidetests/appsecurity/test-apps/EphemeralTestApp/EphemeralApp1/src/com/android/cts/ephemeralapp1/ |
D | ClientTest.java | 96 InstrumentationRegistry.getContext() in setUp() 102 InstrumentationRegistry.getContext().unregisterReceiver(mReceiver); in tearDown() 110 final List<ResolveInfo> resolveInfo = InstrumentationRegistry.getContext() in testQuery() 133 final List<ResolveInfo> resolveInfo = InstrumentationRegistry.getContext() in testQuery() 156 final List<ResolveInfo> resolveInfo = InstrumentationRegistry.getContext() in testQuery() 179 .getContext().getPackageManager().queryIntentServices(queryIntent, 0 /*flags*/); in testQuery() 200 .getContext().getPackageManager().queryIntentServices(queryIntent, 0 /*flags*/); in testQuery() 217 .getContext().getPackageManager().queryIntentServices(queryIntent, 0 /*flags*/); in testQuery() 232 .getContext().getPackageManager().queryIntentContentProviders( in testQuery() 255 .getContext().getPackageManager().queryIntentContentProviders( in testQuery() [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/hostsidetests/appsecurity/test-apps/SplitApp/src/com/android/cts/splitapp/ |
D | SplitAppTest.java | 80 final Resources r = getContext().getResources(); in testSingleBase() 81 final PackageManager pm = getContext().getPackageManager(); in testSingleBase() 136 final Resources r = getContext().getResources(); in testDensitySingle() 148 final Resources r = getContext().getResources(); in testDensityAll() 169 final Resources r = getContext().getResources(); in testDensityBest1() 177 final Resources r = getContext().getResources(); in testDensityBest2() 185 final Resources r = getContext().getResources(); in testApi() 186 final PackageManager pm = getContext().getPackageManager(); in testApi() 201 final Resources r = getContext().getResources(); in testLocale() 224 final Resources r = getContext().getResources(); in testFeatureBase() [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 | 27 getContext().getPackageManager().setComponentEnabledSetting(cn, in enableComponent() 35 enableComponent(new ComponentName(getContext(), MyService.class), true); in testEnableService1() 39 enableComponent(new ComponentName(getContext(), MyService.class), false); in testDisableService1() 43 enableComponent(new ComponentName(getContext(), MyService2.class), true); in testEnableService2() 47 enableComponent(new ComponentName(getContext(), MyService2.class), false); in testDisableService2()
|
/cts/tests/tests/location/src/android/location/cts/ |
D | GeocoderTest.java | 35 new Geocoder(getContext()); in testConstructor() 37 new Geocoder(getContext(), Locale.ENGLISH); in testConstructor() 40 new Geocoder(getContext(), null); in testConstructor() 48 Geocoder geocoder = new Geocoder(getContext()); in testIsPresent() 57 Context context = getContext(); in isServiceMissing() 67 Geocoder geocoder = new Geocoder(getContext()); in testGetFromLocation() 120 Geocoder geocoder = new Geocoder(getContext(), Locale.US); in testGetFromLocationName()
|