Home
last modified time | relevance | path

Searched refs:mContext (Results 1 – 25 of 3116) sorted by relevance

12345678910>>...125

/frameworks/base/core/tests/coretests/src/android/text/format/
DFormatterTest.java48 private Context mContext; field in FormatterTest
52 mContext = InstrumentationRegistry.getContext(); in setup()
53 mOriginalLocale = mContext.getResources() in setup()
102 BytesResult r = Formatter.formatBytes(mContext.getResources(), 1, 0); in testFormatBytes()
140 assertEquals("3 days", Formatter.formatShortElapsedTime(mContext, 2 * DAY + 12 * HOUR)); in testFormatShortElapsedTime()
141 assertEquals("2 days", Formatter.formatShortElapsedTime(mContext, 2 * DAY + 11 * HOUR)); in testFormatShortElapsedTime()
142 assertEquals("2 days", Formatter.formatShortElapsedTime(mContext, 2 * DAY)); in testFormatShortElapsedTime()
144 Formatter.formatShortElapsedTime(mContext, 1 * DAY + 23 * HOUR + 59 * MINUTE)); in testFormatShortElapsedTime()
146 Formatter.formatShortElapsedTime(mContext, 1 * DAY + 59 * MINUTE)); in testFormatShortElapsedTime()
147 assertEquals("1 day", Formatter.formatShortElapsedTime(mContext, 1 * DAY)); in testFormatShortElapsedTime()
[all …]
/frameworks/base/core/java/android/content/
DClipboardManager.java91 private final Context mContext; field in ClipboardManager
132 mContext = context; in ClipboardManager()
150 return mService.areClipboardAccessNotificationsEnabledForUser(mContext.getUserId()); in areClipboardAccessNotificationsEnabled()
167 mService.setClipboardAccessNotificationsEnabledForUser(enable, mContext.getUserId()); in setClipboardAccessNotificationsEnabled()
187 mContext.getOpPackageName(), in setPrimaryClip()
188 mContext.getAttributionTag(), in setPrimaryClip()
189 mContext.getUserId(), in setPrimaryClip()
190 mContext.getDeviceId()); in setPrimaryClip()
216 mContext.getOpPackageName(), in setPrimaryClipAsPackage()
217 mContext.getAttributionTag(), in setPrimaryClipAsPackage()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/
DPermissionCheckerTest.java39 private final Context mContext = InstrumentationRegistry.getContext();; field in PermissionCheckerTest
40 private final AppOpsManager mAppOpsManager = mContext.getSystemService(AppOpsManager.class);
55 Binder.getCallingUid(), mContext.getPackageName(), AppOpsManager.MODE_DEFAULT); in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionGranted_returnsGranted()
58 mContext, INTERACT_ACROSS_PROFILES_PERMISSION, Binder.getCallingPid(), in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionGranted_returnsGranted()
59 Binder.getCallingUid(), mContext.getPackageName())) in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionGranted_returnsGranted()
67 Binder.getCallingUid(), mContext.getPackageName(), AppOpsManager.MODE_DEFAULT); in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionNotGranted_returnsHardDenied()
70 mContext, INTERACT_ACROSS_PROFILES_PERMISSION, Binder.getCallingPid(), in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionNotGranted_returnsHardDenied()
71 Binder.getCallingUid(), mContext.getPackageName())) in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionNotGranted_returnsHardDenied()
79 Binder.getCallingUid(), mContext.getPackageName(), AppOpsManager.MODE_ALLOWED); in testCheckPermissionForPreflight_appOpPermission_modeAllowed_returnsGranted()
82 mContext, INTERACT_ACROSS_PROFILES_PERMISSION, Binder.getCallingPid(), in testCheckPermissionForPreflight_appOpPermission_modeAllowed_returnsGranted()
[all …]
/frameworks/base/tests/testables/tests/src/android/testing/
DTestablePermissionsTest.java40 public TestableContext mContext = new TestableContext(InstrumentationRegistry.getContext()); field in TestablePermissionsTest
44 mContext.getTestablePermissions().setPermission(permission.INTERACT_ACROSS_USERS, in testCheck()
46 mContext.getTestablePermissions().setPermission(permission.INTERACT_ACROSS_USERS_FULL, in testCheck()
49 mContext.checkPermission(permission.INTERACT_ACROSS_USERS, 0, 0)); in testCheck()
51 mContext.checkPermission(permission.INTERACT_ACROSS_USERS_FULL, 0, 0)); in testCheck()
56 mContext.getTestablePermissions().setPermission(URI_1, PERMISSION_GRANTED); in testCheckUri()
57 mContext.getTestablePermissions().setPermission(URI_2, PERMISSION_DENIED); in testCheckUri()
59 assertEquals(PERMISSION_GRANTED, mContext.checkUriPermission(URI_1, 0, 0, 0)); in testCheckUri()
60 assertEquals(PERMISSION_DENIED, mContext.checkUriPermission(URI_2, 0, 0, 0)); in testCheckUri()
65 mContext.getTestablePermissions().setPermission(permission.INTERACT_ACROSS_USERS, in testEnforceNoException()
[all …]
DTestableResourcesTest.java39 public TestableContext mContext = new TestableContext(InstrumentationRegistry.getContext()); field in TestableResourcesTest
43 Resources before = mContext.getResources(); in testLazyInit()
44 mContext.ensureTestableResources(); in testLazyInit()
45 Resources after = mContext.getResources(); in testLazyInit()
54 mContext.getColor(nonExistentId); in testAddingResource()
58 mContext.getOrCreateTestableResources().addOverride(nonExistentId, 0xffffff); in testAddingResource()
60 assertEquals(0xffffff, mContext.getColor(nonExistentId)); in testAddingResource()
67 mContext.getOrCreateTestableResources().addOverride(nonExistentId, 0xffffff); in testClearingResource()
68 assertEquals(0xffffff, mContext.getColor(nonExistentId)); in testClearingResource()
69 mContext.getOrCreateTestableResources().removeOverride(nonExistentId); in testClearingResource()
[all …]
/frameworks/base/core/tests/coretests/src/android/view/
DCreateViewTest.java42 new CreateViewTest.ViewOne(mContext); in testLayout1()
47 LinearLayout vert = new LinearLayout(mContext); in testLayout2()
48 vert.addView(new CreateViewTest.ViewOne(mContext), in testLayout2()
54 LinearLayout vert = new LinearLayout(mContext); in testLayout3()
56 ViewOne one = new ViewOne(mContext); in testLayout3()
59 ViewOne two = new ViewOne(mContext); in testLayout3()
62 ViewOne three = new ViewOne(mContext); in testLayout3()
65 ViewOne four = new ViewOne(mContext); in testLayout3()
68 ViewOne five = new ViewOne(mContext); in testLayout3()
71 ViewOne six = new ViewOne(mContext); in testLayout3()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/widget/
DLocalImageResolverTest.java45 private final Context mContext = InstrumentationRegistry.getInstrumentation().getContext(); field in LocalImageResolverTest
51 Icon icon = Icon.createWithResource(mContext, 0x85849454); in resolveImage_invalidResource_returnsNull()
52 Drawable d = LocalImageResolver.resolveImage(icon, mContext); in resolveImage_invalidResource_returnsNull()
61 Drawable d = LocalImageResolver.resolveImage(icon, mContext); in resolveImage_invalidIconUri_returnsNull()
67 Drawable d = LocalImageResolver.resolveImage(Uri.parse("bogus://uri"), mContext); in resolveImage_invalidUri_throwsException()
73 Icon icon = Icon.createWithResource(mContext, R.drawable.blue); in resolveImage_nonBitmapResourceIcon_fallsBackToNonResizingLoad()
74 Drawable d = LocalImageResolver.resolveImage(icon, mContext); in resolveImage_nonBitmapResourceIcon_fallsBackToNonResizingLoad()
82 mContext); in resolveImage_nonBitmapResourceUri_throwsIoException()
87 Drawable d = LocalImageResolver.resolveImage(R.drawable.blue, mContext, 480, 480); in resolveImageWithResId_nonBitmapResourceIcon_returnsNull()
95 BitmapFactory.decodeResource(mContext.getResources(), R.drawable.big_a)); in resolveImage_largeBitmapIcon_defaultSize_resizeToDefaultSize()
[all …]
DCachingIconViewTest.java43 private Context mContext; field in CachingIconViewTest
47 mContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); in setUp()
52 CachingIconView view = (CachingIconView) LayoutInflater.from(mContext).inflate( in invalidIcon_skipsLoadSuccessfully()
54 view.setImageIcon(Icon.createWithResource(mContext, 0x85743222)); in invalidIcon_skipsLoadSuccessfully()
61 CachingIconView view = (CachingIconView) LayoutInflater.from(mContext).inflate( in customDrawable_setImageIcon_skipsResizeSuccessfully()
63 view.setImageIcon(Icon.createWithResource(mContext, R.drawable.custom_drawable)); in customDrawable_setImageIcon_skipsResizeSuccessfully()
70 CachingIconView view = (CachingIconView) LayoutInflater.from(mContext).inflate( in customDrawable_setImageIconAsync_skipsResizeSuccessfully()
72 view.setImageIconAsync(Icon.createWithResource(mContext, R.drawable.custom_drawable)).run(); in customDrawable_setImageIconAsync_skipsResizeSuccessfully()
79 CachingIconView view = (CachingIconView) LayoutInflater.from(mContext).inflate( in customDrawable_setImageResource_skipsResizeSuccessfully()
88 CachingIconView view = (CachingIconView) LayoutInflater.from(mContext).inflate( in customDrawable_setImageResourceAsync_skipsResizeSuccessfully()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/security/
DNullCipherNotifierTest.java113 private Context mContext; field in NullCipherNotifierTest
133 notifier.enable(mContext); in enable_enablesSafetySource()
136 verify(mSafetySource, times(1)).setNullCipherIssueEnabled(eq(mContext), eq(true)); in enable_enablesSafetySource()
142 notifier.enable(mContext); in disable_disablesSafetySource()
144 notifier.disable(mContext); in disable_disablesSafetySource()
147 verify(mSafetySource, times(1)).setNullCipherIssueEnabled(eq(mContext), eq(false)); in disable_disablesSafetySource()
153 notifier.enable(mContext); in onSecurityAlgorithmUpdate_enabled_unprotectedEmergency_noSafetySourceUpdate()
156 mContext, in onSecurityAlgorithmUpdate_enabled_unprotectedEmergency_noSafetySourceUpdate()
171 notifier.disable(mContext); in onSecurityAlgorithmUpdate_disabled_noSafetySourceUpdate()
174 mContext, in onSecurityAlgorithmUpdate_disabled_noSafetySourceUpdate()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/
DDevelopmentSettingsEnablerTest.java37 private Context mContext; field in DevelopmentSettingsEnablerTest
42 mContext = RuntimeEnvironment.application; in setUp()
43 mUserManager = Shadow.extract(mContext.getSystemService(UserManager.class)); in setUp()
49 Settings.Global.putInt(mContext.getContentResolver(), in isEnabled_settingsOn_noRestriction_isAdmin_shouldReturnTrue()
52 assertThat(DevelopmentSettingsEnabler.isDevelopmentSettingsEnabled(mContext)).isFalse(); in isEnabled_settingsOn_noRestriction_isAdmin_shouldReturnTrue()
54 DevelopmentSettingsEnabler.setDevelopmentSettingsEnabled(mContext, true); in isEnabled_settingsOn_noRestriction_isAdmin_shouldReturnTrue()
56 assertThat(DevelopmentSettingsEnabler.isDevelopmentSettingsEnabled(mContext)).isTrue(); in isEnabled_settingsOn_noRestriction_isAdmin_shouldReturnTrue()
61 Settings.Global.putInt(mContext.getContentResolver(), in isEnabled_settingsOff_noRestriction_isAdmin_shouldReturnFalse()
64 assertThat(DevelopmentSettingsEnabler.isDevelopmentSettingsEnabled(mContext)).isTrue(); in isEnabled_settingsOff_noRestriction_isAdmin_shouldReturnFalse()
66 DevelopmentSettingsEnabler.setDevelopmentSettingsEnabled(mContext, false); in isEnabled_settingsOff_noRestriction_isAdmin_shouldReturnFalse()
[all …]
/frameworks/base/services/core/java/com/android/server/wm/
DLetterboxConfiguration.java183 final Context mContext; field in LetterboxConfiguration
316 private final Context mContext; field in LetterboxConfiguration.DimenPxIntSupplier
324 mContext = context; in DimenPxIntSupplier()
330 final float newDensity = mContext.getResources().getDisplayMetrics().density; in getAsInt()
333 mValue = mContext.getResources().getDimensionPixelSize(mResourceId); in getAsInt()
354 mContext = systemUiContext; in LetterboxConfiguration()
356 mFixedOrientationLetterboxAspectRatio = mContext.getResources().getFloat( in LetterboxConfiguration()
358 mLetterboxBackgroundType = readLetterboxBackgroundTypeFromConfig(mContext); in LetterboxConfiguration()
359 mLetterboxActivityCornersRadius = mContext.getResources().getInteger( in LetterboxConfiguration()
361 mLetterboxBackgroundWallpaperBlurRadiusPx = mContext.getResources().getDimensionPixelSize( in LetterboxConfiguration()
[all …]
/frameworks/base/services/robotests/backup/src/com/android/server/backup/
DFullBackupJobTest.java53 private Context mContext; field in FullBackupJobTest
66 mContext = RuntimeEnvironment.application; in setUp()
67 mConstants = new BackupManagerConstants(Handler.getMain(), mContext.getContentResolver()); in setUp()
72 mShadowJobScheduler = Shadows.shadowOf(mContext.getSystemService(JobScheduler.class)); in setUp()
81 FullBackupJob.cancel(mUserOneId, mContext); in tearDown()
82 FullBackupJob.cancel(mUserTwoId, mContext); in tearDown()
87 FullBackupJob.schedule(mUserOneId, mContext, 0, mUserBackupManagerService); in testSchedule_afterScheduling_jobExists()
88 FullBackupJob.schedule(mUserTwoId, mContext, 0, mUserBackupManagerService); in testSchedule_afterScheduling_jobExists()
96 shadowOf(mContext.getPackageManager()) in testSchedule_notWatch_requiresDeviceIdle()
98 FullBackupJob.schedule(mUserOneId, mContext, 0, mUserBackupManagerService); in testSchedule_notWatch_requiresDeviceIdle()
[all …]
DKeyValueBackupJobTest.java45 private Context mContext; field in KeyValueBackupJobTest
57 mContext = RuntimeEnvironment.application; in setUp()
58 mConstants = new BackupManagerConstants(Handler.getMain(), mContext.getContentResolver()); in setUp()
70 KeyValueBackupJob.cancel(mUserOneId, mContext); in tearDown()
71 KeyValueBackupJob.cancel(mUserTwoId, mContext); in tearDown()
77 KeyValueBackupJob.schedule(mUserOneId, mContext, mUserBackupManagerService); in testSchedule_isNoopIfDisabled()
85 KeyValueBackupJob.schedule(mUserOneId, mContext, mUserBackupManagerService); in testSchedule_schedulesJobIfEnabled()
98 KeyValueBackupJob.schedule(mUserOneId, mContext, mUserBackupManagerService); in testIsScheduled_afterScheduling_returnsTrue()
99 KeyValueBackupJob.schedule(mUserTwoId, mContext, mUserBackupManagerService); in testIsScheduled_afterScheduling_returnsTrue()
107 KeyValueBackupJob.schedule(mUserOneId, mContext, mUserBackupManagerService); in testIsScheduled_afterCancelling_returnsFalse()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/
DAdaptiveIconTest.java53 private Context mContext; field in AdaptiveIconTest
58 mContext = RuntimeEnvironment.application; in setUp()
60 mActivityInfo.packageName = mContext.getPackageName(); in setUp()
68 new AdaptiveIcon(mContext, new ColorDrawable(Color.BLACK)); in createIcon_shouldSetBackgroundAndInset()
77 spy(new AdaptiveIcon(mContext, new ColorDrawable(Color.BLACK))); in setBackgroundColor_shouldUpdateColorFilter()
90 … doReturn(Icon.createWithResource(mContext, com.android.settingslib.R.drawable.ic_system_update)) in setBackgroundColor_externalTileWithBackgroundColorRawValue_shouldUpdateIcon()
91 .when(tile).getIcon(mContext); in setBackgroundColor_externalTileWithBackgroundColorRawValue_shouldUpdateIcon()
93 new AdaptiveIcon(mContext, new ColorDrawable(Color.BLACK)); in setBackgroundColor_externalTileWithBackgroundColorRawValue_shouldUpdateIcon()
95 icon.setBackgroundColor(mContext, tile); in setBackgroundColor_externalTileWithBackgroundColorRawValue_shouldUpdateIcon()
102 … doReturn(Icon.createWithResource(mContext, com.android.settingslib.R.drawable.ic_system_update)) in setBackgroundColor_tileWithoutBackgroundColor_shouldSetDefaultBackgroundColor()
[all …]
/frameworks/base/core/tests/coretests/src/android/app/backup/
DFullBackupTest.java45 private Context mContext; field in FullBackupTest
54 mContext = getContext(); in setUp()
66 FullBackup.BackupScheme bs = FullBackup.getBackupSchemeForTest(mContext); in testparseBackupSchemeFromXml_onlyInclude()
76 new File(mContext.getFilesDir(), "onlyInclude.txt").getCanonicalPath(), in testparseBackupSchemeFromXml_onlyInclude()
88 FullBackup.BackupScheme bs = FullBackup.getBackupSchemeForTest(mContext); in testparseBackupSchemeFromXml_onlyIncludeRequireEncryptionFlag()
98 new File(mContext.getFilesDir(), "onlyInclude.txt").getCanonicalPath(), in testparseBackupSchemeFromXml_onlyIncludeRequireEncryptionFlag()
113 FullBackup.BackupScheme bs = FullBackup.getBackupSchemeForTest(mContext); in testParseBackupSchemeFromXml_onlyIncludeRequireFakeEncryptionFlag()
120 new File(mContext.getFilesDir(), "onlyInclude.txt").getCanonicalPath(), in testParseBackupSchemeFromXml_onlyIncludeRequireFakeEncryptionFlag()
134 FullBackup.BackupScheme bs = FullBackup.getBackupSchemeForTest(mContext); in testparseBackupSchemeFromXml_onlyIncludeRequireD2DFlag()
144 new File(mContext.getFilesDir(), "onlyInclude.txt").getCanonicalPath(), in testparseBackupSchemeFromXml_onlyIncludeRequireD2DFlag()
[all …]
/frameworks/av/media/libeffects/lvm/wrapper/Reverb/aidl/
DEffectReverb.cpp117 RETURN_IF(!mContext, EX_NULL_POINTER, "nullContext"); in setParameterSpecific()
139 RETURN_IF(mContext->setPresetReverbPreset(prParam.get<PresetReverb::preset>()) != in setParameterPresetReverb()
160 RETURN_IF(mContext->setEnvironmentalReverbRoomLevel( in setParameterEnvironmentalReverb()
167 mContext->setEnvironmentalReverbRoomHfLevel( in setParameterEnvironmentalReverb()
173 RETURN_IF(mContext->setEnvironmentalReverbDecayTime( in setParameterEnvironmentalReverb()
180 mContext->setEnvironmentalReverbDecayHfRatio( in setParameterEnvironmentalReverb()
186 RETURN_IF(mContext->setReflectionsLevel( in setParameterEnvironmentalReverb()
193 RETURN_IF(mContext->setReflectionsDelay( in setParameterEnvironmentalReverb()
200 RETURN_IF(mContext->setEnvironmentalReverbLevel( in setParameterEnvironmentalReverb()
206 RETURN_IF(mContext->setEnvironmentalReverbDelay( in setParameterEnvironmentalReverb()
[all …]
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DReviewNotificationPermissionsReceiverTest.java72 Settings.Global.putInt(mContext.getContentResolver(), in testReceive_remindMeLater_firstTime()
83 mReceiver.onReceive(mContext, mIntent); in testReceive_remindMeLater_firstTime()
87 Settings.Global.getInt(mContext.getContentResolver(), in testReceive_remindMeLater_firstTime()
96 Settings.Global.putInt(mContext.getContentResolver(), in testReceive_remindMeLater_laterTimes()
108 mReceiver.onReceive(mContext, mIntent); in testReceive_remindMeLater_laterTimes()
112 Settings.Global.getInt(mContext.getContentResolver(), in testReceive_remindMeLater_laterTimes()
121 Settings.Global.putInt(mContext.getContentResolver(), in testReceive_dismiss()
129 mReceiver.onReceive(mContext, mIntent); in testReceive_dismiss()
133 Settings.Global.getInt(mContext.getContentResolver(), in testReceive_dismiss()
142 Settings.Global.putInt(mContext.getContentResolver(), in testReceive_notificationCanceled_firstSwipe()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/hdmi/
DHdmiCecConfigTest.java56 private Context mContext; field in HdmiCecConfigTest
62 Resources resources = mContext.getResources(); in setBooleanResource()
69 mContext = FakeHdmiCecConfig.buildContext(InstrumentationRegistry.getTargetContext()); in setUp()
74 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in getAllCecSettings_BasicSanity()
115 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in getUserCecSettings_BasicSanity()
157 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in getUserCecSettings_WithOverride()
197 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in isStringValueType_InvalidSetting()
204 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in isStringValueType_BasicSanity()
211 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in isIntValueType_InvalidSetting()
218 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in isIntValueType_BasicSanity()
[all …]
/frameworks/av/media/libeffects/visualizer/aidl/
DVisualizer.cpp89 RETURN_IF(!mContext, EX_NULL_POINTER, "nullContext"); in commandImpl()
92 mContext->enable(); in commandImpl()
95 mContext->disable(); in commandImpl()
98 mContext->disable(); in commandImpl()
99 mContext->resetBuffer(); in commandImpl()
112 RETURN_IF(!mContext, EX_NULL_POINTER, "nullContext"); in setParameterSpecific()
119 RETURN_IF(mContext->setCaptureSamples(param.get<Visualizer::captureSamples>()) != in setParameterSpecific()
125 RETURN_IF(mContext->setScalingMode(param.get<Visualizer::scalingMode>()) != in setParameterSpecific()
131 RETURN_IF(mContext->setMeasurementMode(param.get<Visualizer::measurementMode>()) != in setParameterSpecific()
137 RETURN_IF(mContext->setDownstreamLatency(param.get<Visualizer::latencyMs>()) != in setParameterSpecific()
[all …]
/frameworks/base/core/tests/coretests/src/android/app/
DNotificationTest.java125 private Context mContext; field in NotificationTest
133 mContext = InstrumentationRegistry.getContext(); in setUp()
138 Notification n = new Notification.Builder(mContext, "test") in testColorizedByPermission()
144 n = new Notification.Builder(mContext, "test") in testColorizedByPermission()
149 n = new Notification.Builder(mContext, "test") in testColorizedByPermission()
158 Notification n = new Notification.Builder(mContext, "test") in testColorizedByForeground()
164 n = new Notification.Builder(mContext, "test") in testColorizedByForeground()
169 n = new Notification.Builder(mContext, "test") in testColorizedByForeground()
178 Notification n = new Notification.Builder(mContext).build(); in testHasCompletedProgress_noProgress()
185 Notification n = new Notification.Builder(mContext) in testHasCompletedProgress_complete()
[all …]
/frameworks/base/rs/java/android/renderscript/
DRenderScript.java247 long curCon = mContext; in nContextDestroy()
249 mContext = 0; in nContextDestroy()
257 rsnContextSetSurface(mContext, w, h, sur); in nContextSetSurface()
262 rsnContextSetSurfaceTexture(mContext, w, h, sur); in nContextSetSurfaceTexture()
267 rsnContextSetPriority(mContext, p); in nContextSetPriority()
272 rsnContextSetCacheDir(mContext, cacheDir); in nContextSetCacheDir()
277 rsnContextDump(mContext, bits); in nContextDump()
282 rsnContextFinish(mContext); in nContextFinish()
288 rsnContextSendMessage(mContext, id, data); in nContextSendMessage()
294 rsnContextBindRootScript(mContext, script); in nContextBindRootScript()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/
DKeyboardShortcutsReceiverTest.java67 mKeyboardShortcuts.mContext = mContext; in setUp()
68 mKeyboardShortcutListSearch.mContext = mContext; in setUp()
92 when(Utilities.isLargeScreen(mContext)).thenReturn(true); in onReceive_whenFlagOffDeviceIsTablet_showKeyboardShortcuts()
94 mKeyboardShortcutsReceiver.onReceive(mContext, SHOW_INTENT); in onReceive_whenFlagOffDeviceIsTablet_showKeyboardShortcuts()
103 when(Utilities.isLargeScreen(mContext)).thenReturn(false); in onReceive_whenFlagOffDeviceIsNotTablet_showKeyboardShortcuts()
105 mKeyboardShortcutsReceiver.onReceive(mContext, SHOW_INTENT); in onReceive_whenFlagOffDeviceIsNotTablet_showKeyboardShortcuts()
114 when(Utilities.isLargeScreen(mContext)).thenReturn(true); in onReceive_whenFlagOnDeviceIsTablet_showKeyboardShortcutListSearch()
116 mKeyboardShortcutsReceiver.onReceive(mContext, SHOW_INTENT); in onReceive_whenFlagOnDeviceIsTablet_showKeyboardShortcutListSearch()
125 when(Utilities.isLargeScreen(mContext)).thenReturn(false); in onReceive_whenFlagOnDeviceIsNotTablet_showKeyboardShortcuts()
127 mKeyboardShortcutsReceiver.onReceive(mContext, SHOW_INTENT); in onReceive_whenFlagOnDeviceIsNotTablet_showKeyboardShortcuts()
[all …]
/frameworks/base/core/tests/overlaytests/device/src/com/android/overlaytest/
DFabricatedOverlaysTest.java56 private Context mContext; field in FabricatedOverlaysTest
64 mContext = InstrumentationRegistry.getTargetContext(); in setUp()
65 mResources = mContext.getResources(); in setUp()
66 mOverlayManager = mContext.getSystemService(OverlayManager.class); in setUp()
74 mOverlayManager.getOverlayInfosForTarget(mContext.getPackageName(), mUserHandle).forEach( in tearDown()
86 mContext.getPackageName(), TEST_OVERLAY_NAME, mContext.getPackageName()) in testFabricatedOverlay()
118 mContext.getPackageName(), TEST_OVERLAY_NAME, mContext.getPackageName()) in testRegisterEnableAtomic()
134 mContext.getPackageName(), TEST_OVERLAY_NAME, mContext.getPackageName()) in testRegisterTwice()
146 mContext.getPackageName(), TEST_OVERLAY_NAME, mContext.getPackageName()) in testRegisterTwice()
159 "android", TEST_OVERLAY_NAME, mContext.getPackageName()) in testInvalidOwningPackageName()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/
DStringUtilTest.java37 private Context mContext; field in StringUtilTest
41 mContext = spy(RuntimeEnvironment.application); in setUp()
49 assertThat(StringUtil.formatElapsedTime(mContext, testMillis, true, false).toString()) in testFormatElapsedTime_WithSeconds_ShowSeconds()
58 assertThat(StringUtil.formatElapsedTime(mContext, testMillis, false, false).toString()) in testFormatElapsedTime_NoSeconds_DoNotShowSeconds()
68 assertThat(StringUtil.formatElapsedTime(mContext, testMillis, false, false).toString()) in testFormatElapsedTime_TimeMoreThanOneDay_ShowCorrectly()
78 assertThat(StringUtil.formatElapsedTime(mContext, testMillis, false, true).toString()) in testFormatElapsedTime_TimeMoreThanOneDayAndCollapseTimeUnit_ShowCorrectly()
87 assertThat(StringUtil.formatElapsedTime(mContext, testMillis, false, false).toString()) in testFormatElapsedTime_ZeroFieldsInTheMiddleDontShow()
96 assertThat(StringUtil.formatElapsedTime(mContext, testMillis, true, false).toString()) in testFormatElapsedTime_FormatZero_WithSeconds()
105 assertThat(StringUtil.formatElapsedTime(mContext, testMillis, false, false).toString()) in testFormatElapsedTime_FormatZero_NoSeconds()
114 StringUtil.formatElapsedTime(mContext, testMillis, false, false); in testFormatElapsedTime_onlyContainsMinute_hasTtsSpan()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/magnification/
DOneFingerPanningSettingsProviderTest.java43 public final TestableContext mContext = new TestableContext(getInstrumentation().getContext()); field in OneFingerPanningSettingsProviderTest
52 mDefaultValue = OneFingerPanningSettingsProvider.isOneFingerPanningEnabledDefault(mContext); in setup()
66 mProvider = new OneFingerPanningSettingsProvider(mContext, /* featureFlagEnabled */ false); in isOneFingerPanningEnabled_flagDisabled_matchesDefault()
74 mProvider = new OneFingerPanningSettingsProvider(mContext, /* featureFlagEnabled */ true); in isOneFingerPanningEnabled_flagEnabledSettingEnabled_true()
82 mProvider = new OneFingerPanningSettingsProvider(mContext, /* featureFlagEnabled */ true); in isOneFingerPanningEnabled_flagEnabledSettingDisabled_false()
89 mProvider = new OneFingerPanningSettingsProvider(mContext, /* featureFlagEnabled */ true); in isOneFingerPanningEnabled_flagEnabledSettingsFalse_false()
100 mProvider = new OneFingerPanningSettingsProvider(mContext, /* featureFlagEnabled */ true); in isOneFingerPanningEnabled_flagEnabledSettingsTrue_true()
111 mProvider = new OneFingerPanningSettingsProvider(mContext, /* featureFlagEnabled */ false); in isOneFingerPanningEnabled_flagDisabledSettingsChanges_valueUnchanged()
123 mContext, /* featureFlagEnabled */ true); in unregister_featureEnabled_contentResolverNull()
133 mContext, /* featureFlagEnabled */ false); in unregister_featureDisabled_noError()
[all …]

12345678910>>...125