Home
last modified time | relevance | path

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

12345678910>>...87

/aosp14/frameworks/base/core/tests/coretests/src/android/text/format/
H A DFormatterTest.java48 private Context mContext; field in FormatterTest
179 mContext, 2 * DAY)); in testFormatShortElapsedTimeRoundingUpToMinutes()
185 mContext, 1 * DAY)); in testFormatShortElapsedTimeRoundingUpToMinutes()
191 mContext, 2 * HOUR)); in testFormatShortElapsedTimeRoundingUpToMinutes()
193 mContext, 1 * HOUR)); in testFormatShortElapsedTimeRoundingUpToMinutes()
201 mContext, 2 * MINUTE)); in testFormatShortElapsedTimeRoundingUpToMinutes()
205 mContext, 1 * MINUTE)); in testFormatShortElapsedTimeRoundingUpToMinutes()
209 mContext, 1 * SECOND)); in testFormatShortElapsedTimeRoundingUpToMinutes()
211 mContext, 1)); in testFormatShortElapsedTimeRoundingUpToMinutes()
213 mContext, 0)); in testFormatShortElapsedTimeRoundingUpToMinutes()
[all …]
/aosp14/frameworks/base/core/java/android/content/
H A DClipboardManager.java90 private final Context mContext; field in ClipboardManager
131 mContext = context; in ClipboardManager()
186 mContext.getUserId(), in setPrimaryClip()
215 mContext.getUserId(), in setPrimaryClipAsPackage()
216 mContext.getDeviceId(), in setPrimaryClipAsPackage()
233 mContext.getUserId(), in clearPrimaryClip()
253 mContext.getUserId(), in getPrimaryClip()
274 mContext.getUserId(), in getPrimaryClipDescription()
292 mContext.getUserId(), in hasPrimaryClip()
367 mContext.getUserId(), in hasText()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/content/
H A DPermissionCheckerTest.java39 private final Context mContext = InstrumentationRegistry.getContext();; field in PermissionCheckerTest
59 Binder.getCallingUid(), mContext.getPackageName())) in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionGranted_returnsGranted()
71 Binder.getCallingUid(), mContext.getPackageName())) in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionNotGranted_returnsHardDenied()
83 Binder.getCallingUid(), mContext.getPackageName())) in testCheckPermissionForPreflight_appOpPermission_modeAllowed_returnsGranted()
107 Binder.getCallingUid(), mContext.getPackageName())) in testCheckPermissionForPreflight_appOpPermission_modeIgnored_returnsHardDenied()
118 mContext, INTERACT_ACROSS_PROFILES_PERMISSION, Binder.getCallingPid(), in testCheckPermissionForPreflight_appOpPermission_modeErrored_returnsHardDenied()
119 Binder.getCallingUid(), mContext.getPackageName())) in testCheckPermissionForPreflight_appOpPermission_modeErrored_returnsHardDenied()
131 mContext, INTERACT_ACROSS_PROFILES_PERMISSION, Binder.getCallingPid(), in testCheckPermissionForDataDelivery_appOpPermission_modeDefaultAndPermissionGranted_returnsGranted()
143 mContext, INTERACT_ACROSS_PROFILES_PERMISSION, Binder.getCallingPid(), in testCheckPermissionForDataDelivery_appOpPermission_modeDefaultAndPermissionNotGranted_returnsHardDenied()
155 mContext, INTERACT_ACROSS_PROFILES_PERMISSION, Binder.getCallingPid(), in testCheckPermissionForDataDelivery_appOpPermission_modeAllowed_returnsGranted()
[all …]
/aosp14/frameworks/base/tests/testables/tests/src/android/testing/
H A DTestablePermissionsTest.java49 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()
67 mContext.enforceCallingOrSelfPermission(permission.INTERACT_ACROSS_USERS, ""); in testEnforceNoException()
79 mContext.getTestablePermissions().setPermission(URI_1, PERMISSION_GRANTED); in testEnforceUriNoException()
80 mContext.enforceUriPermission(URI_1, 0, 0, 0, ""); in testEnforceUriNoException()
85 mContext.getTestablePermissions().setPermission(URI_1, PERMISSION_DENIED); in testEnforceUriWithException()
[all …]
H A DTestableResourcesTest.java43 Resources before = mContext.getResources(); in testLazyInit()
44 mContext.ensureTestableResources(); in testLazyInit()
45 Resources after = mContext.getResources(); in testLazyInit()
54 mContext.getColor(nonExistentId); in testAddingResource()
60 assertEquals(0xffffff, mContext.getColor(nonExistentId)); in testAddingResource()
68 assertEquals(0xffffff, mContext.getColor(nonExistentId)); in testClearingResource()
71 mContext.getColor(nonExistentId); in testClearingResource()
81 assertNotNull(mContext.getString(existentId)); in testOverrideExisting()
84 assertEquals("Other strings", mContext.getString(existentId)); in testOverrideExisting()
91 assertNotNull(mContext.getString(existentId)); in testNonExistentException()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/com/android/internal/widget/
H A DLocalImageResolverTest.java51 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()
74 Drawable d = LocalImageResolver.resolveImage(icon, mContext); in resolveImage_nonBitmapResourceIcon_fallsBackToNonResizingLoad()
82 mContext); in resolveImage_nonBitmapResourceUri_throwsIoException()
96 Drawable d = LocalImageResolver.resolveImage(icon, mContext); in resolveImage_largeBitmapIcon_defaultSize_resizeToDefaultSize()
112 Drawable d = LocalImageResolver.resolveImage(icon, mContext); in resolveImage_largeAdaptiveBitmapIcon_defaultSize_resizeToDefaultSize()
127 Drawable d = LocalImageResolver.resolveImage(icon, mContext); in resolveImage_largeResourceIcon_defaultSize_resizeToDefaultSize()
295 .isSameInstanceAs(mContext.getResources()); in resolveResourcesForIcon_localPackageIcon_returnsPackageResources()
302 .isSameInstanceAs(mContext.getResources()); in resolveResourcesForIcon_iconWithoutPackageSpecificed_returnsPackageResources()
[all …]
H A 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()
70 CachingIconView view = (CachingIconView) LayoutInflater.from(mContext).inflate( in customDrawable_setImageIconAsync_skipsResizeSuccessfully()
79 CachingIconView view = (CachingIconView) LayoutInflater.from(mContext).inflate( in customDrawable_setImageResource_skipsResizeSuccessfully()
121 view.setImageIcon(Icon.createWithResource(mContext, R.drawable.big_a)); in maxDrawableDimensionsSet_setImageIcon_resizesImageIcon()
130 view.setImageIcon(Icon.createWithResource(mContext, R.drawable.big_a)); in maxDrawableWithNoDimensionsSet_setImageIcon_doesNotResizeImageIcon()
234 mContext.getResources().getDisplayMetrics()); in assertDrawableResized()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/view/
H A DCreateViewTest.java42 new CreateViewTest.ViewOne(mContext); in testLayout1()
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()
77 TextView text = new TextView(mContext); in testLayout4()
94 TextView one = new TextView(mContext); in testLayout6()
98 TextView two = new TextView(mContext); in testLayout6()
[all …]
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/
H A DAdaptiveIconTest.java53 private Context mContext; field in AdaptiveIconTest
58 mContext = RuntimeEnvironment.application; in setUp()
60 mActivityInfo.packageName = mContext.getPackageName(); in setUp()
91 .when(tile).getIcon(mContext); in setBackgroundColor_externalTileWithBackgroundColorRawValue_shouldUpdateIcon()
95 icon.setBackgroundColor(mContext, tile); in setBackgroundColor_externalTileWithBackgroundColorRawValue_shouldUpdateIcon()
103 .when(tile).getIcon(mContext); in setBackgroundColor_tileWithoutBackgroundColor_shouldSetDefaultBackgroundColor()
106 icon.setBackgroundColor(mContext, tile); in setBackgroundColor_tileWithoutBackgroundColor_shouldSetDefaultBackgroundColor()
118 .when(tile).getIcon(mContext); in onBindTile_externalTileWithBackgroundColorHint_shouldUpdateIcon()
122 icon.setBackgroundColor(mContext, tile); in onBindTile_externalTileWithBackgroundColorHint_shouldUpdateIcon()
125 .isEqualTo(mContext.getColor(R.color.bt_outline_color)); in onBindTile_externalTileWithBackgroundColorHint_shouldUpdateIcon()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/app/
H A DNotificationTest.java112 private Context mContext; field in NotificationTest
116 mContext = InstrumentationRegistry.getContext(); in setUp()
130 n = new Notification.Builder(mContext, "test") in testColorizedByPermission()
135 n = new Notification.Builder(mContext, "test") in testColorizedByPermission()
150 n = new Notification.Builder(mContext, "test") in testColorizedByForeground()
155 n = new Notification.Builder(mContext, "test") in testColorizedByForeground()
171 Notification n = new Notification.Builder(mContext) in testHasCompletedProgress_complete()
1221 n2 = new Notification.Builder(mContext, "test") in testRemoteViews_nullChange()
1225 n1 = new Notification.Builder(mContext, "test") in testRemoteViews_nullChange()
1231 n2 = new Notification.Builder(mContext, "test") in testRemoteViews_nullChange()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/app/backup/
H A DFullBackupTest.java45 private Context mContext; field in FullBackupTest
54 mContext = getContext(); in setUp()
66 FullBackup.BackupScheme bs = FullBackup.getBackupSchemeForTest(mContext); in testparseBackupSchemeFromXml_onlyInclude()
88 FullBackup.BackupScheme bs = FullBackup.getBackupSchemeForTest(mContext); in testparseBackupSchemeFromXml_onlyIncludeRequireEncryptionFlag()
113 FullBackup.BackupScheme bs = FullBackup.getBackupSchemeForTest(mContext); in testParseBackupSchemeFromXml_onlyIncludeRequireFakeEncryptionFlag()
134 FullBackup.BackupScheme bs = FullBackup.getBackupSchemeForTest(mContext); in testparseBackupSchemeFromXml_onlyIncludeRequireD2DFlag()
159 FullBackup.BackupScheme bs = FullBackup.getBackupSchemeForTest(mContext); in testparseBackupSchemeFromXml_onlyIncludeRequireEncryptionAndD2DFlags()
185 FullBackup.BackupScheme bs = FullBackup.getBackupSchemeForTest(mContext); in testparseBackupSchemeFromXml_onlyIncludeRequireD2DFlagAndIngoreGarbage()
223 FullBackup.BackupScheme bs = FullBackup.getBackupSchemeForTest(mContext); in testparseBackupSchemeFromXml_onlyExclude()
293 mContext.getDatabasePath("foo").getParentFile(), in testparseBackupSchemeFromXml_lotsOfIncludesAndExcludes()
[all …]
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/
H A DDevelopmentSettingsEnablerTest.java36 private Context mContext; field in DevelopmentSettingsEnablerTest
41 mContext = RuntimeEnvironment.application; in setUp()
42 mUserManager = Shadow.extract(mContext.getSystemService(UserManager.class)); in setUp()
48 Settings.Global.putInt(mContext.getContentResolver(), in isEnabled_settingsOn_noRestriction_isAdmin_shouldReturnTrue()
51 assertThat(DevelopmentSettingsEnabler.isDevelopmentSettingsEnabled(mContext)).isFalse(); in isEnabled_settingsOn_noRestriction_isAdmin_shouldReturnTrue()
53 DevelopmentSettingsEnabler.setDevelopmentSettingsEnabled(mContext, true); in isEnabled_settingsOn_noRestriction_isAdmin_shouldReturnTrue()
55 assertThat(DevelopmentSettingsEnabler.isDevelopmentSettingsEnabled(mContext)).isTrue(); in isEnabled_settingsOn_noRestriction_isAdmin_shouldReturnTrue()
60 Settings.Global.putInt(mContext.getContentResolver(), in isEnabled_settingsOff_noRestriction_isAdmin_shouldReturnFalse()
63 assertThat(DevelopmentSettingsEnabler.isDevelopmentSettingsEnabled(mContext)).isTrue(); in isEnabled_settingsOff_noRestriction_isAdmin_shouldReturnFalse()
65 DevelopmentSettingsEnabler.setDevelopmentSettingsEnabled(mContext, false); in isEnabled_settingsOff_noRestriction_isAdmin_shouldReturnFalse()
[all …]
/aosp14/frameworks/base/services/core/java/com/android/server/wm/
H A DLetterboxConfiguration.java182 final Context mContext; field in LetterboxConfiguration
319 mContext = systemUiContext; in LetterboxConfiguration()
340 mIsVerticalReachabilityEnabled = mContext.getResources().getBoolean( in LetterboxConfiguration()
348 mIsEducationEnabled = mContext.getResources().getBoolean( in LetterboxConfiguration()
369 mContext.getResources().getBoolean( in LetterboxConfiguration()
373 mContext.getResources().getBoolean(R.bool in LetterboxConfiguration()
382 mContext.getResources().getBoolean( in LetterboxConfiguration()
386 mContext.getResources().getBoolean( in LetterboxConfiguration()
392 mContext.getResources().getBoolean( in LetterboxConfiguration()
500 return Color.valueOf(mContext.getResources().getColor(colorId)); in getLetterboxBackgroundColor()
[all …]
/aosp14/frameworks/base/core/java/android/content/pm/
H A DCrossProfileApps.java80 private final Context mContext; field in CrossProfileApps
87 mContext = context; in CrossProfileApps()
109 mContext.getPackageName(), in startMainActivity()
110 mContext.getAttributionTag(), in startMainActivity()
114 mContext.getActivityToken(), in startMainActivity()
144 mContext.getPackageName(), in startMainActivity()
145 mContext.getAttributionTag(), in startMainActivity()
214 mContext.getPackageName(), in startActivity()
255 mContext.getPackageName(), in startActivity()
288 mContext.getPackageName(), mContext.getAttributionTag(), component, in startActivity()
[all …]
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/hdmi/
H A DHdmiCecConfigTest.java56 private Context mContext; field in HdmiCecConfigTest
62 Resources resources = mContext.getResources(); in setBooleanResource()
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()
225 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in getAllowedStringValues_InvalidSetting()
[all …]
/aosp14/frameworks/base/rs/java/android/renderscript/
H A DRenderScript.java247 long curCon = mContext; in nContextDestroy()
249 mContext = 0; in nContextDestroy()
282 rsnContextFinish(mContext); in nContextFinish()
324 rsnContextPause(mContext); in nContextPause()
329 rsnContextResume(mContext); in nContextResume()
412 if (mContext != 0) { in nObjDestroy()
567 rsnAllocationData2D(mContext, in nAllocationData2D()
1033 long mContext; field in RenderScript
1245 if (mContext == 0) { in validate()
1427 if (rs.mContext == 0) { in internalCreate()
[all …]
/aosp14/frameworks/base/core/tests/overlaytests/device/src/com/android/overlaytest/
H A DFabricatedOverlaysTest.java56 private Context mContext; field in FabricatedOverlaysTest
64 mContext = InstrumentationRegistry.getTargetContext(); in setUp()
65 mResources = mContext.getResources(); in setUp()
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()
176 mContext.getPackageName(), "invalid@name", mContext.getPackageName()) in testInvalidOverlayName()
197 longestName, mContext.getPackageName()) in testOverlayIdentifierLongest()
287 mContext.getPackageName(), TEST_OVERLAY_NAME, mContext.getPackageName()) in testTransactionFailRollback()
[all …]
/aosp14/frameworks/base/services/robotests/backup/src/com/android/server/backup/
H A DFullBackupJobTest.java48 private Context mContext; field in FullBackupJobTest
61 mContext = RuntimeEnvironment.application; in setUp()
76 FullBackupJob.cancel(mUserOneId, mContext); in tearDown()
77 FullBackupJob.cancel(mUserTwoId, mContext); in tearDown()
82 FullBackupJob.schedule(mUserOneId, mContext, 0, mUserBackupManagerService); in testSchedule_afterScheduling_jobExists()
83 FullBackupJob.schedule(mUserTwoId, mContext, 0, mUserBackupManagerService); in testSchedule_afterScheduling_jobExists()
91 FullBackupJob.schedule(mUserOneId, mContext, 0, mUserBackupManagerService); in testCancel_afterCancelling_jobDoesntExist()
92 FullBackupJob.schedule(mUserTwoId, mContext, 0, mUserBackupManagerService); in testCancel_afterCancelling_jobDoesntExist()
93 FullBackupJob.cancel(mUserOneId, mContext); in testCancel_afterCancelling_jobDoesntExist()
94 FullBackupJob.cancel(mUserTwoId, mContext); in testCancel_afterCancelling_jobDoesntExist()
[all …]
H A DKeyValueBackupJobTest.java45 private Context mContext; field in KeyValueBackupJobTest
57 mContext = RuntimeEnvironment.application; 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()
109 KeyValueBackupJob.cancel(mUserOneId, mContext); in testIsScheduled_afterCancelling_returnsFalse()
110 KeyValueBackupJob.cancel(mUserTwoId, mContext); in testIsScheduled_afterCancelling_returnsFalse()
[all …]
/aosp14/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
H A DReviewNotificationPermissionsReceiverTest.java72 Settings.Global.putInt(mContext.getContentResolver(), in testReceive_remindMeLater_firstTime()
83 mReceiver.onReceive(mContext, mIntent); in testReceive_remindMeLater_firstTime()
96 Settings.Global.putInt(mContext.getContentResolver(), in testReceive_remindMeLater_laterTimes()
108 mReceiver.onReceive(mContext, mIntent); in testReceive_remindMeLater_laterTimes()
121 Settings.Global.putInt(mContext.getContentResolver(), in testReceive_dismiss()
129 mReceiver.onReceive(mContext, mIntent); in testReceive_dismiss()
142 Settings.Global.putInt(mContext.getContentResolver(), in testReceive_notificationCanceled_firstSwipe()
153 mReceiver.onReceive(mContext, mIntent); in testReceive_notificationCanceled_firstSwipe()
166 Settings.Global.putInt(mContext.getContentResolver(), in testReceive_notificationCanceled_secondSwipe()
177 mReceiver.onReceive(mContext, mIntent); in testReceive_notificationCanceled_secondSwipe()
[all …]
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/udfps/
H A DUdfpsUtilsTest.java42 private Context mContext; field in UdfpsUtilsTest
48 mContext = RuntimeEnvironment.application; in setUp()
49 mTouchHints = mContext.getResources().getStringArray( in setUp()
59 mUdfpsUtils.onTouchOutsideOfSensorArea(true, mContext, in testTouchOutsideAreaNoRotation()
66 mUdfpsUtils.onTouchOutsideOfSensorArea(true, mContext, in testTouchOutsideAreaNoRotation()
73 mUdfpsUtils.onTouchOutsideOfSensorArea(true, mContext, in testTouchOutsideAreaNoRotation()
80 mUdfpsUtils.onTouchOutsideOfSensorArea(true, mContext, in testTouchOutsideAreaNoRotation()
93 mUdfpsUtils.onTouchOutsideOfSensorArea(true, mContext, in testTouchOutsideAreaNoRotation90Degrees()
100 mUdfpsUtils.onTouchOutsideOfSensorArea(true, mContext, in testTouchOutsideAreaNoRotation90Degrees()
107 mUdfpsUtils.onTouchOutsideOfSensorArea(true, mContext, in testTouchOutsideAreaNoRotation90Degrees()
[all …]
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/
H A DPowerUtilTest.java53 private Context mContext; field in PowerUtilTest
58 mContext = spy(RuntimeEnvironment.application); in setup()
63 String info = PowerUtil.getBatteryRemainingStringFormatted(mContext, in testGetBatteryRemainingStringFormatted_moreThanFifteenMinutes_withPercentage()
67 String info2 = PowerUtil.getBatteryRemainingStringFormatted(mContext, in testGetBatteryRemainingStringFormatted_moreThanFifteenMinutes_withPercentage()
89 String info = PowerUtil.getBatteryRemainingStringFormatted(mContext, in testGetBatteryRemainingStringFormatted_moreThanFifteenMinutes_noPercentage()
93 String info2 = PowerUtil.getBatteryRemainingStringFormatted(mContext, in testGetBatteryRemainingStringFormatted_moreThanFifteenMinutes_noPercentage()
115 String info = PowerUtil.getBatteryRemainingStringFormatted(mContext, in testGetBatteryRemainingStringFormatted_lessThanSevenMinutes_usesCorrectString()
132 String info = PowerUtil.getBatteryRemainingStringFormatted(mContext, in testGetBatteryRemainingStringFormatted_betweenSevenAndFifteenMinutes_usesCorrectString()
149 String info = PowerUtil.getBatteryRemainingStringFormatted(mContext, in testGetBatteryRemainingStringFormatted_betweenOneAndTwoDays_usesCorrectString()
212 String info = PowerUtil.getBatteryTipStringFormatted(mContext, in getBatteryTipStringFormatted_moreThanOneDay_usesCorrectString()
[all …]
H A DStringUtilTest.java37 private Context mContext; field in StringUtilTest
41 mContext = spy(RuntimeEnvironment.application); in setUp()
130 assertThat(StringUtil.formatRelativeTime(mContext, testMillis, true, in testFormatRelativeTime_WithSeconds_ShowSeconds()
139 assertThat(StringUtil.formatRelativeTime(mContext, testMillis, false, in testFormatRelativeTime_NoSeconds_DoNotShowSeconds()
148 assertThat(StringUtil.formatRelativeTime(mContext, testMillis, true, in testFormatRelativeTime_LessThanTwoMinutes_withSeconds()
166 assertThat(StringUtil.formatRelativeTime(mContext, testMillis, true, in testFormatRelativeTime_TwoMinutes_withSeconds()
175 assertThat(StringUtil.formatRelativeTime(mContext, testMillis, true, in testFormatRelativeTime_LessThanTwoHours_withSeconds()
184 assertThat(StringUtil.formatRelativeTime(mContext, testMillis, true, in testFormatRelativeTime_TwoHours_withSeconds()
193 assertThat(StringUtil.formatRelativeTime(mContext, testMillis, true, in testFormatRelativeTime_LessThanTwoDays_withSeconds()
202 assertThat(StringUtil.formatRelativeTime(mContext, testMillis, true, in testFormatRelativeTime_TwoDays_withSeconds()
[all …]
/aosp14/frameworks/base/libs/hwui/renderthread/
H A DRenderProxy.cpp63 if (mContext) { in destroyContext()
68 mContext = nullptr; in destroyContext()
79 if (mContext->profiler().consumeProperties()) { in loadSystemProperties()
97 mContext->setHardwareBuffer(hardwareBuffer); in setHardwareBuffer()
107 mContext->setSurface(win, enableTimeout); in setSurface()
118 mContext->setSurfaceControl(control); in setSurfaceControl()
193 return mContext->createTextureLayer(); in createTextureLayer()
289 mContext->profiler().dumpData(fd); in dumpProfileInfo()
291 mContext->dumpFrames(fd); in dumpProfileInfo()
297 mContext->resetFrameStats(); in dumpProfileInfo()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/util/
H A DHashedStringCacheTest.java43 private Context mContext; field in HashedStringCacheTest
48 mContext = null; in setup()
49 mContext = InstrumentationRegistry.getContext(); in setup()
69 cache.hashString(mContext, TAG, TEST_STRING, 7); in testHashedStringNotOriginalString()
77 cache.hashString(mContext, TAG, TEST_STRING, 7); in testThatMultipleCallsResultInSameHash()
79 cache.hashString(mContext, TAG, TEST_STRING, 7); in testThatMultipleCallsResultInSameHash()
88 cache.hashString(mContext, TAG, TEST_STRING, 7); in testThatMultipleInputResultInDifferentHash()
98 cache.hashString(mContext, TAG, TEST_STRING, 7); in testThatZeroDaysResultsInNewHash()
100 cache.hashString(mContext, TAG, TEST_STRING, 0); in testThatZeroDaysResultsInNewHash()
141 cache.hashString(mContext, TAG, "", -1); in testEmptyStringInput()
[all …]

12345678910>>...87