Searched refs:getContext (Results 1 - 25 of 1091) sorted by relevance

1234567891011>>

/frameworks/base/core/tests/coretests/src/android/content/
H A DBrickDeniedTest.java29 getContext().sendBroadcast(new Intent("SHES_A_BRICK_HOUSE"));
30 getContext().sendBroadcast(new Intent("android.intent.action.BRICK"));
/frameworks/base/core/tests/coretests/src/android/app/activity/
H A DServiceTest.java201 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()
[all...]
H A DSubActivityTest.java26 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(), SubActivityScree
[all...]
H A DLaunchTest.java28 mIntent.putExtra("component", new ComponentName(getContext(), TestedActivity.class));
34 mIntent.putExtra("component", new ComponentName(getContext(), LocalActivity.class));
40 mIntent.putExtra("component", new ComponentName(getContext(), TestedScreen.class));
46 mIntent.putExtra("component", new ComponentName(getContext(), LocalScreen.class));
65 mIntent.putExtra("component", new ComponentName(getContext(), ClearTop.class));
71 mIntent.putExtra("component", new ComponentName(getContext(), ClearTop.class));
/frameworks/base/keystore/tests/src/android/security/
H A DKeyPairGeneratorSpecTest.java43 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_
[all...]
/frameworks/support/frameworks/support/samples/SupportLeanbackShowcase/app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/cards/presenters/
H A DSideInfoCardPresenter.java42 final BaseCardView cardView = new BaseCardView(getContext(), null,
45 cardView.addView(LayoutInflater.from(getContext()).inflate(R.layout.side_info_card, null));
53 int width = (int) getContext().getResources()
55 int height = (int) getContext().getResources()
57 int resourceId = getContext().getResources()
59 "drawable", getContext().getPackageName());
60 Picasso.with(getContext()).load(resourceId).resize(width, height).centerCrop()
H A DImageCardViewPresenter.java44 ImageCardView imageCardView = new ImageCardView(getContext());
48 Toast.makeText(getContext(), "Clicked on ImageCardView", Toast.LENGTH_SHORT).show();
60 int resourceId = getContext().getResources()
62 "drawable", getContext().getPackageName());
63 Picasso.with(getContext()).load(resourceId).into(cardView.getMainImageView());
/frameworks/support/samples/SupportLeanbackShowcase/app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/cards/presenters/
H A DSideInfoCardPresenter.java42 final BaseCardView cardView = new BaseCardView(getContext(), null,
45 cardView.addView(LayoutInflater.from(getContext()).inflate(R.layout.side_info_card, null));
53 int width = (int) getContext().getResources()
55 int height = (int) getContext().getResources()
57 int resourceId = getContext().getResources()
59 "drawable", getContext().getPackageName());
60 Picasso.with(getContext()).load(resourceId).resize(width, height).centerCrop()
H A DImageCardViewPresenter.java44 ImageCardView imageCardView = new ImageCardView(getContext());
48 Toast.makeText(getContext(), "Clicked on ImageCardView", Toast.LENGTH_SHORT).show();
60 int resourceId = getContext().getResources()
62 "drawable", getContext().getPackageName());
63 Picasso.with(getContext()).load(resourceId).into(cardView.getMainImageView());
/frameworks/rs/cpp/
H A DBaseObj.cpp47 if (mRS && mRS->getContext()) {
48 RS::dispatch->ObjDestroy(mRS->getContext(), mID);
56 RS::dispatch->GetName(mRS->getContext(), mID, &name);
H A DScript.cpp26 tryDispatch(mRS, RS::dispatch->ScriptInvokeV(mRS->getContext(), getID(), slot, v, len));
36 tryDispatch(mRS, RS::dispatch->ScriptForEach(mRS->getContext(), getID(), slot, in_id, out_id, usr, usrLen, nullptr, 0));
44 tryDispatch(mRS, RS::dispatch->ScriptBindAllocation(mRS->getContext(), getID(), BaseObj::getObjID(va), slot));
49 tryDispatch(mRS, RS::dispatch->ScriptSetVarObj(mRS->getContext(), getID(), index, (o == nullptr) ? 0 : o->getID()));
53 tryDispatch(mRS, RS::dispatch->ScriptSetVarV(mRS->getContext(), getID(), index, v, len));
/frameworks/base/packages/EasterEgg/src/com/android/egg/neko/
H A DNekoDialog.java39 RecyclerView view = new RecyclerView(getContext());
40 mAdapter = new Adapter(getContext());
41 view.setLayoutManager(new GridLayoutManager(getContext(), 2));
50 PrefState prefs = new PrefState(getContext());
53 NekoService.registerJob(getContext(), food.getInterval(getContext()));
55 MetricsLogger.histogram(getContext(), "egg_neko_offered_food", food.getType());
76 return new Holder(LayoutInflater.from(parent.getContext())
/frameworks/base/packages/SystemUI/src/com/android/systemui/tuner/
H A DDemoModeFragment.java61 Context context = getContext();
77 ContentResolver contentResolver = getContext().getContentResolver();
98 MetricsLogger.visibility(getContext(), MetricsEvent.TUNER_DEMO_MODE, true);
104 MetricsLogger.visibility(getContext(), MetricsEvent.TUNER_DEMO_MODE, false);
109 getContext().getContentResolver().unregisterContentObserver(mDemoModeObserver);
114 boolean enabled = Settings.Global.getInt(getContext().getContentResolver(),
121 boolean enabled = Settings.Global.getInt(getContext().getContentResolver(),
135 MetricsLogger.action(getContext(), MetricsEvent.TUNER_DEMO_MODE_ENABLED, enabled);
138 MetricsLogger.action(getContext(), MetricsEvent.TUNER_DEMO_MODE_ON, enabled);
154 getContext()
[all...]
H A DTunerSwitch.java29 TunerService.get(getContext()).addTunable(this, getKey().split(","));
34 TunerService.get(getContext()).removeTunable(this);
47 MetricsLogger.action(getContext(), mAction, isChecked());
54 Settings.Secure.putString(getContext().getContentResolver(), key, value ? "1" : "0");
H A DStatusBarSwitch.java44 TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
49 TunerService.get(getContext()).removeTunable(this);
67 MetricsLogger.action(getContext(), MetricsEvent.TUNER_STATUS_BAR_DISABLE,
74 MetricsLogger.action(getContext(), MetricsEvent.TUNER_STATUS_BAR_ENABLE, getKey());
82 ContentResolver contentResolver = getContext().getContentResolver();
H A DBatteryPreference.java50 mHasPercentage = Settings.System.getInt(getContext().getContentResolver(),
52 TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
57 TunerService.get(getContext()).removeTunable(this);
85 MetricsLogger.action(getContext(), MetricsEvent.TUNER_BATTERY_PERCENTAGE, v);
86 Settings.System.putInt(getContext().getContentResolver(), SHOW_PERCENT_SETTING, v ? 1 : 0);
92 TunerService.get(getContext()).setValue(StatusBarIconController.ICON_BLACKLIST,
/frameworks/base/services/tests/servicestests/src/com/android/server/
H A DEntropyMixerTest.java31 File dir = getContext().getDir("testInitialWrite", Context.MODE_PRIVATE);
37 new EntropyMixer(getContext(), "/dev/null", file.getCanonicalPath(), "/dev/null");
/frameworks/base/services/tests/servicestests/src/com/android/server/notification/
H A DRankingHelperTest.java50 mHelper = new RankingHelper(getContext(), handler, mUsageStats,
53 mNotiGroupGSortA = new Notification.Builder(getContext())
59 mRecordGroupGSortA = new NotificationRecord(getContext(), new StatusBarNotification(
62 mNotiGroupGSortB = new Notification.Builder(getContext())
68 mRecordGroupGSortB = new NotificationRecord(getContext(), new StatusBarNotification(
71 mNotiNoGroup = new Notification.Builder(getContext())
75 mRecordNoGroup = new NotificationRecord(getContext(), new StatusBarNotification(
78 mNotiNoGroup2 = new Notification.Builder(getContext())
82 mRecordNoGroup2 = new NotificationRecord(getContext(), new StatusBarNotification(
85 mNotiNoGroupSortA = new Notification.Builder(getContext())
[all...]
/frameworks/support/design/src/android/support/design/widget/
H A DBottomSheetDialogFragment.java32 return new BottomSheetDialog(getContext(), getTheme());
/frameworks/rs/cpu_ref/
H A DrsCpuIntrinsic.cpp35 mCtx->getContext()->setError(RS_ERROR_FATAL_DRIVER,
40 mCtx->getContext()->setError(RS_ERROR_FATAL_DRIVER,
46 mCtx->getContext()->setError(RS_ERROR_FATAL_DRIVER,
51 mCtx->getContext()->setError(RS_ERROR_FATAL_DRIVER,
58 mCtx->getContext()->setError(RS_ERROR_FATAL_DRIVER,
63 mCtx->getContext()->setError(RS_ERROR_FATAL_DRIVER,
68 mCtx->getContext()->setError(RS_ERROR_FATAL_DRIVER,
/frameworks/support/v17/leanback/tests/java/android/support/v17/leanback/widget/
H A DShadowOverlayContainerTest.java29 FrameLayout frameLayout = new FrameLayout(getContext());
30 TextView textView = new TextView(getContext());
34 ShadowOverlayContainer container = new ShadowOverlayContainer(getContext());
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/base/tests/utils/SleepUtils/SleepHelper/src/com/android/testing/sleephelper/
H A DSetAlarm.java111 ComponentName cn = getContext().startService(mServceIntent);
115 if (!getContext().bindService(mServceIntent, mConn, Context.BIND_AUTO_CREATE)) {
126 getContext().unbindService(mConn);
136 getContext().unbindService(mConn);
140 getContext().stopService(mServceIntent);
149 getContext().unbindService(mConn);
/frameworks/data-binding/integration-tests/TestApp/app/src/androidTest/java/android/databinding/
H A DDataBindingMapperTest.java22 View view = new View(getContext());
29 View view = new View(getContext());
/frameworks/opt/setupwizard/library/test/src/com/android/setupwizardlib/test/
H A DLinkSpanTest.java31 final TestContext context = new TestContext(getContext());
42 final Context context = getContext();
H A DStatusBarBackgroundLayoutTest.java30 final StatusBarBackgroundLayout layout = new StatusBarBackgroundLayout(getContext());
42 new TestStatusBarBackgroundLayout(getContext());

Completed in 1415 milliseconds

1234567891011>>