Home
last modified time | relevance | path

Searched refs:getContext (Results 1 – 25 of 432) sorted by relevance

12345678910>>...18

/frameworks/base/core/tests/coretests/src/android/app/activity/
DServiceTest.java201 getContext().startService(new Intent(service).putExtras(bundle)); in startExpectResult()
205 getContext().startService(new Intent(service).putExtras(bundle)); in startExpectResult()
211 getContext().stopService(service); in startExpectResult()
219 getContext().stopService(service); in startExpectResult()
225 getContext().startService(service); in startExpectNoPermission()
239 getContext().bindService(service, conn, 0); in bindExpectResult()
240 getContext().startService(service); in bindExpectResult()
244 getContext().bindService(service, conn2, 0); in bindExpectResult()
247 getContext().unbindService(conn2); in bindExpectResult()
252 getContext().stopService(service); in bindExpectResult()
[all …]
DSubActivityTest.java26 mIntent.putExtra("component", new ComponentName(getContext(), SubActivityScreen.class)); in testPendingResult()
32 mIntent.putExtra("component", new ComponentName(getContext(), SubActivityScreen.class)); in testNoResult()
38 mIntent.putExtra("component", new ComponentName(getContext(), SubActivityScreen.class)); in testResult()
45 new ComponentName(getContext(), RemoteSubActivityScreen.class)); in testFinishSub()
52 new ComponentName(getContext(), RemoteSubActivityScreen.class)); in testRemoteNoResult()
59 new ComponentName(getContext(), RemoteSubActivityScreen.class)); in testRemoteResult()
65 mIntent.putExtra("component", new ComponentName(getContext(), SubActivityScreen.class)); in testRemoteFinishSub()
72 new ComponentName(getContext(), RemoteSubActivityScreen.class)); in testRemoteRestartNoResult()
80 new ComponentName(getContext(), RemoteSubActivityScreen.class)); in testRemoteRestartResult()
87 mIntent.putExtra("component", new ComponentName(getContext(), SubActivityScreen.class)); in testRemoteRestartFinishSub()
DLaunchTest.java26 mIntent.putExtra("component", new ComponentName(getContext(), TestedActivity.class)); in testColdActivity()
32 mIntent.putExtra("component", new ComponentName(getContext(), LocalActivity.class)); in testLocalActivity()
38 mIntent.putExtra("component", new ComponentName(getContext(), TestedScreen.class)); in testColdScreen()
44 mIntent.putExtra("component", new ComponentName(getContext(), LocalScreen.class)); in testLocalScreen()
63 mIntent.putExtra("component", new ComponentName(getContext(), ClearTop.class)); in testClearTopInCreate()
69 mIntent.putExtra("component", new ComponentName(getContext(), ClearTop.class)); in testClearTopWhileResumed()
DBroadcastTest.java180 getContext().registerReceiver(mReceiver, filter, permission, null); in registerMyReceiver()
192 getContext().unregisterReceiver(mReceiver); in unregisterMyReceiverNoCheck()
279 getContext().sendOrderedBroadcast( in testResult()
314 Intent sticky = getContext().registerReceiver(null, filter); in testSetSticky()
330 Intent sticky = getContext().registerReceiver(null, filter); in testClearSticky()
344 Intent sticky = getContext().registerReceiver(null, filter); in testReplaceSticky()
376 getContext().sendBroadcast(makeBroadcastIntent(BROADCAST_REGISTERED)); in testRegisteredReceivePermissionGranted()
391 getContext().sendOrderedBroadcast( in testRegisteredReceivePermissionDenied()
401 getContext().sendBroadcast( in testRegisteredBroadcastPermissionGranted()
418 getContext().sendOrderedBroadcast( in testRegisteredBroadcastPermissionDenied()
[all …]
DIntentSenderTest.java33 PendingIntent is = PendingIntent.getBroadcast(getContext(), 0, in testRegisteredReceivePermissionGranted()
54 PendingIntent is = PendingIntent.getBroadcast(getContext(), 0, intent, 0); in testRegisteredReceivePermissionDenied()
62 PendingIntent is = PendingIntent.getBroadcast(getContext(), 0, in testLocalReceivePermissionGranted()
81 PendingIntent is = PendingIntent.getBroadcast(getContext(), 0, intent, 0); in testLocalReceivePermissionDenied()
/frameworks/base/keystore/tests/src/android/security/
DAndroidKeyPairGeneratorSpecTest.java42 AndroidKeyPairGeneratorSpec spec = new AndroidKeyPairGeneratorSpec(getContext(), in testConstructor_Success()
45 assertEquals("Context should be the one specified", getContext(), spec.getContext()); in testConstructor_Success()
67 new AndroidKeyPairGeneratorSpec(getContext(), null, TEST_DN_1, SERIAL_1, NOW, in testConstructor_NullKeystoreAlias_Failure()
76 new AndroidKeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, null, SERIAL_1, NOW, in testConstructor_NullSubjectDN_Failure()
85 new AndroidKeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, TEST_DN_1, null, NOW, in testConstructor_NullSerial_Failure()
94 new AndroidKeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, TEST_DN_1, SERIAL_1, null, in testConstructor_NullStartDate_Failure()
103 new AndroidKeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, TEST_DN_1, SERIAL_1, NOW, in testConstructor_NullEndDate_Failure()
112 new AndroidKeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, TEST_DN_1, SERIAL_1, in testConstructor_EndBeforeStart_Failure()
DAndroidKeyPairGeneratorTest.java77 mGenerator.initialize(new AndroidKeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, in testKeyPairGenerator_Initialize_Params_Success()
98 mGenerator.initialize(new AndroidKeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, in testKeyPairGenerator_Initialize_ParamsAndSecureRandom_Failure()
103 mGenerator.initialize(new AndroidKeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, in testKeyPairGenerator_GenerateKeyPair_Success()
115 mGenerator.initialize(new AndroidKeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, in testKeyPairGenerator_GenerateKeyPair_Replaced_Success()
125 mGenerator.initialize(new AndroidKeyPairGeneratorSpec(getContext(), TEST_ALIAS_2, in testKeyPairGenerator_GenerateKeyPair_Replaced_Success()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DPackageManagerSettingsTests.java63 writeFile(new File(getContext().getFilesDir(), "system/packages.xml"), in writePackagesXml()
103 writeFile(new File(getContext().getFilesDir(), "system/packages-stopped.xml"), in writeStoppedPackagesXml()
113 writeFile(new File(getContext().getFilesDir(), "system/packages.list"), in writePackagesList()
141 Settings settings = new Settings(getContext(), getContext().getFilesDir()); in testSettingsReadOld()
159 Settings settings = new Settings(getContext(), getContext().getFilesDir()); in testNewPackageRestrictionsFile()
163 settings = new Settings(getContext(), getContext().getFilesDir()); in testNewPackageRestrictionsFile()
174 Settings settings = new Settings(getContext(), getContext().getFilesDir()); in testEnableDisable()
/frameworks/base/policy/src/com/android/internal/policy/impl/keyguard_obsolete/
DKeyguardStatusViewManager.java173 mDateFormatString = getContext().getString(R.string.abbrev_wday_month_day_no_year); in KeyguardStatusViewManager()
249 return resId == 0 ? null : getContext().getText(resId); in getText()
307 setInstructionText(getContext().getString(R.string.faceunlock_multiple_failures)); in onResume()
343 final ContentResolver res = getContext().getContentResolver(); in updateOwnerInfo()
378 string = getContext().getString(mBatteryCharged ? R.string.lockscreen_charged in getAltTextMessage()
383 string = getContext().getString(R.string.lockscreen_low_battery); in getAltTextMessage()
402 string = getContext().getString(mBatteryCharged ? R.string.lockscreen_charged in getPriorityTextMessage()
407 string = getContext().getString(R.string.lockscreen_low_battery); in getPriorityTextMessage()
459 private Context getContext() { in getContext() method in KeyguardStatusViewManager
460 return mContainer.getContext(); in getContext()
[all …]
/frameworks/compile/slang/
Dslang_rs_metadata_spec_encoder.cpp269 if (!EncodeInteger(mModule->getContext(), in encodeRecordType()
279 if (!EncodeInteger(mModule->getContext(), in encodeRecordType()
285 RecordInfoMetadata->addOperand(llvm::MDNode::get(mModule->getContext(), in encodeRecordType()
320 if (!EncodeInteger(mModule->getContext(), VarName, VarInfo)) { in encodeRSVar()
323 if (!EncodeInteger(mModule->getContext(), Type, VarInfo)) { in encodeRSVar()
330 mVarInfoMetadata->addOperand(llvm::MDNode::get(mModule->getContext(), in encodeRSVar()
349 if (!EncodeInteger(mModule->getContext(), FuncName, FuncInfo)) { in encodeRSFunc()
356 mFuncInfoMetadata->addOperand(llvm::MDNode::get(mModule->getContext(), in encodeRSFunc()
421 llvm::MDString::get(mModule->getContext(), StrTabData); in flushStringTable()
423 llvm::MDString::get(mModule->getContext(), StrIdxData); in flushStringTable()
[all …]
/frameworks/base/core/java/android/test/
DAndroidTestCase.java54 public Context getContext() { in getContext() method in AndroidTestCase
96 getContext().startActivity(intent); in assertActivityRequiresPermission()
115 getContext().getContentResolver().query(uri, null, null, null, null); in assertReadingContentUriRequiresPermission()
134 getContext().getContentResolver().insert(uri, new ContentValues()); in assertWritingContentUriRequiresPermission()
/frameworks/base/core/tests/coretests/src/android/text/util/
DLinkifyTest.java33 tv = new TextView(getContext()); in testNothing()
44 tv = new TextView(getContext()); in testNormal()
56 tv = new TextView(getContext()); in testUnclickable()
/frameworks/base/core/tests/coretests/src/android/widget/listview/
DListHeterogeneous.java44 position, parent.getContext(), getValueAtPosition(position), desiredHeight); in createView()
47 position, parent.getContext(), getValueAtPosition(position), desiredHeight); in createView()
50 position, parent.getContext(), getValueAtPosition(position), desiredHeight); in createView()
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/data/
DTrackerProvider.java81 mOpenHelper = new DatabaseHelper(getContext()); in onCreate()
89 getContext().getContentResolver().notifyChange(uri, null); in delete()
104 getContext().getContentResolver().notifyChange(addedUri, null); in insert()
117 getContext().getContentResolver().notifyChange(uri, null); in query()
/frameworks/base/core/java/android/preference/
DDialogPreference.java107 setDialogTitle(getContext().getString(dialogTitleResId)); in setDialogTitle()
137 setDialogMessage(getContext().getString(dialogMessageResId)); in setDialogMessage()
164 mDialogIcon = getContext().getResources().getDrawable(dialogIconRes); in setDialogIcon()
190 setPositiveButtonText(getContext().getString(positiveButtonTextResId)); in setPositiveButtonText()
218 setNegativeButtonText(getContext().getString(negativeButtonTextResId)); in setNegativeButtonText()
277 Context context = getContext(); in showDialog()
342 LayoutInflater inflater = LayoutInflater.from(mBuilder.getContext()); in onCreateDialogView()
/frameworks/base/policy/src/com/android/internal/policy/impl/keyguard/
DKeyguardMessageArea.java104 mMessageArea.mMessage = mMessageArea.getContext().getResources().getText(resId); in setMessage()
111 mMessageArea.mMessage = mMessageArea.getContext().getString(resId, formatArgs); in setMessage()
160 mUpdateMonitor = KeyguardUpdateMonitor.getInstance(getContext()); in KeyguardMessageArea()
216 ContentResolver res = getContext().getContentResolver(); in getOwnerInfo()
230 string = getContext().getString(mBatteryCharged in getChargeInfo()
236 string = getContext().getString( in getChargeInfo()
DCarrierText.java136 getContext().getText(R.string.lockscreen_missing_sim_message_short), in getCarrierTextForSimState()
141 carrierText = getContext().getText( in getCarrierTextForSimState()
147 getContext().getText(R.string.lockscreen_missing_sim_message_short), in getCarrierTextForSimState()
153 getContext().getText(R.string.lockscreen_sim_locked_message), in getCarrierTextForSimState()
159 getContext().getText(R.string.lockscreen_sim_puk_locked_message), in getCarrierTextForSimState()
DObscureSpeechDelegate.java56 host.announceForAccessibility(host.getContext().getString( in sendAccessibilityEvent()
68 event.setContentDescription(host.getContext().getString( in onPopulateAccessibilityEvent()
78 final Context ctx = host.getContext(); in onInitializeAccessibilityNodeInfo()
DKeyguardActivityLauncher.java53 abstract Context getContext(); in getContext() method in KeyguardActivityLauncher
67 PackageManager packageManager = getContext().getPackageManager(); in getCameraWidgetInfo()
155 final Context context = getContext(); in launchActivity()
212 getContext().startActivityAsUser(intent, options, user); in startActivityForCurrentUser()
223 intent.resolveTypeIfNeeded(getContext().getContentResolver()), in startActivityForCurrentUser()
252 PackageManager packageManager = getContext().getPackageManager(); in wouldLaunchResolverActivity()
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/
DConnectivityManagerMobileTest.java58 getContext().getSystemService(Context.POWER_SERVICE); in setUp()
62 if (Settings.Global.getInt(getInstrumentation().getContext().getContentResolver(), in setUp()
65 cmActivity.setAirplaneMode(getInstrumentation().getContext(), false); in setUp()
87 if (Settings.Global.getInt(getInstrumentation().getContext().getContentResolver(), in tearDown()
90 cmActivity.setAirplaneMode(getInstrumentation().getContext(), false); in tearDown()
347 cmActivity.setAirplaneMode(getInstrumentation().getContext(), true); in testDataConnectionWith3GToAmTo3G()
373 cmActivity.setAirplaneMode(getInstrumentation().getContext(), false); in testDataConnectionWith3GToAmTo3G()
403 cmActivity.setAirplaneMode(getInstrumentation().getContext(), true); in testDataConnectionOverAMWithWifi()
440 cmActivity.setAirplaneMode(getInstrumentation().getContext(), false); in testDataConnectionOverAMWithWifi()
466 cmActivity.setAirplaneMode(getInstrumentation().getContext(), true); in testDataConnectionWithWifiToAMToWifi()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DIccSmsInterfaceManager.java41 mContext = phone.getContext(); in IccSmsInterfaceManager()
78 mPhone.getContext().enforceCallingPermission( in sendData()
115 mPhone.getContext().enforceCallingPermission( in sendText()
153 mPhone.getContext().enforceCallingPermission( in sendMultipartText()
/frameworks/base/core/tests/coretests/src/android/content/
DBrickDeniedTest.java29 getContext().sendBroadcast(new Intent("SHES_A_BRICK_HOUSE")); in testBrick()
30 getContext().sendBroadcast(new Intent("android.intent.action.BRICK")); in testBrick()
DMemoryFileProviderTest.java37 ContentResolver resolver = getContext().getContentResolver(); in testRead()
52 ContentResolver resolver = getContext().getContentResolver(); in testClose()
70 ContentResolver resolver = getContext().getContentResolver(); in testFile()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/tablet/
DSettingsView.java62 final Context context = getContext(); in onFinishInflate()
108 return (StatusBarManager)getContext().getSystemService(Context.STATUS_BAR_SERVICE); in getStatusBarManager()
114 getContext().startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS) in onClickNetwork()
122 getContext().startActivityAsUser(new Intent(Settings.ACTION_SETTINGS) in onClickSettings()
/frameworks/base/core/java/android/widget/
DTextClock.java338 return DateFormat.is24HourFormat(getContext()); in is24HourModeEnabled()
461 getContext().registerReceiver(mIntentReceiver, filter, null, getHandler()); in registerReceiver()
465 final ContentResolver resolver = getContext().getContentResolver(); in registerObserver()
470 getContext().unregisterReceiver(mIntentReceiver); in unregisterReceiver()
474 final ContentResolver resolver = getContext().getContentResolver(); in unregisterObserver()

12345678910>>...18