Home
last modified time | relevance | path

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

12345678910>>...44

/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.java28 mIntent.putExtra("component", new ComponentName(getContext(), TestedActivity.class)); in testColdActivity()
34 mIntent.putExtra("component", new ComponentName(getContext(), LocalActivity.class)); in testLocalActivity()
40 mIntent.putExtra("component", new ComponentName(getContext(), TestedScreen.class)); in testColdScreen()
46 mIntent.putExtra("component", new ComponentName(getContext(), LocalScreen.class)); in testLocalScreen()
65 mIntent.putExtra("component", new ComponentName(getContext(), ClearTop.class)); in testClearTopInCreate()
71 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 …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/tuner/
DDemoModeFragment.java61 Context context = getContext(); in onCreatePreferences()
77 ContentResolver contentResolver = getContext().getContentResolver(); in onCreatePreferences()
98 MetricsLogger.visibility(getContext(), MetricsEvent.TUNER_DEMO_MODE, true); in onResume()
104 MetricsLogger.visibility(getContext(), MetricsEvent.TUNER_DEMO_MODE, false); in onPause()
109 getContext().getContentResolver().unregisterContentObserver(mDemoModeObserver); in onDestroy()
114 boolean enabled = Settings.Global.getInt(getContext().getContentResolver(), in updateDemoModeEnabled()
121 boolean enabled = Settings.Global.getInt(getContext().getContentResolver(), in updateDemoModeOn()
135 MetricsLogger.action(getContext(), MetricsEvent.TUNER_DEMO_MODE_ENABLED, enabled); in onPreferenceChange()
138 MetricsLogger.action(getContext(), MetricsEvent.TUNER_DEMO_MODE_ON, enabled); in onPreferenceChange()
154 getContext().sendBroadcast(intent); in startDemoMode()
[all …]
DBatteryPreference.java50 mHasPercentage = Settings.System.getInt(getContext().getContentResolver(), in onAttached()
52 TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST); in onAttached()
57 TunerService.get(getContext()).removeTunable(this); in onDetached()
85 MetricsLogger.action(getContext(), MetricsEvent.TUNER_BATTERY_PERCENTAGE, v); in persistString()
86 Settings.System.putInt(getContext().getContentResolver(), SHOW_PERCENT_SETTING, v ? 1 : 0); in persistString()
92 TunerService.get(getContext()).setValue(StatusBarIconController.ICON_BLACKLIST, in persistString()
DStatusBarSwitch.java44 TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST); in onAttached()
49 TunerService.get(getContext()).removeTunable(this); in onDetached()
67 MetricsLogger.action(getContext(), MetricsEvent.TUNER_STATUS_BAR_DISABLE, in persistBoolean()
74 MetricsLogger.action(getContext(), MetricsEvent.TUNER_STATUS_BAR_ENABLE, getKey()); in persistBoolean()
82 ContentResolver contentResolver = getContext().getContentResolver(); in setList()
DTunerFragment.java69 if (Settings.Secure.getInt(getContext().getContentResolver(), SETTING_SEEN_TUNER_WARNING, in onCreatePreferences()
82 MetricsLogger.visibility(getContext(), MetricsEvent.TUNER, true); in onResume()
89 MetricsLogger.visibility(getContext(), MetricsEvent.TUNER, false); in onPause()
104 TunerService.showResetRequest(getContext(), new Runnable() { in onOptionsItemSelected()
118 return new AlertDialog.Builder(getContext()) in onCreateDialog()
124 Settings.Secure.putInt(getContext().getContentResolver(), in onCreateDialog()
/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()
/frameworks/base/services/tests/servicestests/src/com/android/server/notification/
DRankingHelperTest.java50 mHelper = new RankingHelper(getContext(), handler, mUsageStats, in setUp()
53 mNotiGroupGSortA = new Notification.Builder(getContext()) in setUp()
59 mRecordGroupGSortA = new NotificationRecord(getContext(), new StatusBarNotification( in setUp()
62 mNotiGroupGSortB = new Notification.Builder(getContext()) in setUp()
68 mRecordGroupGSortB = new NotificationRecord(getContext(), new StatusBarNotification( in setUp()
71 mNotiNoGroup = new Notification.Builder(getContext()) in setUp()
75 mRecordNoGroup = new NotificationRecord(getContext(), new StatusBarNotification( in setUp()
78 mNotiNoGroup2 = new Notification.Builder(getContext()) in setUp()
82 mRecordNoGroup2 = new NotificationRecord(getContext(), new StatusBarNotification( in setUp()
85 mNotiNoGroupSortA = new Notification.Builder(getContext()) in setUp()
[all …]
/frameworks/base/services/retaildemo/java/com/android/server/retaildemo/
DRetailDemoModeService.java211 ContentResolver cr = getContext().getContentResolver(); in register()
225 mDeviceInDemoMode = UserManager.isDeviceInDemoMode(getContext()); in onChange()
251 mParser.setString(Settings.Global.getString(getContext().getContentResolver(), in refreshTimeoutConstants()
266 UserInactivityCountdownDialog dialog = new UserInactivityCountdownDialog(getContext(), in showInactivityCountdownDialog()
292 return new Notification.Builder(getContext()) in createResetNotification()
293 .setContentTitle(getContext().getString(R.string.reset_retail_demo_mode_title)) in createResetNotification()
294 .setContentText(getContext().getString(R.string.reset_retail_demo_mode_text)) in createResetNotification()
300 .setColor(getContext().getColor(R.color.system_notification_accent_color)) in createResetNotification()
307 mResetDemoPendingIntent = PendingIntent.getBroadcast(getContext(), 0, intent, 0); in getResetDemoPendingIntent()
315 String demoLauncherComponent = getContext().getResources() in isDemoLauncherDisabled()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DOwnersTest.java37 getContext().addUsers(10, 11, 20, 21); in testUpgrade01()
41 final OwnersTestable owners = new OwnersTestable(getContext()); in testUpgrade01()
73 final OwnersTestable owners = new OwnersTestable(getContext()); in testUpgrade01()
90 getContext().addUsers(10, 11, 20, 21); in testUpgrade02()
94 final OwnersTestable owners = new OwnersTestable(getContext()); in testUpgrade02()
128 final OwnersTestable owners = new OwnersTestable(getContext()); in testUpgrade02()
148 getContext().addUsers(10, 11, 20, 21); in testUpgrade03()
152 final OwnersTestable owners = new OwnersTestable(getContext()); in testUpgrade03()
194 final OwnersTestable owners = new OwnersTestable(getContext()); in testUpgrade03()
226 getContext().addUsers(10, 11, 20, 21); in testUpgrade04()
[all …]
/frameworks/base/tests/NetworkSecurityConfigTest/src/android/security/net/config/
DXmlConfigTests.java47 XmlConfigSource source = new XmlConfigSource(getContext(), R.xml.empty_config); in testEmptyConfigFile()
66 XmlConfigSource source = new XmlConfigSource(getContext(), R.xml.empty_trust); in testEmptyAnchors()
84 XmlConfigSource source = new XmlConfigSource(getContext(), R.xml.domain1); in testBasicDomainConfig()
120 XmlConfigSource source = new XmlConfigSource(getContext(), R.xml.pins1); in testBasicPinning()
135 XmlConfigSource source = new XmlConfigSource(getContext(), R.xml.expired_pin); in testExpiredPin()
149 XmlConfigSource source = new XmlConfigSource(getContext(), R.xml.override_pins); in testOverridesPins()
163 XmlConfigSource source = new XmlConfigSource(getContext(), R.xml.bad_pin); in testBadPin()
178 XmlConfigSource source = new XmlConfigSource(getContext(), R.xml.multiple_domains); in testMultipleDomains()
199 XmlConfigSource source = new XmlConfigSource(getContext(), R.xml.multiple_configs); in testMultipleDomainConfigs()
214 XmlConfigSource source = new XmlConfigSource(getContext(), R.xml.subdomains); in testIncludeSubdomains()
[all …]
/frameworks/support/samples/SupportLeanbackShowcase/app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/cards/presenters/
DSideInfoCardPresenter.java42 final BaseCardView cardView = new BaseCardView(getContext(), null, in onCreateView()
45 cardView.addView(LayoutInflater.from(getContext()).inflate(R.layout.side_info_card, null)); in onCreateView()
53 int width = (int) getContext().getResources() in onBindViewHolder()
55 int height = (int) getContext().getResources() in onBindViewHolder()
57 int resourceId = getContext().getResources() in onBindViewHolder()
59 "drawable", getContext().getPackageName()); in onBindViewHolder()
60 Picasso.with(getContext()).load(resourceId).resize(width, height).centerCrop() in onBindViewHolder()
DImageCardViewPresenter.java44 ImageCardView imageCardView = new ImageCardView(getContext()); in onCreateView()
48 Toast.makeText(getContext(), "Clicked on ImageCardView", Toast.LENGTH_SHORT).show(); in onCreateView()
60 int resourceId = getContext().getResources() in onBindViewHolder()
62 "drawable", getContext().getPackageName()); in onBindViewHolder()
63 Picasso.with(getContext()).load(resourceId).into(cardView.getMainImageView()); in onBindViewHolder()
/frameworks/base/packages/EasterEgg/src/com/android/egg/neko/
DNekoDialog.java39 RecyclerView view = new RecyclerView(getContext()); in NekoDialog()
40 mAdapter = new Adapter(getContext()); in NekoDialog()
41 view.setLayoutManager(new GridLayoutManager(getContext(), 2)); in NekoDialog()
50 PrefState prefs = new PrefState(getContext()); in onFoodSelected()
53 NekoService.registerJob(getContext(), food.getInterval(getContext())); in onFoodSelected()
55 MetricsLogger.histogram(getContext(), "egg_neko_offered_food", food.getType()); in onFoodSelected()
76 return new Holder(LayoutInflater.from(parent.getContext()) in onCreateViewHolder()
/frameworks/support/v17/leanback/tests/java/android/support/v17/leanback/app/wizard/
DGuidedStepAttributesTest.java62 Intent intent = new Intent(mInstrumentation.getContext(), in testFocusDisabledOnActions()
64 Resources res = mInstrumentation.getContext().getResources(); in testFocusDisabledOnActions()
90 actionList.add(new GuidedAction.Builder(mInstrumentation.getContext()) in testFocusDisabledOnActions()
154 Intent intent = new Intent(mInstrumentation.getContext(), in testDisabledActions()
156 Resources res = mInstrumentation.getContext().getResources(); in testDisabledActions()
196 actionList.add(new GuidedAction.Builder(mInstrumentation.getContext()) in testDisabledActions()
204 actionList.add(new GuidedAction.Builder(mInstrumentation.getContext()) in testDisabledActions()
278 assertTrue(mInstrumentation.getContext().getResources().getString( in examineEnabledAndDisabledActions()
283 assertTrue(mInstrumentation.getContext().getResources().getString( in examineEnabledAndDisabledActions()
288 assertTrue(mInstrumentation.getContext().getResources().getString( in examineEnabledAndDisabledActions()
[all …]
/frameworks/support/v17/leanback/tests/java/android/support/v17/leanback/widget/
DShadowOverlayContainerTest.java29 FrameLayout frameLayout = new FrameLayout(getContext()); in testWrapContent()
30 TextView textView = new TextView(getContext()); in testWrapContent()
34 ShadowOverlayContainer container = new ShadowOverlayContainer(getContext()); in testWrapContent()
60 FrameLayout frameLayout = new FrameLayout(getContext());
61 TextView textView = new TextView(getContext());
64 ShadowOverlayContainer container = new ShadowOverlayContainer(getContext());
89 FrameLayout frameLayout = new FrameLayout(getContext());
90 TextView textView = new TextView(getContext());
94 ShadowOverlayContainer container = new ShadowOverlayContainer(getContext());
/frameworks/rs/cpp/
DAllocation.cpp144 const void *typeID = RS::dispatch->AllocationGetType(mRS->getContext(), getID()); in updateFromNative()
165 tryDispatch(mRS, RS::dispatch->AllocationSyncAll(mRS->getContext(), getIDSafe(), srcLocation)); in syncAll()
181 p = RS::dispatch->AllocationGetPointer(mRS->getContext(), getIDSafe(), 0, in getPointer()
232 … tryDispatch(mRS, RS::dispatch->Allocation1DData(mRS->getContext(), getIDSafe(), off, mSelectedLOD, in copy1DRangeFrom()
236 … tryDispatch(mRS, RS::dispatch->Allocation1DData(mRS->getContext(), getIDSafe(), off, mSelectedLOD, in copy1DRangeFrom()
254 … tryDispatch(mRS, RS::dispatch->Allocation1DRead(mRS->getContext(), getIDSafe(), off, mSelectedLOD, in copy1DRangeTo()
259 … tryDispatch(mRS, RS::dispatch->Allocation1DRead(mRS->getContext(), getIDSafe(), off, mSelectedLOD, in copy1DRangeTo()
267 tryDispatch(mRS, RS::dispatch->AllocationCopy2DRange(mRS->getContext(), getIDSafe(), off, 0, in copy1DRangeFrom()
299 tryDispatch(mRS, RS::dispatch->Allocation2DData(mRS->getContext(), getIDSafe(), xoff, in copy2DRangeFrom()
305 tryDispatch(mRS, RS::dispatch->Allocation2DData(mRS->getContext(), getIDSafe(), xoff, 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()
44 …tryDispatch(mRS, RS::dispatch->ScriptBindAllocation(mRS->getContext(), getID(), BaseObj::getObjID(… in bindAllocation()
49 …tryDispatch(mRS, RS::dispatch->ScriptSetVarObj(mRS->getContext(), getID(), index, (o == nullptr) ?… in setVar()
53 tryDispatch(mRS, RS::dispatch->ScriptSetVarV(mRS->getContext(), getID(), index, v, len)); in setVar()
DScriptIntrinsicBLAS.cpp210 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_sgemv, in SGEMV()
221 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dgemv, in DGEMV()
232 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cgemv, in CGEMV()
243 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zgemv, in ZGEMV()
259 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_sgbmv, in SGBMV()
275 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dgbmv, in DGBMV()
291 nScriptIntrinsicBLAS_Complex(mRS, mRS->getContext(), getID(), RsBlas_cgbmv, in CGBMV()
307 nScriptIntrinsicBLAS_Z(mRS, mRS->getContext(), getID(), RsBlas_zgbmv, in ZGBMV()
370 nScriptIntrinsicBLAS_Single(mRS, mRS->getContext(), getID(), RsBlas_strmv, in STRMV()
379 nScriptIntrinsicBLAS_Double(mRS, mRS->getContext(), getID(), RsBlas_dtrmv, in DTRMV()
[all …]
/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/base/services/tests/servicestests/src/com/android/server/pm/
DPackageManagerSettingsTests.java72 writeFile(new File(getContext().getFilesDir(), "system/packages.xml"), in writePackagesXml()
142 writeFile(new File(getContext().getFilesDir(), "system/packages-stopped.xml"), in writeStoppedPackagesXml()
152 writeFile(new File(getContext().getFilesDir(), "system/packages.list"), in writePackagesList()
160 File systemFolder = new File(getContext().getFilesDir(), "system"); in deleteSystemFolder()
191 UserManagerService ums = umsc.newInstance(getContext(), null, in createUserManagerServiceRef()
192 new Object(), new Object(), getContext().getFilesDir(), in createUserManagerServiceRef()
193 new File(getContext().getFilesDir(), "user")); in createUserManagerServiceRef()
258 Settings settings = new Settings(getContext().getFilesDir(), new Object()); in testReadKeySetSettings()
270 Settings settings = new Settings(getContext().getFilesDir(), new Object()); in testWriteKeySetSettings()
282 Settings settings = new Settings(getContext().getFilesDir(), new Object()); in testSettingsReadOld()
[all …]
/frameworks/base/tests/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/base/core/java/com/android/internal/widget/
DSwipeDismissLayout.java86 if (mUseDynamicTranslucency && getContext() instanceof Activity) {
87 ((Activity) getContext()).convertFromTranslucent();
150 if (getContext() instanceof Activity) { in onAttachedToWindow()
154 getContext().registerReceiver(mScreenOffReceiver, mScreenOffFilter); in onAttachedToWindow()
159 getContext().unregisterReceiver(mScreenOffReceiver); in onDetachedFromWindow()
160 if (getContext() instanceof Activity) { in onDetachedFromWindow()
254 if (mUseDynamicTranslucency && getContext() instanceof Activity) { in onTouchEvent()
255 ((Activity) getContext()).convertToTranslucent(null, null); in onTouchEvent()
278 if (mUseDynamicTranslucency && getContext() instanceof Activity) { in cancel()
279 ((Activity) getContext()).convertFromTranslucent(); in cancel()

12345678910>>...44