/frameworks/base/core/tests/coretests/src/android/app/activity/ |
D | ServiceTest.java | 201 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 …]
|
D | SubActivityTest.java | 26 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()
|
D | LaunchTest.java | 28 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()
|
D | BroadcastTest.java | 180 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/ |
D | DemoModeFragment.java | 61 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 …]
|
D | TunerFragment.java | 72 if (!PluginPrefs.hasPlugins(getContext())) { in onCreatePreferences() 85 if (Settings.Secure.getInt(getContext().getContentResolver(), SETTING_SEEN_TUNER_WARNING, in onCreatePreferences() 94 return new AmbientDisplayConfiguration(getContext()).alwaysOnAvailable(); in alwaysOnAvailable() 102 MetricsLogger.visibility(getContext(), MetricsEvent.TUNER, true); in onResume() 109 MetricsLogger.visibility(getContext(), MetricsEvent.TUNER, false); in onPause() 124 TunerService.showResetRequest(getContext(), new Runnable() { in onOptionsItemSelected() 140 return new AlertDialog.Builder(getContext()) in onCreateDialog() 146 Settings.Secure.putInt(getContext().getContentResolver(), in onCreateDialog()
|
D | PluginFragment.java | 59 getContext().registerReceiver(mReceiver, filter); in onCreate() 61 getContext().registerReceiver(mReceiver, filter); in onCreate() 67 getContext().unregisterReceiver(mReceiver); in onDestroy() 76 PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(getContext()); in loadPrefs() 78 Context prefContext = getPreferenceManager().getContext(); in loadPrefs() 79 mPluginPrefs = new PluginPrefs(getContext()); in loadPrefs() 80 PackageManager pm = getContext().getPackageManager(); in loadPrefs() 181 getContext().sendBroadcast(intent); in persistBoolean() 193 ResolveInfo result = v.getContext().getPackageManager().resolveActivity( in onBindViewHolder() 197 v.getContext().startActivity(new Intent().setComponent( in onBindViewHolder() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/pm/ |
D | PackageHelperTests.java | 245 volume = PackageHelper.resolveInstallVolume(getContext(), "package.name", in testResolveInstallVolumeInternal_SystemApp() 251 volume = PackageHelper.resolveInstallVolume(getContext(), "package.name", in testResolveInstallVolumeInternal_SystemApp() 257 volume = PackageHelper.resolveInstallVolume(getContext(), "package.name", in testResolveInstallVolumeInternal_SystemApp() 263 volume = PackageHelper.resolveInstallVolume(getContext(), "package.name", in testResolveInstallVolumeInternal_SystemApp() 273 PackageHelper.resolveInstallVolume(getContext(), "package.name", in testResolveInstallVolumeInternal_SystemApp() 283 PackageHelper.resolveInstallVolume(getContext(), "package.name", in testResolveInstallVolumeInternal_SystemApp() 293 PackageHelper.resolveInstallVolume(getContext(), "package.name", in testResolveInstallVolumeInternal_SystemApp() 303 PackageHelper.resolveInstallVolume(getContext(), "package.name", in testResolveInstallVolumeInternal_SystemApp() 321 volume = PackageHelper.resolveInstallVolume(getContext(), "package.name", in testResolveInstallVolumeInternal_3rdParty_existing_not_too_big() 327 volume = PackageHelper.resolveInstallVolume(getContext(), "package.name", in testResolveInstallVolumeInternal_3rdParty_existing_not_too_big() [all …]
|
/frameworks/support/tv-provider/tests/src/android/support/media/tv/ |
D | ChannelLogoUtilsTest.java | 41 mContentResolver = getContext().getContentResolver(); in setUp() 56 assertNull(ChannelLogoUtils.loadChannelLogo(getContext(), mChannelId)); in testStoreChannelLogo_fromBitmap() 57 Bitmap logo = BitmapFactory.decodeResource(getContext().getResources(), in testStoreChannelLogo_fromBitmap() 60 assertTrue(ChannelLogoUtils.storeChannelLogo(getContext(), mChannelId, logo)); in testStoreChannelLogo_fromBitmap() 64 assertNotNull(ChannelLogoUtils.loadChannelLogo(getContext(), mChannelId)); in testStoreChannelLogo_fromBitmap() 68 assertNull(ChannelLogoUtils.loadChannelLogo(getContext(), mChannelId)); in testStoreChannelLogo_fromResUri() 70 Resources res = getContext().getResources(); in testStoreChannelLogo_fromResUri() 77 assertTrue(ChannelLogoUtils.storeChannelLogo(getContext(), mChannelId, logoUri)); in testStoreChannelLogo_fromResUri() 81 assertNotNull(ChannelLogoUtils.loadChannelLogo(getContext(), mChannelId)); in testStoreChannelLogo_fromResUri()
|
/frameworks/base/services/tests/notification/src/com/android/server/notification/ |
D | NotificationIntrusivenessExtractorTest.java | 42 final Notification.Builder builder = new Notification.Builder(getContext()) in testNonIntrusive() 49 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in testNonIntrusive() 57 final Notification.Builder builder = new Notification.Builder(getContext()) in testIntrusive_fillScreen() 60 getContext(), 0, new Intent(""), 0), true) in testIntrusive_fillScreen() 67 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in testIntrusive_fillScreen() 75 final Notification.Builder builder = new Notification.Builder(getContext()) in testOldNotificationsNotIntrusive() 78 getContext(), 0, new Intent(""), 0), true) in testOldNotificationsNotIntrusive() 86 NotificationRecord r = new NotificationRecord(getContext(), sbn, channel); in testOldNotificationsNotIntrusive()
|
D | GlobalSortKeyComparatorTest.java | 48 Notification n = new Notification.Builder(getContext(), TEST_CHANNEL_ID) in testComparator() 50 NotificationRecord left = new NotificationRecord(getContext(), in testComparator() 57 NotificationRecord right = new NotificationRecord(getContext(), in testComparator() 64 NotificationRecord last = new NotificationRecord(getContext(), in testComparator() 87 Notification n = new Notification.Builder(getContext(), TEST_CHANNEL_ID) in testNoCrash_leftNull() 89 NotificationRecord left = new NotificationRecord(getContext(), in testNoCrash_leftNull() 95 NotificationRecord right = new NotificationRecord(getContext(), in testNoCrash_leftNull() 117 Notification n = new Notification.Builder(getContext(), TEST_CHANNEL_ID) in testNoCrash_rightNull() 119 NotificationRecord left = new NotificationRecord(getContext(), in testNoCrash_rightNull() 126 NotificationRecord right = new NotificationRecord(getContext(), in testNoCrash_rightNull()
|
/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/ |
D | BaseSettingsProviderTest.java | 61 ContentResolver contentResolver = getContext().getContentResolver(); in setStringViaFrontEndApiSetting() 83 ContentResolver contentResolver = getContext().getContentResolver(); in getStringViaFrontEndApiSetting() 114 return getContext().getContentResolver().insert(uri, values); in insertStringViaProviderApi() 119 return getContext().getContentResolver().delete(uri, "name=?", new String[]{name}); in deleteStringViaProviderApi() 127 return getContext().getContentResolver().update(uri, values, "name=?", in updateStringViaProviderApiSetting() 151 Cursor cursor = getContext().getContentResolver().query(uri, NAME_VALUE_COLUMNS, in queryStringViaProviderApi() 236 return Settings.Global.getString(getContext().getContentResolver(), name); in getSetting() 240 return Settings.Secure.getString(getContext().getContentResolver(), name); in getSetting() 244 return Settings.System.getString(getContext().getContentResolver(), name); in getSetting() 256 Settings.Global.putString(getContext().getContentResolver(), name, value); in putSetting() [all …]
|
/frameworks/base/tests/NetworkSecurityConfigTest/src/android/security/net/config/ |
D | XmlConfigTests.java | 47 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/ |
D | SideInfoCardPresenter.java | 42 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()
|
D | ImageCardViewPresenter.java | 44 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/ |
D | NekoDialog.java | 39 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/rs/cpu_ref/ |
D | rsCpuIntrinsic.cpp | 35 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/ |
D | Allocation.cpp | 144 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 …]
|
D | Script.cpp | 25 tryDispatch(mRS, RS::dispatch->ScriptInvokeV(mRS->getContext(), getID(), slot, v, len)); in invoke() 35 …tryDispatch(mRS, RS::dispatch->ScriptForEach(mRS->getContext(), getID(), slot, in_id, out_id, usr,… in forEach() 43 …tryDispatch(mRS, RS::dispatch->ScriptBindAllocation(mRS->getContext(), getID(), BaseObj::getObjID(… in bindAllocation() 48 …tryDispatch(mRS, RS::dispatch->ScriptSetVarObj(mRS->getContext(), getID(), index, (o == nullptr) ?… in setVar() 52 tryDispatch(mRS, RS::dispatch->ScriptSetVarV(mRS->getContext(), getID(), index, v, len)); in setVar()
|
/frameworks/support/v17/leanback/tests/java/android/support/v17/leanback/widget/ |
D | BaseCardViewTest.java | 84 BaseCardView cardView = new BaseCardView(InstrumentationRegistry.getContext()); in infoOver_InfoVisibleAlways() 85 View main = new View(cardView.getContext()); in infoOver_InfoVisibleAlways() 88 View info = new View(cardView.getContext()); in infoOver_InfoVisibleAlways() 131 BaseCardView cardView = new BaseCardView(InstrumentationRegistry.getContext()); in infoUnder_InfoVisibleAlways() 132 View main = new View(cardView.getContext()); in infoUnder_InfoVisibleAlways() 135 View info = new View(cardView.getContext()); in infoUnder_InfoVisibleAlways() 178 BaseCardView cardView = new BaseCardView(InstrumentationRegistry.getContext()); in infoUnder_InfoVisibleActivated() 179 View main = new View(cardView.getContext()); in infoUnder_InfoVisibleActivated() 182 View info = new View(cardView.getContext()); in infoUnder_InfoVisibleActivated() 223 final BaseCardView cardView = new BaseCardView(InstrumentationRegistry.getContext()); in infoUnder_InfoVisibleSelected() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | MccTableTest.java | 76 MccTable.getLocaleFromMcc(getContext(), 302, null)); in testLocale() 78 MccTable.getLocaleFromMcc(getContext(), 234, null)); in testLocale() 80 MccTable.getLocaleFromMcc(getContext(), 0, "en")); in testLocale() 82 MccTable.getLocaleFromMcc(getContext(), 454, null)); in testLocale() 84 MccTable.getLocaleFromMcc(getContext(), 454, "en")); in testLocale() 86 MccTable.getLocaleFromMcc(getContext(), 466, null)); in testLocale()
|
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ |
D | RecyclerViewCacheTest.java | 91 mRecyclerView = new TimeMockingRecyclerView(getContext()); in setup() 107 private Context getContext() { in getContext() method in RecyclerViewCacheTest 108 return InstrumentationRegistry.getContext(); in getContext() 147 return new RecyclerView.ViewHolder(new View(getContext())) {}; in prefetchReusesCacheItems() 176 mRecyclerView.setLayoutManager(new GridLayoutManager(getContext(), 3)); in prefetchItemsNotEvictedWithInserts() 184 View view = new View(getContext()); in prefetchItemsNotEvictedWithInserts() 227 mRecyclerView.setLayoutManager(new GridLayoutManager(getContext(), 3)); in prefetchItemsNotEvictedOnScroll() 236 View view = new View(getContext()); in prefetchItemsNotEvictedOnScroll() 270 mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext())); in prefetchIsComputingLayout() 279 View view = new View(getContext()); in prefetchIsComputingLayout() [all …]
|
D | RecyclerViewBasicTest.java | 65 mRecyclerView = new RecyclerView(getContext()); in setUp() 68 private Context getContext() { in getContext() method in RecyclerViewBasicTest 69 return InstrumentationRegistry.getContext(); in getContext() 227 MockViewHolder mvh = new MockViewHolder(new TextView(getContext())); in recyclerOffsetsOnMove() 250 MockViewHolder mvh = new MockViewHolder(new TextView(getContext())); in recyclerOffsetsOnAdd() 277 RecyclerView restored = new RecyclerView(getContext()); in savedStateWithStatelessLayoutManager() 308 RecyclerView restored = new RecyclerView(getContext()); in savedState() 340 final LoggingView itemView = new LoggingView(parent.getContext()); in dontSaveChildrenState() 422 RecyclerView recyclerView = new RecyclerView(getContext()); in findNestedRecyclerView() 425 ViewGroup parent = new FrameLayout(getContext()); in findNestedRecyclerView() [all …]
|
D | RecyclerViewOnGenericMotionEventTest.java | 47 mRecyclerView = new TestRecyclerView(getContext()); in setUp() 50 private Context getContext() { in getContext() method in RecyclerViewOnGenericMotionEventTest 51 return InstrumentationRegistry.getContext(); in getContext() 136 ViewConfiguration.get(getContext()), getContext()); in getScaledVerticalScrollFactor() 141 ViewConfiguration.get(getContext()), getContext()); in getScaledHorizontalScrollFactor() 194 return new MockViewHolder(new TextView(parent.getContext())); in onCreateViewHolder()
|
/frameworks/base/tests/utils/SleepUtils/SleepHelper/src/com/android/testing/sleephelper/ |
D | SetAlarm.java | 111 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()
|