Home
last modified time | relevance | path

Searched refs:mMockResolver (Results 1 – 3 of 3) sorted by relevance

/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/
DBatterySaverUtilsTest.java52 private ContentResolver mMockResolver; field in BatterySaverUtilsTest
61 when(mMockContext.getContentResolver()).thenReturn(mMockResolver); in setUp()
68 Secure.putString(mMockResolver, Secure.LOW_POWER_WARNING_ACKNOWLEDGED, "null"); in testSetPowerSaveMode_enable_firstCall_needWarning()
69 Secure.putString(mMockResolver, Secure.LOW_POWER_MANUAL_ACTIVATION_COUNT, "null"); in testSetPowerSaveMode_enable_firstCall_needWarning()
78 Secure.getInt(mMockResolver, Secure.LOW_POWER_WARNING_ACKNOWLEDGED, -1)); in testSetPowerSaveMode_enable_firstCall_needWarning()
80 Secure.getInt(mMockResolver, Secure.LOW_POWER_MANUAL_ACTIVATION_COUNT, -2)); in testSetPowerSaveMode_enable_firstCall_needWarning()
85 Secure.putInt(mMockResolver, Secure.LOW_POWER_WARNING_ACKNOWLEDGED, 1); // Already acked. in testSetPowerSaveMode_enable_secondCall_needWarning()
86 Secure.putString(mMockResolver, Secure.LOW_POWER_MANUAL_ACTIVATION_COUNT, "null"); in testSetPowerSaveMode_enable_secondCall_needWarning()
93 assertEquals(1, Secure.getInt(mMockResolver, Secure.LOW_POWER_WARNING_ACKNOWLEDGED, -1)); in testSetPowerSaveMode_enable_secondCall_needWarning()
94 assertEquals(1, Secure.getInt(mMockResolver, Secure.LOW_POWER_MANUAL_ACTIVATION_COUNT, -2)); in testSetPowerSaveMode_enable_secondCall_needWarning()
[all …]
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DDisplayRotationTests.java102 private ContentResolver mMockResolver; field in DisplayRotationTests
158 assertEquals(0, Settings.System.getInt(mMockResolver, in testLocksUserRotation_LockRotation_DefaultDisplay()
160 assertEquals(Surface.ROTATION_180, Settings.System.getInt(mMockResolver, in testLocksUserRotation_LockRotation_DefaultDisplay()
185 assertEquals(1, Settings.System.getInt(mMockResolver, in testPersistUserRotation_UnlockRotation_DefaultDisplay()
701 verify(mMockResolver, atMost(1)).registerContentObserver( in captureObservers()
711 verify(mMockResolver, atMost(1)).registerContentObserver( in captureObservers()
721 verify(mMockResolver, atMost(1)).registerContentObserver( in captureObservers()
810 mMockResolver = mock(ContentResolver.class); in build()
811 when(mMockContext.getContentResolver()).thenReturn(mMockResolver); in build()
813 when(mMockResolver.acquireProvider(Settings.AUTHORITY)) in build()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/
DAlarmManagerServiceTest.java111 private ContentResolver mMockResolver; field in AlarmManagerServiceTest
264 when(mMockContext.getContentResolver()).thenReturn(mMockResolver); in setUp()
266 Settings.Global.getString(mMockResolver, Settings.Global.ALARM_MANAGER_CONSTANTS)); in setUp()
345 doReturn(constantsBuilder.toString()).when(() -> Settings.Global.getString(mMockResolver, in setQuotasEnabled()
422 doReturn(constantsBuilder.toString()).when(() -> Settings.Global.getString(mMockResolver, in testUpdateConstants()
437 Settings.Global.getString(mMockResolver, Settings.Global.ALARM_MANAGER_CONSTANTS)); in testMinFuturity()