Home
last modified time | relevance | path

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

12345678910>>...94

/frameworks/base/core/tests/coretests/src/android/text/format/
DFormatterTest.java46 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/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/services/tests/uiservicestests/src/com/android/server/notification/
DNotificationTest.java73 Notification.Builder nb = new Notification.Builder(mContext, "channel"); in testDoesNotStripsExtenders()
89 Notification.Builder n1 = new Notification.Builder(mContext, "test"); in testStyleChangeVisiblyDifferent_noStyles()
90 Notification.Builder n2 = new Notification.Builder(mContext, "test"); in testStyleChangeVisiblyDifferent_noStyles()
97 Notification.Builder n1 = new Notification.Builder(mContext, "test"); in testStyleChangeVisiblyDifferent_noStyleToStyle()
98 Notification.Builder n2 = new Notification.Builder(mContext, "test") in testStyleChangeVisiblyDifferent_noStyleToStyle()
106 Notification.Builder n2 = new Notification.Builder(mContext, "test"); in testStyleChangeVisiblyDifferent_styleToNoStyle()
107 Notification.Builder n1 = new Notification.Builder(mContext, "test") in testStyleChangeVisiblyDifferent_styleToNoStyle()
115 Notification.Builder n1 = new Notification.Builder(mContext, "test") in testStyleChangeVisiblyDifferent_changeStyle()
117 Notification.Builder n2 = new Notification.Builder(mContext, "test") in testStyleChangeVisiblyDifferent_changeStyle()
125 Notification.Builder nInbox1 = new Notification.Builder(mContext, "test") in testInboxTextChange()
[all …]
DNotificationComparatorTest.java63 @Mock Context mContext; field in NotificationComparatorTest
98 when(mContext.getResources()).thenReturn(getContext().getResources()); in setUp()
99 when(mContext.getTheme()).thenReturn(getContext().getTheme()); in setUp()
100 when(mContext.getContentResolver()).thenReturn(getContext().getContentResolver()); in setUp()
101 when(mContext.getPackageManager()).thenReturn(mPm); in setUp()
102 when(mContext.getSystemService(eq(Context.TELECOM_SERVICE))).thenReturn(mTm); in setUp()
103 when(mContext.getSystemService(Vibrator.class)).thenReturn(mVibrator); in setUp()
104 when(mContext.getString(anyInt())).thenCallRealMethod(); in setUp()
105 when(mContext.getColor(anyInt())).thenCallRealMethod(); in setUp()
111 when(mContext.getApplicationInfo()).thenReturn(legacy); in setUp()
[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/java/android/content/
DClipboardManager.java73 private final Context mContext; field in ClipboardManager
114 mContext = context; in ClipboardManager()
132 mService.setPrimaryClip(clip, mContext.getOpPackageName(), mContext.getUserId()); in setPrimaryClip()
157 clip, mContext.getOpPackageName(), mContext.getUserId(), sourcePackage); in setPrimaryClipAsPackage()
170 mService.clearPrimaryClip(mContext.getOpPackageName(), mContext.getUserId()); in clearPrimaryClip()
186 return mService.getPrimaryClip(mContext.getOpPackageName(), mContext.getUserId()); in getPrimaryClip()
203 return mService.getPrimaryClipDescription(mContext.getOpPackageName(), in getPrimaryClipDescription()
204 mContext.getUserId()); in getPrimaryClipDescription()
218 return mService.hasPrimaryClip(mContext.getOpPackageName(), mContext.getUserId()); in hasPrimaryClip()
229 mPrimaryClipChangedServiceListener, mContext.getOpPackageName(), in addPrimaryClipChangedListener()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/
DAccessibilityFloatingMenu.java58 private final Context mContext; field in AccessibilityFloatingMenu
68 mMenuView.onTargetsChanged(getTargets(mContext, ACCESSIBILITY_BUTTON));
76 mMenuView.setSizeType(getSizeType(mContext));
84 mMenuView.updateOpacityWith(isFadeEffectEnabled(mContext),
85 getOpacityValue(mContext));
98 mContext = context; in AccessibilityFloatingMenu()
100 mMigrationTooltipView = new MigrationTooltipView(mContext, mMenuView); in AccessibilityFloatingMenu()
101 mDockTooltipView = new DockTooltipView(mContext, mMenuView); in AccessibilityFloatingMenu()
106 mContext = context; in AccessibilityFloatingMenu()
108 mMigrationTooltipView = new MigrationTooltipView(mContext, mMenuView); in AccessibilityFloatingMenu()
[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, 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/
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 …]
/frameworks/base/services/tests/servicestests/src/com/android/server/hdmi/
DHdmiCecConfigTest.java63 private Context mContext; field in HdmiCecConfigTest
69 Resources resources = mContext.getResources(); in setBooleanResource()
76 mContext = FakeHdmiCecConfig.buildContext(InstrumentationRegistry.getTargetContext()); in setUp()
81 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in getAllCecSettings_BasicSanity()
102 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in getUserCecSettings_BasicSanity()
124 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in getUserCecSettings_WithOverride()
144 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in isStringValueType_InvalidSetting()
151 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in isStringValueType_BasicSanity()
158 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in isIntValueType_InvalidSetting()
165 HdmiCecConfig hdmiCecConfig = new HdmiCecConfig(mContext, mStorageAdapter); in isIntValueType_BasicSanity()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/
DScreenDecorationsTest.java114 WindowMetrics metrics = mContext.getSystemService(WindowManager.class) in setup()
117 mContext.addMockSystemService(WindowManager.class, mWindowManager); in setup()
120 Display display = mContext.getSystemService(DisplayManager.class) in setup()
123 mContext.addMockSystemService(DisplayManager.class, mDisplayManager); in setup()
125 mScreenDecorations = spy(new ScreenDecorations(mContext, mExecutor, mSecureSettings, in setup()
151 mContext.getOrCreateTestableResources().addOverride( in testNoRounding_NoCutout()
153 mContext.getOrCreateTestableResources().addOverride( in testNoRounding_NoCutout()
155 mContext.getOrCreateTestableResources().addOverride( in testNoRounding_NoCutout()
157 mContext.getOrCreateTestableResources().addOverride( in testNoRounding_NoCutout()
159 mContext.getOrCreateTestableResources() in testNoRounding_NoCutout()
[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/base/services/robotests/backup/src/com/android/server/backup/
DKeyValueBackupJobTest.java41 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 …]
DFullBackupJobTest.java44 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/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/qs/
DAutoAddTrackerTest.java50 Secure.putString(mContext.getContentResolver(), Secure.QS_AUTO_ADDED_TILES, ""); in setUp()
55 Prefs.putBoolean(mContext, Key.QS_DATA_SAVER_ADDED, true); in testMigration()
56 Prefs.putBoolean(mContext, Key.QS_WORK_ADDED, true); in testMigration()
57 mAutoTracker = new AutoAddTracker(mContext, USER); in testMigration()
65 assertTrue(Prefs.getBoolean(mContext, Key.QS_DATA_SAVER_ADDED, true )); in testMigration()
66 assertFalse(Prefs.getBoolean(mContext, Key.QS_DATA_SAVER_ADDED, false)); in testMigration()
67 assertTrue(Prefs.getBoolean(mContext, Key.QS_WORK_ADDED, true)); in testMigration()
68 assertFalse(Prefs.getBoolean(mContext, Key.QS_WORK_ADDED, false)); in testMigration()
75 mAutoTracker = new AutoAddTracker(mContext, USER); in testChangeFromBackup()
80 Secure.putString(mContext.getContentResolver(), Secure.QS_AUTO_ADDED_TILES, SAVER); in testChangeFromBackup()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/
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()
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 …]
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/libs/hwui/renderthread/
DRenderProxy.cpp40 : mRenderThread(RenderThread::getInstance()), mContext(nullptr) { in RenderProxy()
41 mContext = mRenderThread.queue().runSync([&]() -> CanvasContext* { in RenderProxy()
44 mDrawFrameTask.setContext(&mRenderThread, mContext, rootRenderNode, in RenderProxy()
53 if (mContext) { in destroyContext()
57 mRenderThread.queue().runSync([this]() { delete mContext; }); in destroyContext()
58 mContext = nullptr; in destroyContext()
63 mRenderThread.queue().post([this, swapBehavior]() { mContext->setSwapBehavior(swapBehavior); }); in setSwapBehavior()
69 if (mContext->profiler().consumeProperties()) { in loadSystemProperties()
79 mRenderThread.queue().runSync([this, name]() { mContext->setName(std::string(name)); }); in setName()
85 mContext->setSurface(win, enableTimeout); in setSurface()
[all …]
/frameworks/base/media/mca/filterfw/java/android/filterfw/
DMffEnvironment.java34 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/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DRotationLockControllerImpl.java34 private final Context mContext; field in RotationLockControllerImpl
48 mContext = context; in RotationLockControllerImpl()
64 return RotationPolicy.getRotationLockOrientation(mContext); in getRotationLockOrientation()
68 return RotationPolicy.isRotationLocked(mContext); in isRotationLocked()
72 RotationPolicy.setRotationLock(mContext, locked); in setRotationLocked()
76 RotationPolicy.setRotationLockAtAngle(mContext, locked, rotation); in setRotationLockedAtAngle()
80 return RotationPolicy.isRotationLockToggleVisible(mContext); in isRotationLockAffordanceVisible()
86 RotationPolicy.registerRotationPolicyListener(mContext, mRotationPolicyListener, in setListening()
89 RotationPolicy.unregisterRotationPolicyListener(mContext, mRotationPolicyListener); in setListening()
100 callback.onRotationLockStateChanged(RotationPolicy.isRotationLocked(mContext), in notifyChanged()
[all …]
/frameworks/base/core/tests/coretests/src/android/util/
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()
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/
DEabProviderTest.java53 (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 …]

12345678910>>...94