Home
last modified time | relevance | path

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

12345678910>>...21

/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/
DKeyPairGeneratorSpecTest.java43 new KeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, "RSA", 1024, null, TEST_DN_1, in testConstructor_Success()
46 assertEquals("Context should be the one specified", getContext(), spec.getContext()); in testConstructor_Success()
62 KeyPairGeneratorSpec spec = new KeyPairGeneratorSpec.Builder(getContext()) in testBuilder_Success()
73 assertEquals("Context should be the one specified", getContext(), spec.getContext()); in testBuilder_Success()
101 … new KeyPairGeneratorSpec(getContext(), null, "RSA", 1024, null, TEST_DN_1, SERIAL_1, NOW, in testConstructor_NullKeystoreAlias_Failure()
110 … new KeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, "RSA", 1024, null, null, SERIAL_1, NOW, in testConstructor_NullSubjectDN_Failure()
119 … new KeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, "RSA", 1024, null, TEST_DN_1, null, NOW, in testConstructor_NullSerial_Failure()
128 … new KeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, "RSA", 1024, null, TEST_DN_1, SERIAL_1, in testConstructor_NullStartDate_Failure()
137 … new KeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, "RSA", 1024, null, TEST_DN_1, SERIAL_1, in testConstructor_NullEndDate_Failure()
146 … new KeyPairGeneratorSpec(getContext(), TEST_ALIAS_1, "RSA", 1024, null, TEST_DN_1, SERIAL_1, in testConstructor_EndBeforeStart_Failure()
DAndroidKeyPairGeneratorTest.java90 mGenerator.initialize(new KeyPairGeneratorSpec.Builder(getContext()) in testKeyPairGenerator_Initialize_Params_Encrypted_Success()
126 new KeyPairGeneratorSpec.Builder(getContext()) in testKeyPairGenerator_Initialize_ParamsAndSecureRandom_Encrypted_Failure()
142 mGenerator.initialize(new KeyPairGeneratorSpec.Builder(getContext()) in testKeyPairGenerator_GenerateKeyPair_Encrypted_Success()
159 mGenerator.initialize(new KeyPairGeneratorSpec.Builder(getContext()) in testKeyPairGenerator_GenerateKeyPair_DSA_Unencrypted_Success()
177 mGenerator.initialize(new KeyPairGeneratorSpec.Builder(getContext()) in testKeyPairGenerator_GenerateKeyPair_DSA_2048_Unencrypted_Success()
301 mGenerator.initialize(new KeyPairGeneratorSpec.Builder(getContext()) in testKeyPairGenerator_GenerateKeyPair_DSA_SpecifiedParams_Unencrypted_Success()
320 mGenerator.initialize(new KeyPairGeneratorSpec.Builder(getContext()) in testKeyPairGenerator_GenerateKeyPair_EC_Unencrypted_Success()
337 mGenerator.initialize(new KeyPairGeneratorSpec.Builder(getContext()) in testKeyPairGenerator_GenerateKeyPair_EC_P521_Unencrypted_Success()
355 mGenerator.initialize(new KeyPairGeneratorSpec.Builder(getContext()) in testKeyPairGenerator_GenerateKeyPair_RSA_Unencrypted_Success()
373 mGenerator.initialize(new KeyPairGeneratorSpec.Builder(getContext()) in testKeyPairGenerator_GenerateKeyPair_RSA_WithParams_Unencrypted_Success()
[all …]
/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/rs/cpu_ref/
DrsCpuIntrinsic.cpp35 mCtx->getContext()->setError(RS_ERROR_FATAL_DRIVER, in invokeFunction()
40 mCtx->getContext()->setError(RS_ERROR_FATAL_DRIVER, in invokeRoot()
46 mCtx->getContext()->setError(RS_ERROR_FATAL_DRIVER, in invokeInit()
51 mCtx->getContext()->setError(RS_ERROR_FATAL_DRIVER, in setGlobalVar()
58 mCtx->getContext()->setError(RS_ERROR_FATAL_DRIVER, in setGlobalVarWithElemDims()
63 mCtx->getContext()->setError(RS_ERROR_FATAL_DRIVER, in setGlobalBind()
68 mCtx->getContext()->setError(RS_ERROR_FATAL_DRIVER, in setGlobalObj()
/frameworks/rs/cpp/
DAllocation.cpp127 const void *typeID = RS::dispatch->AllocationGetType(mRS->getContext(), getID()); in updateFromNative()
149 tryDispatch(mRS, RS::dispatch->AllocationSyncAll(mRS->getContext(), getIDSafe(), srcLocation)); in syncAll()
158 tryDispatch(mRS, RS::dispatch->AllocationIoSend(mRS->getContext(), getID())); in ioSendOutput()
168 tryDispatch(mRS, RS::dispatch->AllocationIoReceive(mRS->getContext(), getID())); in ioGetInput()
173 tryDispatch(mRS, RS::dispatch->AllocationGenerateMipmaps(mRS->getContext(), getID())); in generateMipmaps()
188 … tryDispatch(mRS, RS::dispatch->Allocation1DData(mRS->getContext(), getIDSafe(), off, mSelectedLOD, in copy1DRangeFrom()
203 … tryDispatch(mRS, RS::dispatch->Allocation1DRead(mRS->getContext(), getIDSafe(), off, mSelectedLOD, in copy1DRangeTo()
210 tryDispatch(mRS, RS::dispatch->AllocationCopy2DRange(mRS->getContext(), getIDSafe(), off, 0, in copy1DRangeFrom()
238 tryDispatch(mRS, RS::dispatch->Allocation2DData(mRS->getContext(), getIDSafe(), xoff, in copy2DRangeFrom()
247 tryDispatch(mRS, RS::dispatch->AllocationCopy2DRange(mRS->getContext(), getIDSafe(), xoff, yoff, in copy2DRangeFrom()
[all …]
DScript.cpp26 tryDispatch(mRS, RS::dispatch->ScriptInvokeV(mRS->getContext(), getID(), slot, v, len)); in invoke()
36 …tryDispatch(mRS, RS::dispatch->ScriptForEach(mRS->getContext(), getID(), slot, in_id, out_id, usr,… in forEach()
45 …tryDispatch(mRS, RS::dispatch->ScriptBindAllocation(mRS->getContext(), getID(), BaseObj::getObjID(… in bindAllocation()
50 …tryDispatch(mRS, RS::dispatch->ScriptSetVarObj(mRS->getContext(), getID(), index, (o == NULL) ? 0 … in setVar()
54 tryDispatch(mRS, RS::dispatch->ScriptSetVarV(mRS->getContext(), getID(), index, v, len)); in setVar()
DBaseObj.cpp47 if (mRS && mRS->getContext()) { in ~BaseObj()
48 RS::dispatch->ObjDestroy(mRS->getContext(), mID); in ~BaseObj()
56 RS::dispatch->GetName(mRS->getContext(), mID, &name); in updateFromNative()
/frameworks/testing/uiautomator/utils/SleepUtils/SleepHelper/src/com/android/testing/sleephelper/
DSetAlarm.java111 ComponentName cn = getContext().startService(mServceIntent); in connectToAlarmService()
115 if (!getContext().bindService(mServceIntent, mConn, Context.BIND_AUTO_CREATE)) { in connectToAlarmService()
126 getContext().unbindService(mConn); in callPrepare()
136 getContext().unbindService(mConn); in callDone()
140 getContext().stopService(mServceIntent); in callDone()
149 getContext().unbindService(mConn); in callSetAndWait()
/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/widget/
DTextClock.java223 LocaleData ld = LocaleData.get(getContext().getResources().getConfiguration().locale); in init()
359 return DateFormat.is24HourFormat(getContext()); in is24HourModeEnabled()
429 LocaleData ld = LocaleData.get(getContext().getResources().getConfiguration().locale); in chooseFormat()
494 getContext().registerReceiver(mIntentReceiver, filter, null, getHandler()); in registerReceiver()
498 final ContentResolver resolver = getContext().getContentResolver(); in registerObserver()
503 getContext().unregisterReceiver(mIntentReceiver); in unregisterReceiver()
507 final ContentResolver resolver = getContext().getContentResolver(); in unregisterObserver()
/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/java/android/test/
DAndroidTestCase.java56 public Context getContext() { in getContext() method in AndroidTestCase
98 getContext().startActivity(intent); in assertActivityRequiresPermission()
117 getContext().getContentResolver().query(uri, null, null, null, null); in assertReadingContentUriRequiresPermission()
136 getContext().getContentResolver().insert(uri, new ContentValues()); in assertWritingContentUriRequiresPermission()
/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/support/v7/appcompat/src/android/support/v7/internal/widget/
DActivityChooserView.java223 LayoutInflater inflater = LayoutInflater.from(getContext()); in ActivityChooserView()
293 CharSequence contentDescription = getContext().getString(resourceId); in setExpandActivityOverflowButtonContentDescription()
358 popupWindow.getListView().setContentDescription(getContext().getString( in showPopupUnchecked()
483 mListPopupWindow = new ListPopupWindow(getContext()); in getListPopupWindow()
509 PackageManager packageManager = getContext().getPackageManager(); in updateAppearance()
513 String contentDescription = getContext().getString( in updateAppearance()
556 getContext().startActivity(launchIntent); in onItemClick()
574 getContext().startActivity(launchIntent); in onClick()
701 convertView = LayoutInflater.from(getContext()).inflate( in getView()
705 titleView.setText(getContext().getString( in getView()
[all …]
/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/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()
/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/packages/Keyguard/src/com/android/keyguard/
DKeyguardActivityLauncher.java54 abstract Context getContext(); in getContext() method in KeyguardActivityLauncher
68 PackageManager packageManager = getContext().getPackageManager(); in getCameraWidgetInfo()
105 KeyguardUpdateMonitor.getInstance(getContext()).setAlternateUnlockEnabled(false); in launchCamera()
161 final Context context = getContext(); in launchActivity()
218 getContext().startActivityAsUser(intent, options, user); in startActivityForCurrentUser()
230 intent.resolveTypeIfNeeded(getContext().getContentResolver()), in startActivityForCurrentUser()
259 PackageManager packageManager = getContext().getPackageManager(); in wouldLaunchResolverActivity()
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()
/frameworks/base/core/java/com/android/internal/view/menu/
DMenuItemImpl.java118 String lang = menu.getContext().getResources().getConfiguration().locale.toString(); in MenuItemImpl()
122 sPrependShortcutLabel = menu.getContext().getResources().getString( in MenuItemImpl()
124 sEnterShortcutLabel = menu.getContext().getResources().getString( in MenuItemImpl()
126 sDeleteShortcutLabel = menu.getContext().getResources().getString( in MenuItemImpl()
128 sSpaceShortcutLabel = menu.getContext().getResources().getString( in MenuItemImpl()
163 mMenu.getContext().startActivity(mIntent); in invoke()
362 return setTitle(mMenu.getContext().getString(title)); in setTitle()
573 final Context context = mMenu.getContext(); in setActionView()

12345678910>>...21