/cts/tests/tests/tv/src/android/media/tv/cts/ |
D | TvInputInfoTest.java | 38 if (!Utils.hasTvInputFramework(getContext())) { in setUp() 42 (TvInputManager) getContext().getSystemService(Context.TV_INPUT_SERVICE); in setUp() 50 mPackageManager = getContext().getPackageManager(); in setUp() 54 if (!Utils.hasTvInputFramework(getContext())) { in testTvInputInfoOp() 65 new ComponentName(getContext(), StubTunerTvInputService.class); in testTvInputInfoOp() 70 assertEquals(getContext().getPackageManager().getServiceInfo(componentName, 0).name, in testTvInputInfoOp() 93 assertEquals(mStubInfo.loadIcon(getContext()).getConstantState(), in testTvInputInfoOp() 94 infoFromParcel.loadIcon(getContext()).getConstantState()); in testTvInputInfoOp() 95 assertEquals(mStubInfo.loadLabel(getContext()), infoFromParcel.loadLabel(getContext())); in testTvInputInfoOp() 101 if (!Utils.hasTvInputFramework(getContext())) { in testGetIntentForSettingsActivity() [all …]
|
/cts/tests/tests/provider/src/android/provider/cts/ |
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 …]
|
D | Contacts_OrganizationsTest.java | 26 String display = Organizations.getDisplayLabel(getContext(), in testGetDisplayLabel() 30 CharSequence[] labels = getContext().getResources().getTextArray( in testGetDisplayLabel() 32 display = Organizations.getDisplayLabel(getContext(), in testGetDisplayLabel() 36 display = Organizations.getDisplayLabel(getContext(), in testGetDisplayLabel()
|
/cts/suite/cts/deviceTests/filesystemperf/src/com/android/cts/filesystemperf/ |
D | AlmostFullTest.java | 57 long freeDisk = SystemUtil.getFreeDiskSize(getContext()); in setUp() 73 FileUtil.createNewFilledFile(getContext(), in setUp() 78 Log.i(TAG, "free disk " + SystemUtil.getFreeDiskSize(getContext())); in setUp() 83 Log.i(TAG, "tearDown free disk " + SystemUtil.getFreeDiskSize(getContext())); in tearDown() 87 FileUtil.removeFileOrDir(getContext(), DIR_INITIAL_FILL); in tearDown() 89 FileUtil.removeFileOrDir(getContext(), DIR_SEQ_UPDATE); in tearDown() 90 FileUtil.removeFileOrDir(getContext(), DIR_RANDOM_WR); in tearDown() 91 FileUtil.removeFileOrDir(getContext(), DIR_RANDOM_RD); in tearDown() 92 Log.i(TAG, "tearDown free disk " + SystemUtil.getFreeDiskSize(getContext())); in tearDown() 101 long freeDisk = SystemUtil.getFreeDiskSize(getContext()); in testSequentialUpdate() [all …]
|
D | RandomRWTest.java | 28 FileUtil.removeFileOrDir(getContext(), DIR_RANDOM_WR); in tearDown() 29 FileUtil.removeFileOrDir(getContext(), DIR_RANDOM_RD); in tearDown() 36 final long fileSize = FileUtil.getFileSizeExceedingMemory(getContext(), READ_BUFFER_SIZE); in testRandomRead() 40 FileUtil.doRandomReadTest(getContext(), DIR_RANDOM_RD, getReportLog(), fileSize, in testRandomRead() 49 FileUtil.doRandomWriteTest(getContext(), DIR_RANDOM_WR, getReportLog(), fileSize, in testRandomUpdate()
|
D | SequentialRWTest.java | 40 FileUtil.removeFileOrDir(getContext(), DIR_SEQ_WR); in tearDown() 41 FileUtil.removeFileOrDir(getContext(), DIR_SEQ_UPDATE); in tearDown() 42 FileUtil.removeFileOrDir(getContext(), DIR_SEQ_RD); in tearDown() 48 final long fileSize = FileUtil.getFileSizeExceedingMemory(getContext(), BUFFER_SIZE); in testSingleSequentialWrite() 56 final File[] files = FileUtil.createNewFiles(getContext(), DIR_SEQ_WR, in testSingleSequentialWrite() 79 final long fileSize = FileUtil.getFileSizeExceedingMemory(getContext(), BUFFER_SIZE); in testSingleSequentialUpdate() 84 FileUtil.doSequentialUpdateTest(getContext(), DIR_SEQ_UPDATE, getReportLog(), fileSize, in testSingleSequentialUpdate() 90 final long fileSize = FileUtil.getFileSizeExceedingMemory(getContext(), BUFFER_SIZE); in testSingleSequentialRead() 95 final File file = FileUtil.createNewFilledFile(getContext(), in testSingleSequentialRead()
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | ViewSwitcherTest.java | 47 new ViewSwitcher(getContext()); in testConstructor() 49 new ViewSwitcher(getContext(), null); in testConstructor() 51 XmlPullParser parser = getContext().getResources().getXml(R.layout.viewswitcher_layout); in testConstructor() 53 new ViewSwitcher(getContext(), attrs); in testConstructor() 57 mViewSwitcher = new ViewSwitcher(getContext()); in testSetFactory() 65 mViewSwitcher = new ViewSwitcher(getContext()); in testReset() 67 ListView lv1 = new ListView(getContext()); in testReset() 68 ListView lv2 = new ListView(getContext()); in testReset() 80 mViewSwitcher = new ViewSwitcher(getContext()); in testGetNextView() 82 ListView lv1 = new ListView(getContext()); in testGetNextView() [all …]
|
D | ImageSwitcherTest.java | 46 new ImageSwitcher(getContext()); in testConstructor() 48 new ImageSwitcher(getContext(), null); in testConstructor() 50 XmlPullParser parser = getContext().getResources().getXml(R.layout.imageswitcher_test); in testConstructor() 53 new ImageSwitcher(getContext(), attrs); in testConstructor() 58 ImageSwitcher imageSwitcher = new ImageSwitcher(getContext()); in testSetImageResource() 59 ImageView iv = new ImageView(getContext()); in testSetImageResource() 61 ImageView iv1 = new ImageView(getContext()); in testSetImageResource() 67 Resources resources = getContext().getResources(); in testSetImageResource() 88 ImageSwitcher imageSwitcher = new ImageSwitcher(getContext()); in testSetImageURI() 89 ImageView iv = new ImageView(getContext()); in testSetImageURI() [all …]
|
D | ImageButtonTest.java | 31 XmlPullParser parser = getContext().getResources().getXml(R.layout.imagebutton_test); in testConstructor() 35 new ImageButton(getContext()); in testConstructor() 37 new ImageButton(getContext(), attrs); in testConstructor() 39 new ImageButton(getContext(), attrs, 0); in testConstructor()
|
/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 | 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()
|
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()
|
/cts/hostsidetests/appsecurity/test-apps/UsePermissionApp/src/com/android/cts/usepermission/ |
D | UsePermissionTest.java | 50 assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext() in testDefault() 52 assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext() in testDefault() 56 assertDirReadWriteAccess(getInstrumentation().getContext().getExternalCacheDir()); in testDefault() 57 assertMediaNoAccess(getInstrumentation().getContext().getContentResolver()); in testDefault() 63 assertEquals(PackageManager.PERMISSION_GRANTED, getInstrumentation().getContext() in testGranted() 65 assertEquals(PackageManager.PERMISSION_GRANTED, getInstrumentation().getContext() in testGranted() 69 assertDirReadWriteAccess(getInstrumentation().getContext().getExternalCacheDir()); in testGranted() 70 assertMediaReadWriteAccess(getInstrumentation().getContext().getContentResolver()); in testGranted() 77 assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext() in testInteractiveGrant() 79 assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext() in testInteractiveGrant() [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/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/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/tests/permission2/src/android/permission2/cts/ |
D | ContactsProviderTest.java | 36 getContext().getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, in testQueryContacts() 47 getContext().getContentResolver().insert(ContactsContract.Contacts.CONTENT_URI, in testInsertContacts() 62 getContext().getContentResolver().query(ContactsContract.Profile.CONTENT_URI, in testQueryProfile() 74 getContext().getContentResolver().insert(ContactsContract.Profile.CONTENT_URI, in testInsertProfile() 89 getContext().getContentResolver().update(ContactsContract.Profile.CONTENT_URI, in testUpdateProfile()
|
/cts/hostsidetests/appsecurity/test-apps/SplitApp/src/com/android/cts/splitapp/ |
D | SplitAppTest.java | 77 final Resources r = getContext().getResources(); in testSingleBase() 78 final PackageManager pm = getContext().getPackageManager(); in testSingleBase() 133 final Resources r = getContext().getResources(); in testDensitySingle() 145 final Resources r = getContext().getResources(); in testDensityAll() 166 final Resources r = getContext().getResources(); in testDensityBest1() 174 final Resources r = getContext().getResources(); in testDensityBest2() 182 final Resources r = getContext().getResources(); in testApi() 183 final PackageManager pm = getContext().getPackageManager(); in testApi() 198 final Resources r = getContext().getResources(); in testLocale() 221 final Resources r = getContext().getResources(); in testFeatureBase() [all …]
|
/cts/tests/tests/app/src/android/app/cts/ |
D | LaunchTest.java | 45 mIntent.putExtra("component", new ComponentName(getContext(), ClearTop.class)); in testClearTopWhilResumed() 51 mIntent.putExtra("component", new ComponentName(getContext(), ClearTop.class)); in testClearTopInCreate() 60 mIntent.putExtra("component", new ComponentName(getContext(), LocalScreen.class)); in testLocalScreen() 65 mIntent.putExtra("component", new ComponentName(getContext(), TestedScreen.class)); in testColdScreen() 70 mIntent.putExtra("component", new ComponentName(getContext(), LocalActivity.class)); in testLocalActivity() 75 mIntent.putExtra("component", new ComponentName(getContext(), TestedActivity.class)); in testColdActivity()
|
/cts/tests/tests/text/src/android/text/cts/ |
D | AutoTextTest.java | 34 Configuration config = getContext().getResources().getConfiguration(); in testGet() 37 getContext().getResources().updateConfiguration(config, null); in testGet() 40 View view = new View(getContext()); in testGet() 80 Configuration config = getContext().getResources().getConfiguration(); in testGetSize() 83 getContext().getResources().updateConfiguration(config, null); in testGetSize() 85 View view = new View(getContext()); in testGetSize()
|
/cts/tests/tests/net/src/android/net/wifi/cts/ |
D | ConcurrencyTest.java | 66 if (!WifiFeature.isWifiSupported(getContext()) && in setUp() 67 !WifiFeature.isP2pSupported(getContext())) { in setUp() 76 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp() 89 if (!WifiFeature.isWifiSupported(getContext()) && in tearDown() 90 !WifiFeature.isP2pSupported(getContext())) { in tearDown() 119 if (!WifiFeature.isWifiSupported(getContext())) { in testConcurrency() 120 assertTrue(!WifiFeature.isP2pSupported(getContext())); in testConcurrency() 124 if (!WifiFeature.isP2pSupported(getContext())) { in testConcurrency()
|
/cts/tests/tests/content/src/android/content/cts/ |
D | ContentProviderTest.java | 75 mockContentProvider.attachInfo(getContext(), info1); in testAttachInfo() 76 assertSame(getContext(), mockContentProvider.getContext()); in testAttachInfo() 84 assertSame(getContext(), mockContentProvider.getContext()); in testAttachInfo() 90 assertNull(mockContentProvider.getContext()); in testAttachInfo() 95 assertNull(mockContentProvider.getContext()); in testAttachInfo() 99 mockContentProvider.attachInfo(getContext(), info1); in testAttachInfo() 100 assertSame(getContext(), mockContentProvider.getContext()); in testAttachInfo() 127 assertNull(mockContentProvider.getContext()); in testGetContext() 129 mockContentProvider.attachInfo(getContext(), null); in testGetContext() 130 assertSame(getContext(), mockContentProvider.getContext()); in testGetContext() [all …]
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | CrossProfileUtils.java | 55 final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService( in testAddParentCanAccessManagedFilters() 64 final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService( in testAddManagedCanAccessParentFilters() 80 final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService( in testRemoveAllFilters() 87 getContext().getSystemService(Context.DEVICE_POLICY_SERVICE); in testDisallowCrossProfileCopyPaste() 94 getContext().getSystemService(Context.DEVICE_POLICY_SERVICE); in testAllowCrossProfileCopyPaste() 101 PackageManager pm = (PackageManager) getContext().getPackageManager(); in testDisableAllBrowsers() 103 getContext().getSystemService(Context.DEVICE_POLICY_SERVICE); in testDisableAllBrowsers()
|
/cts/tests/tests/view/src/android/view/cts/ |
D | ContextThemeWrapperTest.java | 48 new ContextThemeWrapper(getContext(), R.style.TextAppearance); in testConstructor() 50 new ContextThemeWrapper(getContext(), getContext().getTheme()); in testConstructor() 54 Context context = getContext(); in testAccessTheme() 68 Context context = getContext(); in testGetSystemService() 89 attachBaseContext(new ContextThemeWrapper(getContext(), in testAttachBaseContext() 109 Resources.Theme expected = getContext().getResources().newTheme(); in assertEqualsTextAppearanceStyle() 110 expected.setTo(getContext().getTheme()); in assertEqualsTextAppearanceStyle()
|