/frameworks/base/core/tests/coretests/src/android/text/format/ |
D | FormatterTest.java | 46 private Context mContext; field in FormatterTest 50 mContext = InstrumentationRegistry.getContext(); in setup() 51 mOriginalLocale = mContext.getResources() in setup() 100 BytesResult r = Formatter.formatBytes(mContext.getResources(), 1, 0); in testFormatBytes() 138 assertEquals("3 days", Formatter.formatShortElapsedTime(mContext, 2 * DAY + 12 * HOUR)); in testFormatShortElapsedTime() 139 assertEquals("2 days", Formatter.formatShortElapsedTime(mContext, 2 * DAY + 11 * HOUR)); in testFormatShortElapsedTime() 140 assertEquals("2 days", Formatter.formatShortElapsedTime(mContext, 2 * DAY)); in testFormatShortElapsedTime() 142 Formatter.formatShortElapsedTime(mContext, 1 * DAY + 23 * HOUR + 59 * MINUTE)); in testFormatShortElapsedTime() 144 Formatter.formatShortElapsedTime(mContext, 1 * DAY + 59 * MINUTE)); in testFormatShortElapsedTime() 145 assertEquals("1 day", Formatter.formatShortElapsedTime(mContext, 1 * DAY)); in testFormatShortElapsedTime() [all …]
|
/frameworks/base/core/java/android/content/ |
D | ClipboardManager.java | 73 private final Context mContext; field in ClipboardManager 114 mContext = context; in ClipboardManager() 134 mContext.getOpPackageName(), in setPrimaryClip() 135 mContext.getAttributionTag(), in setPrimaryClip() 136 mContext.getUserId()); in setPrimaryClip() 162 mContext.getOpPackageName(), in setPrimaryClipAsPackage() 163 mContext.getAttributionTag(), in setPrimaryClipAsPackage() 164 mContext.getUserId(), in setPrimaryClipAsPackage() 179 mContext.getOpPackageName(), in clearPrimaryClip() 180 mContext.getAttributionTag(), in clearPrimaryClip() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/ |
D | PermissionCheckerTest.java | 39 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/ |
D | TestablePermissionsTest.java | 40 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 …]
|
D | TestableResourcesTest.java | 39 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/ |
D | CreateViewTest.java | 42 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/ |
D | LocalImageResolverTest.java | 45 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 …]
|
D | CachingIconViewTest.java | 43 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/base/services/tests/uiservicestests/src/com/android/server/notification/ |
D | NotificationComparatorTest.java | 63 @Mock Context mContext; field in NotificationComparatorTest 100 when(mContext.getResources()).thenReturn(getContext().getResources()); in setUp() 101 when(mContext.getTheme()).thenReturn(getContext().getTheme()); in setUp() 102 when(mContext.getContentResolver()).thenReturn(getContext().getContentResolver()); in setUp() 103 when(mContext.getPackageManager()).thenReturn(mPm); in setUp() 104 when(mContext.getSystemService(eq(Context.TELECOM_SERVICE))).thenReturn(mTm); in setUp() 105 when(mContext.getSystemService(Vibrator.class)).thenReturn(mVibrator); in setUp() 106 when(mContext.getString(anyInt())).thenCallRealMethod(); in setUp() 107 when(mContext.getColor(anyInt())).thenCallRealMethod(); in setUp() 113 when(mContext.getApplicationInfo()).thenReturn(legacy); in setUp() [all …]
|
D | ReviewNotificationPermissionsReceiverTest.java | 72 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/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/ |
D | AdaptiveIconTest.java | 53 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, 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, R.drawable.ic_system_update)) in setBackgroundColor_tileWithoutBackgroundColor_shouldSetDefaultBackgroundColor() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/ |
D | DevelopmentSettingsEnablerTest.java | 36 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 …]
|
/frameworks/base/core/tests/coretests/src/android/app/backup/ |
D | FullBackupTest.java | 45 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/base/services/robotests/backup/src/com/android/server/backup/ |
D | KeyValueBackupJobTest.java | 41 private Context mContext; field in KeyValueBackupJobTest 49 mContext = RuntimeEnvironment.application; in setUp() 50 mConstants = new BackupManagerConstants(Handler.getMain(), mContext.getContentResolver()); in setUp() 60 KeyValueBackupJob.cancel(mUserOneId, mContext); in tearDown() 61 KeyValueBackupJob.cancel(mUserTwoId, mContext); in tearDown() 72 KeyValueBackupJob.schedule(mUserOneId, mContext, mConstants); in testIsScheduled_afterScheduling_returnsTrue() 73 KeyValueBackupJob.schedule(mUserTwoId, mContext, mConstants); in testIsScheduled_afterScheduling_returnsTrue() 81 KeyValueBackupJob.schedule(mUserOneId, mContext, mConstants); in testIsScheduled_afterCancelling_returnsFalse() 82 KeyValueBackupJob.schedule(mUserTwoId, mContext, mConstants); in testIsScheduled_afterCancelling_returnsFalse() 83 KeyValueBackupJob.cancel(mUserOneId, mContext); in testIsScheduled_afterCancelling_returnsFalse() [all …]
|
D | FullBackupJobTest.java | 44 private Context mContext; field in FullBackupJobTest 53 mContext = RuntimeEnvironment.application; in setUp() 54 mConstants = new BackupManagerConstants(Handler.getMain(), mContext.getContentResolver()); in setUp() 57 mShadowJobScheduler = Shadows.shadowOf(mContext.getSystemService(JobScheduler.class)); in setUp() 66 FullBackupJob.cancel(mUserOneId, mContext); in tearDown() 67 FullBackupJob.cancel(mUserTwoId, mContext); in tearDown() 72 FullBackupJob.schedule(mUserOneId, mContext, 0, mConstants); in testSchedule_afterScheduling_jobExists() 73 FullBackupJob.schedule(mUserTwoId, mContext, 0, mConstants); in testSchedule_afterScheduling_jobExists() 81 FullBackupJob.schedule(mUserOneId, mContext, 0, mConstants); in testCancel_afterCancelling_jobDoesntExist() 82 FullBackupJob.schedule(mUserTwoId, mContext, 0, mConstants); in testCancel_afterCancelling_jobDoesntExist() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/hdmi/ |
D | HdmiCecConfigTest.java | 56 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() 113 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in getUserCecSettings_BasicSanity() 153 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in getUserCecSettings_WithOverride() 191 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in isStringValueType_InvalidSetting() 198 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in isStringValueType_BasicSanity() 205 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in isIntValueType_InvalidSetting() 212 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in isIntValueType_BasicSanity() [all …]
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | LetterboxConfiguration.java | 120 final Context mContext; field in LetterboxConfiguration 267 mContext = systemUiContext; in LetterboxConfiguration() 270 mFixedOrientationLetterboxAspectRatio = mContext.getResources().getFloat( in LetterboxConfiguration() 272 mLetterboxActivityCornersRadius = mContext.getResources().getInteger( in LetterboxConfiguration() 274 mLetterboxBackgroundType = readLetterboxBackgroundTypeFromConfig(mContext); in LetterboxConfiguration() 275 mLetterboxBackgroundWallpaperBlurRadius = mContext.getResources().getDimensionPixelSize( in LetterboxConfiguration() 277 mLetterboxBackgroundWallpaperDarkScrimAlpha = mContext.getResources().getFloat( in LetterboxConfiguration() 279 mLetterboxHorizontalPositionMultiplier = mContext.getResources().getFloat( in LetterboxConfiguration() 281 mLetterboxVerticalPositionMultiplier = mContext.getResources().getFloat( in LetterboxConfiguration() 283 mLetterboxBookModePositionMultiplier = mContext.getResources().getFloat( in LetterboxConfiguration() [all …]
|
/frameworks/base/rs/java/android/renderscript/ |
D | RenderScript.java | 247 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/SettingsLib/tests/robotests/src/com/android/settingslib/utils/ |
D | PowerUtilTest.java | 53 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() 119 String info2 = PowerUtil.getBatteryRemainingStringFormatted(mContext, in testGetBatteryRemainingStringFormatted_lessThanSevenMinutes_usesCorrectString() 132 String info = PowerUtil.getBatteryRemainingStringFormatted(mContext, in testGetBatteryRemainingStringFormatted_betweenSevenAndFifteenMinutes_usesCorrectString() 136 String info2 = PowerUtil.getBatteryRemainingStringFormatted(mContext, in testGetBatteryRemainingStringFormatted_betweenSevenAndFifteenMinutes_usesCorrectString() [all …]
|
D | StringUtilTest.java | 37 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/media/mca/filterfw/java/android/filterfw/ |
D | MffEnvironment.java | 34 private FilterContext mContext; field in MffEnvironment 50 mContext = new FilterContext(); in MffEnvironment() 51 mContext.setFrameManager(frameManager); in MffEnvironment() 59 return mContext; in getContext() 67 mContext.initGLEnvironment(glEnvironment); in setGLEnvironment() 85 GLEnvironment glEnv = mContext.getGLEnvironment(); in activateGLEnvironment() 87 mContext.getGLEnvironment().activate(); in activateGLEnvironment() 99 GLEnvironment glEnv = mContext.getGLEnvironment(); in deactivateGLEnvironment() 101 mContext.getGLEnvironment().deactivate(); in deactivateGLEnvironment()
|
/frameworks/base/core/tests/coretests/src/android/app/ |
D | NotificationTest.java | 111 private Context mContext; field in NotificationTest 115 mContext = InstrumentationRegistry.getContext(); in setUp() 120 Notification n = new Notification.Builder(mContext, "test") in testColorizedByPermission() 126 n = new Notification.Builder(mContext, "test") in testColorizedByPermission() 131 n = new Notification.Builder(mContext, "test") in testColorizedByPermission() 140 Notification n = new Notification.Builder(mContext, "test") in testColorizedByForeground() 146 n = new Notification.Builder(mContext, "test") in testColorizedByForeground() 151 n = new Notification.Builder(mContext, "test") in testColorizedByForeground() 160 Notification n = new Notification.Builder(mContext).build(); in testHasCompletedProgress_noProgress() 167 Notification n = new Notification.Builder(mContext) in testHasCompletedProgress_complete() [all …]
|
/frameworks/base/core/tests/coretests/src/android/util/ |
D | HashedStringCacheTest.java | 43 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() 90 cache.hashString(mContext, TAG, "different_test", 7); in testThatMultipleInputResultInDifferentHash() 98 cache.hashString(mContext, TAG, TEST_STRING, 7); in testThatZeroDaysResultsInNewHash() 100 cache.hashString(mContext, TAG, TEST_STRING, 0); in testThatZeroDaysResultsInNewHash() [all …]
|
/frameworks/opt/net/ims/tests/src/com/android/ims/rcs/uce/eab/ |
D | EabProviderTest.java | 53 (MockContentResolver) mContext.getContentResolver(); in setUp() 54 mEabProviderTestable.initializeForTesting(mContext); in setUp() 69 mContext.getContentResolver().insert(CONTACT_URI, data); in testQueryContactInfo() 71 Cursor cursor = mContext.getContentResolver().query(CONTACT_URI, in testQueryContactInfo() 85 mContext.getContentResolver().insert(CONTACT_URI, data); in testContactIsUnique() 89 mContext.getContentResolver().insert(CONTACT_URI, data); in testContactIsUnique() 91 Cursor cursor = mContext.getContentResolver().query(CONTACT_URI, in testContactIsUnique() 107 mContext.getContentResolver().insert(COMMON_URI, data); in testQueryCommonInfo() 109 Cursor cursor = mContext.getContentResolver().query(COMMON_URI, in testQueryCommonInfo() 126 mContext.getContentResolver().insert(COMMON_URI, data); in testCommonIsNotUnique() [all …]
|
/frameworks/base/libs/hwui/renderthread/ |
D | RenderProxy.cpp | 40 : mRenderThread(RenderThread::getInstance()), mContext(nullptr) { in RenderProxy() 43 mContext = mRenderThread.queue().runSync([=, this]() -> CanvasContext* { in RenderProxy() 52 mDrawFrameTask.setContext(&mRenderThread, mContext, rootRenderNode, uiThreadId, renderThreadId); in RenderProxy() 60 if (mContext) { in destroyContext() 64 mRenderThread.queue().runSync([this]() { delete mContext; }); in destroyContext() 65 mContext = nullptr; in destroyContext() 70 mRenderThread.queue().post([this, swapBehavior]() { mContext->setSwapBehavior(swapBehavior); }); in setSwapBehavior() 76 if (mContext->profiler().consumeProperties()) { in loadSystemProperties() 86 mRenderThread.queue().runSync([this, name]() { mContext->setName(std::string(name)); }); in setName() 92 mContext->setSurface(win, enableTimeout); in setSurface() [all …]
|