/cts/libs/deviceutil/src/android/cts/util/ |
CtsAndroidTestCase.java | 33 public Context getContext() { 34 return getInstrumentation().getContext();
|
/frameworks/base/core/tests/coretests/src/android/content/ |
BrickDeniedTest.java | 29 getContext().sendBroadcast(new Intent("SHES_A_BRICK_HOUSE")); 30 getContext().sendBroadcast(new Intent("android.intent.action.BRICK"));
|
/packages/apps/Dialer/InCallUI/tests/src/com/android/incallui/ |
ContactsPreferencesFactoryTest.java | 31 if (!UserManagerCompat.isUserUnlocked(getContext())) { 34 assertNotNull(ContactsPreferencesFactory.newContactsPreferences(getContext())); 38 if (UserManagerCompat.isUserUnlocked(getContext())) { 41 assertNull(ContactsPreferencesFactory.newContactsPreferences(getContext())); 48 assertSame(testInstance, ContactsPreferencesFactory.newContactsPreferences(getContext())); 49 assertSame(testInstance, ContactsPreferencesFactory.newContactsPreferences(getContext()));
|
/packages/apps/Messaging/tests/src/com/android/messaging/ |
BugleTestCase.java | 40 TestUtil.testSetup(super.getContext(), this); 50 public Context getContext() { 57 return super.getContext();
|
/packages/providers/TvProvider/tests/src/com/android/providers/tv/ |
TvProviderForTesting.java | 25 return getContext().getPackageName();
|
/packages/apps/TV/tests/unit/src/com/android/tv/util/ |
UtilsTest_GetDurationString.java | 80 assertEquals("3:00 AM", Utils.getDurationString(getContext(), DATE_THIS_YEAR_2_1_MS, 83 assertEquals("03:00", Utils.getDurationString(getContext(), DATE_THIS_YEAR_2_1_MS, 90 Utils.getDurationString(getContext(), DATE_THIS_YEAR_2_1_MS, DATE_THIS_YEAR_2_1_MS, 94 Utils.getDurationString(getContext(), DATE_THIS_YEAR_2_1_MS, DATE_THIS_YEAR_2_1_MS, 101 Utils.getDurationString(getContext(), DATE_THIS_YEAR_2_1_MS, 105 Utils.getDurationString(getContext(), DATE_THIS_YEAR_2_1_MS, 109 Utils.getDurationString(getContext(), DATE_THIS_YEAR_2_1_MS, 113 Utils.getDurationString(getContext(), DATE_THIS_YEAR_2_1_MS, 120 Utils.getDurationString(getContext(), DATE_THIS_YEAR_2_1_MS, 124 Utils.getDurationString(getContext(), DATE_THIS_YEAR_2_1_MS [all...] |
/frameworks/base/core/tests/coretests/src/android/app/activity/ |
ServiceTest.java | 201 getContext().startService(new Intent(service).putExtras(bundle)); 205 getContext().startService(new Intent(service).putExtras(bundle)); 211 getContext().stopService(service); 219 getContext().stopService(service); 225 getContext().startService(service); 239 getContext().bindService(service, conn, 0); 240 getContext().startService(service); 244 getContext().bindService(service, conn2, 0); 247 getContext().unbindService(conn2); 252 getContext().stopService(service) [all...] |
SubActivityTest.java | 26 mIntent.putExtra("component", new ComponentName(getContext(), SubActivityScreen.class)); 32 mIntent.putExtra("component", new ComponentName(getContext(), SubActivityScreen.class)); 38 mIntent.putExtra("component", new ComponentName(getContext(), SubActivityScreen.class)); 45 new ComponentName(getContext(), RemoteSubActivityScreen.class)); 52 new ComponentName(getContext(), RemoteSubActivityScreen.class)); 59 new ComponentName(getContext(), RemoteSubActivityScreen.class)); 65 mIntent.putExtra("component", new ComponentName(getContext(), SubActivityScreen.class)); 72 new ComponentName(getContext(), RemoteSubActivityScreen.class)); 80 new ComponentName(getContext(), RemoteSubActivityScreen.class)); 87 mIntent.putExtra("component", new ComponentName(getContext(), SubActivityScreen.class)) [all...] |
/cts/tests/tests/rscpp/src/android/cts/rscpp/ |
RSAllocationTest.java | 32 assertTrue(typedTest(this.getContext().getCacheDir().toString())); 37 assertTrue(test1DCopy(this.getContext().getCacheDir().toString())); 42 assertTrue(test2DCopy(this.getContext().getCacheDir().toString())); 47 assertTrue(test3DCopy(this.getContext().getCacheDir().toString())); 52 assertTrue(test1DCopyPadded(this.getContext().getCacheDir().toString())); 57 assertTrue(test2DCopyPadded(this.getContext().getCacheDir().toString())); 62 assertTrue(test3DCopyPadded(this.getContext().getCacheDir().toString())); 67 assertTrue(testSetElementAt(this.getContext().getCacheDir().toString()));
|
RSElementTest.java | 32 assertTrue(testCreatePixel(this.getContext().getCacheDir().toString())); 37 assertTrue(testCreateVector(this.getContext().getCacheDir().toString())); 42 assertTrue(testPrebuiltElements(this.getContext().getCacheDir().toString())); 47 assertTrue(testIsCompatible(this.getContext().getCacheDir().toString())); 52 assertTrue(testElementBuilder(this.getContext().getCacheDir().toString()));
|
RSObjectTest.java | 32 assertTrue(testClearObjectElement(this.getContext().getCacheDir().toString())); 37 assertTrue(testClearObjectType(this.getContext().getCacheDir().toString())); 42 assertTrue(testClearObjectAllocation(this.getContext().getCacheDir().toString())); 47 assertTrue(testClearObjectSampler(this.getContext().getCacheDir().toString())); 52 assertTrue(testClearObjectScript(this.getContext().getCacheDir().toString()));
|
RSForEachTest.java | 32 assertTrue(testForEach(this.getContext().getCacheDir().toString())); 37 assertTrue(testMultipleForEach(this.getContext().getCacheDir().toString())); 42 assertTrue(testNoRoot(this.getContext().getCacheDir().toString()));
|
RSScriptTest.java | 32 assertTrue(testSet(this.getContext().getCacheDir().toString())); 37 assertTrue(testInstance(this.getContext().getCacheDir().toString())); 42 assertTrue(testVector(this.getContext().getCacheDir().toString()));
|
RSTypeTest.java | 32 assertTrue(testCreate(this.getContext().getCacheDir().toString())); 37 assertTrue(testGet(this.getContext().getCacheDir().toString())); 42 assertTrue(testGetCount(this.getContext().getCacheDir().toString()));
|
/hardware/qcom/gps/msm8084/core/ |
LocAdapterProxyBase.h | 49 ContextBase* getContext() const { 50 return mLocAdapterBase->getContext();
|
/packages/apps/Settings/src/com/android/settings/dashboard/conditional/ |
BackgroundDataCondition.java | 33 setActive(NetworkPolicyManager.from(mManager.getContext()).getRestrictBackground()); 38 return Icon.createWithResource(mManager.getContext(), R.drawable.ic_data_saver); 43 return mManager.getContext().getString(R.string.condition_bg_data_title); 48 return mManager.getContext().getString(R.string.condition_bg_data_summary); 53 return new CharSequence[] { mManager.getContext().getString(R.string.condition_turn_off) }; 58 mManager.getContext().startActivity(new Intent(mManager.getContext(), 70 NetworkPolicyManager.from(mManager.getContext()).setRestrictBackground(false);
|
BatterySaverCondition.java | 32 PowerManager powerManager = mManager.getContext().getSystemService(PowerManager.class); 38 return Icon.createWithResource(mManager.getContext(), R.drawable.ic_settings_battery); 43 return mManager.getContext().getString(R.string.condition_battery_title); 48 return mManager.getContext().getString(R.string.condition_battery_summary); 53 return new CharSequence[] { mManager.getContext().getString(R.string.condition_turn_off) }; 58 Utils.startWithFragment(mManager.getContext(), BatterySaverSettings.class.getName(), null, 65 mManager.getContext().getSystemService(PowerManager.class).setPowerSaveMode(false);
|
CellularDataCondition.java | 32 ConnectivityManager connectivity = mManager.getContext().getSystemService( 34 TelephonyManager telephony = mManager.getContext().getSystemService(TelephonyManager.class); 50 return Icon.createWithResource(mManager.getContext(), R.drawable.ic_cellular_off); 55 return mManager.getContext().getString(R.string.condition_cellular_title); 60 return mManager.getContext().getString(R.string.condition_cellular_summary); 65 return new CharSequence[] { mManager.getContext().getString(R.string.condition_turn_on) }; 70 mManager.getContext().startActivity(new Intent(mManager.getContext(), 77 TelephonyManager telephony = mManager.getContext().getSystemService(
|
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/ |
HelpersTest.java | 36 IoUtils.deleteContents(getContext().getFilesDir()); 37 IoUtils.deleteContents(getContext().getCacheDir()); 43 final File expected = new File(getContext().getFilesDir(), "file.mp4"); 44 final String actual = Helpers.generateSaveFile(getContext(), 51 final File expected1 = new File(getContext().getFilesDir(), "file.txt"); 52 final String actual1 = Helpers.generateSaveFile(getContext(), "http://example.com/file.txt", 55 final File expected2 = new File(getContext().getFilesDir(), "file-1.txt"); 56 final String actual2 = Helpers.generateSaveFile(getContext(), "http://example.com/file.txt", 64 final File expected = new File(getContext().getFilesDir(), "file.mp4"); 65 final String actual = Helpers.generateSaveFile(getContext(), [all...] |
/cts/tests/filesystem/src/android/filesystem/cts/ |
RandomRWTest.java | 30 FileUtil.removeFileOrDir(getContext(), DIR_RANDOM_WR); 31 FileUtil.removeFileOrDir(getContext(), DIR_RANDOM_RD); 37 final long fileSize = FileUtil.getFileSizeExceedingMemory(getContext(), READ_BUFFER_SIZE); 43 FileUtil.doRandomReadTest(getContext(), DIR_RANDOM_RD, report, fileSize, 54 FileUtil.doRandomWriteTest(getContext(), DIR_RANDOM_WR, report, fileSize,
|
/cts/tests/tests/tv/src/android/media/tv/cts/ |
TvInputInfoTest.java | 56 if (!Utils.hasTvInputFramework(getContext())) { 60 (TvInputManager) getContext().getSystemService(Context.TV_INPUT_SERVICE); 68 mPackageManager = getContext().getPackageManager(); 72 if (!Utils.hasTvInputFramework(getContext())) { 83 new ComponentName(getContext(), StubTunerTvInputService.class); 88 assertEquals(getContext().getPackageManager().getServiceInfo(componentName, 0).name, 105 TvInputInfoTest.compareTvInputInfos(getContext(), mStubInfo, infoFromParcel)); 112 assertEquals(mStubInfo.loadIcon(getContext()).getConstantState(), 113 infoFromParcel.loadIcon(getContext()).getConstantState()); 114 assertEquals(mStubInfo.loadLabel(getContext()), infoFromParcel.loadLabel(getContext())) [all...] |
/cts/tests/tests/widget/src/android/widget/cts/ |
ViewSwitcherTest.java | 47 new ViewSwitcher(getContext()); 49 new ViewSwitcher(getContext(), null); 51 XmlPullParser parser = getContext().getResources().getXml(R.layout.viewswitcher_layout); 53 new ViewSwitcher(getContext(), attrs); 57 mViewSwitcher = new ViewSwitcher(getContext()); 65 mViewSwitcher = new ViewSwitcher(getContext()); 67 ListView lv1 = new ListView(getContext()); 68 ListView lv2 = new ListView(getContext()); 80 mViewSwitcher = new ViewSwitcher(getContext()); 82 ListView lv1 = new ListView(getContext()); [all...] |
/cts/tests/tests/permission/src/android/permission/cts/ |
ContactsProviderTest.java | 38 getContext().getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, 56 getContext().getContentResolver().insert(ContactsContract.Contacts.CONTENT_URI, 74 getContext().getContentResolver().query(ContactsContract.Profile.CONTENT_URI, 94 getContext().getContentResolver().insert(ContactsContract.Profile.CONTENT_URI, 112 getContext().getContentResolver().update(ContactsContract.Profile.CONTENT_URI, 130 getContext().getContentResolver().query( 149 getContext().getContentResolver().query(
|
/frameworks/base/keystore/tests/src/android/security/ |
KeyPairGeneratorSpecTest.java | 43 new KeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, "RSA", 1024, null, TEST_DN_1, 46 assertEquals("Context should be the one specified", getContext(), spec.getContext()); 62 KeyPairGeneratorSpec spec = new KeyPairGeneratorSpec.Builder(getContext()) 73 assertEquals("Context should be the one specified", getContext(), spec.getContext()); 101 new KeyPairGeneratorSpec(getContext(), null, "RSA", 1024, null, TEST_DN_1, SERIAL_1, NOW, 110 new KeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, "RSA", 1024, null, null, SERIAL_1, NOW, 119 new KeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, "RSA", 1024, null, TEST_DN_1, null, NOW, 128 new KeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, "RSA", 1024, null, TEST_DN_1, SERIAL_1 [all...] |
/packages/apps/Contacts/tests/src/com/android/contacts/interactions/ |
ContactInteractionUtilTest.java | 71 calendar.getTimeInMillis(), getContext())); 80 getContext())); 86 assertEquals(getContext().getResources().getString(R.string.yesterday), 88 getContext())); 98 assertEquals(getContext().getResources().getString(R.string.yesterday), 100 getContext(), calendar)); 105 assertEquals(getContext().getResources().getString(R.string.tomorrow), 107 getContext())); 115 assertEquals(getContext().getResources().getString(R.string.tomorrow), 117 getContext(), calendar)) [all...] |