/frameworks/base/tests/testables/tests/src/android/testing/ |
D | TestableSettingsProviderTest.java | 39 private ContentResolver mContentResolver; field in TestableSettingsProviderTest 46 mContentResolver = mContext.getContentResolver(); in setup() 47 Settings.Secure.putString(mContentResolver, NONEXISTENT_SETTING, null); in setup() 48 Settings.Global.putString(mContentResolver, NONEXISTENT_SETTING, "initial value"); in setup() 49 Settings.Global.putString(mContentResolver, Global.DEVICE_PROVISIONED, null); in setup() 54 String value = Secure.getString(mContentResolver, NONEXISTENT_SETTING); in testInitialValueSecure() 60 String value = Global.getString(mContentResolver, NONEXISTENT_SETTING); in testInitialValueGlobal() 66 Secure.putString(mContentResolver, NONEXISTENT_SETTING, "something"); in testSeparateTables() 67 Global.putString(mContentResolver, NONEXISTENT_SETTING, "else"); in testSeparateTables() 68 assertEquals("something", Secure.getString(mContentResolver, NONEXISTENT_SETTING)); in testSeparateTables() [all …]
|
D | TestableContentResolverTest.java | 22 private TestableContentResolver mContentResolver; field in TestableContentResolverTest 26 mContentResolver = new TestableContentResolver(mContext); in setup() 27 mContentResolver.setFallbackToExisting(false); in setup() 35 mContentResolver.addProvider("test", provider); in testDefaultContentProvider() 37 Assert.assertEquals(iprovider, mContentResolver.acquireProvider(mContext, "test")); in testDefaultContentProvider() 38 Assert.assertEquals(iprovider, mContentResolver.acquireUnstableProvider(mContext, "test")); in testDefaultContentProvider() 46 mContentResolver.addProvider("test", provider, TestableContentResolver.STABLE); in testStableContentProvider() 48 Assert.assertEquals(iprovider, mContentResolver.acquireProvider(mContext, "test")); in testStableContentProvider() 49 Assert.assertNull(mContentResolver.acquireUnstableProvider(mContext, "test")); in testStableContentProvider() 57 mContentResolver.addProvider("test", provider, TestableContentResolver.UNSTABLE); in testUnstableContentProvider() [all …]
|
/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/ |
D | SettingsHelperTest.java | 85 @Mock private MockContentResolver mContentResolver; field in SettingsHelperTest 99 mContentResolver = spy(new MockContentResolver()); in setUp() 100 when(mContext.getContentResolver()).thenReturn(mContentResolver); in setUp() 102 mContentResolver.addProvider(Settings.AUTHORITY, mSettingsProvider); in setUp() 107 Settings.Global.putString(mContentResolver, Settings.Global.POWER_BUTTON_LONG_PRESS, in tearDown() 109 Settings.Global.putString(mContentResolver, Settings.Global.KEY_CHORD_POWER_VOLUME_UP, in tearDown() 132 mSettingsHelper.restoreValue(mContext, mContentResolver, new ContentValues(), Uri.EMPTY, in testRestoreValue_settingReplaced_doesNotRestore() 136 verify(mContentResolver, times(1)) in testRestoreValue_settingReplaced_doesNotRestore() 139 verifyNoMoreInteractions(mContentResolver); in testRestoreValue_settingReplaced_doesNotRestore() 148 mSettingsHelper.restoreValue(mContext, mContentResolver, new ContentValues(), Uri.EMPTY, in testRestoreValue_lppForAssistantEnabled_updatesValue() [all …]
|
D | DeviceConfigServiceTest.java | 59 private ContentResolver mContentResolver; field in DeviceConfigServiceTest 67 mContentResolver = InstrumentationRegistry.getContext().getContentResolver(); in setUp() 72 deleteFromContentProvider(mContentResolver, sNamespace, sKey); in cleanUp() 113 String result = getFromContentProvider(mContentResolver, sNamespace, sKey); in testPut() 120 result = getFromContentProvider(mContentResolver, sNamespace, sKey); in testPut() 122 result = getFromContentProvider(mContentResolver, newNamespace, sKey); in testPut() 125 deleteFromContentProvider(mContentResolver, newNamespace, sKey); in testPut() 133 String result = getFromContentProvider(mContentResolver, sNamespace, sKey); in testPut_invalidArgs() 140 result = getFromContentProvider(mContentResolver, sNamespace, sKey); in testPut_invalidArgs() 149 putWithContentProvider(mContentResolver, sNamespace, sKey, sValue); in testDelete() [all …]
|
D | SettingsHelperRestoreTest.java | 61 private ContentResolver mContentResolver; field in SettingsHelperRestoreTest 67 mContentResolver = mContext.getContentResolver(); in setUp() 82 Settings.Secure.putFloat(mContentResolver, settingName, configuredSettingValue); in testRestoreAccessibilityDisplayMagnificationScale_alreadyConfigured_doesNotRestoreValue() 86 mContentResolver, in testRestoreAccessibilityDisplayMagnificationScale_alreadyConfigured_doesNotRestoreValue() 95 Settings.Secure.getFloat(mContentResolver, settingName), in testRestoreAccessibilityDisplayMagnificationScale_alreadyConfigured_doesNotRestoreValue() 109 mContentResolver, in testRestoreAccessibilityDisplayMagnificationScale_notAlreadyConfigured_restoresValue() local 118 Settings.Secure.getFloat(mContentResolver, settingName), in testRestoreAccessibilityDisplayMagnificationScale_notAlreadyConfigured_restoresValue() 134 mContentResolver, in setDefaultAccessibilityDisplayMagnificationScale() 148 Settings.Secure.putInt(mContentResolver, settingName, configuredSettingValue); in testRestoreAccessibilityDisplayMagnificationNavbarEnabled_alreadyConfigured_doesNotRestoreValue() 152 mContentResolver, in testRestoreAccessibilityDisplayMagnificationNavbarEnabled_alreadyConfigured_doesNotRestoreValue() local [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/usage/ |
D | StorageStatsServiceTest.java | 31 private MockContentResolver mContentResolver; field in StorageStatsServiceTest 36 mContentResolver = new MockContentResolver(); in setUp() 37 mContentResolver.addProvider(Settings.AUTHORITY, new FakeSettingsProvider()); in setUp() 42 Settings.Global.putInt(mContentResolver, Settings.Global.ENABLE_CACHE_QUOTA_CALCULATION, 0); in testDontRunWhenDisabledFromSettingsGlobal() 44 assertThat(StorageStatsService.isCacheQuotaCalculationsEnabled(mContentResolver)).isFalse(); in testDontRunWhenDisabledFromSettingsGlobal() 51 mContentResolver, Settings.Global.ENABLE_CACHE_QUOTA_CALCULATION, null); in testCalculationTaskIsEnabledByDefault() 53 assertThat(StorageStatsService.isCacheQuotaCalculationsEnabled(mContentResolver)).isTrue(); in testCalculationTaskIsEnabledByDefault()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/d2d/ |
D | Timeouts.java | 28 private final ContentResolver mContentResolver; field in Timeouts.Adapter 31 mContentResolver = cr; in Adapter() 35 return Timeouts.getRtpMessageAckDurationMillis(mContentResolver); in getRtpMessageAckDurationMillis() 43 return Timeouts.getDtmfMinimumIntervalMillis(mContentResolver); in getDtmfMinimumIntervalMillis() 47 return Timeouts.getMaxDurationOfDtmfMessageMillis(mContentResolver); in getMaxDurationOfDtmfMessageMillis() 51 return Timeouts.getDtmfDurationFuzzMillis(mContentResolver); in getDtmfDurationFuzzMillis() 55 return Timeouts.getDtmfNegotiationTimeoutMillis(mContentResolver); in getDtmfNegotiationTimeoutMillis()
|
/frameworks/base/apct-tests/perftests/settingsprovider/src/android/provider/ |
D | SettingsProviderPerfTest.java | 44 private final ContentResolver mContentResolver; field in SettingsProviderPerfTest 51 mContentResolver = context.getContentResolver(); in SettingsProviderPerfTest() 56 Settings.Secure.putString(mContentResolver, SETTING_NAME1, "1"); in setUp() 63 Settings.Secure.putString(mContentResolver, SETTING_NAME1, "null"); in destroy() 75 Settings.Secure.putString(mContentResolver, SETTING_NAME2, Integer.toString(i)); in testSettingsValueConsecutiveRead() 78 Settings.Secure.getString(mContentResolver, SETTING_NAME1); in testSettingsValueConsecutiveRead() 89 Settings.Secure.putString(mContentResolver, SETTING_NAME1, Integer.toString(i)); in testSettingsValueConsecutiveReadAfterWrite() 92 Settings.Secure.getString(mContentResolver, SETTING_NAME1); in testSettingsValueConsecutiveReadAfterWrite() 100 Settings.Secure.getString(mContentResolver, UNSET_SETTING); in testSettingsValueConsecutiveReadUnset() 110 Settings.Config.getStrings(mContentResolver, NAMESPACE, names); in testSettingsNamespaceConsecutiveRead() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/settings/ |
D | SecureSettingsImpl.java | 30 private final ContentResolver mContentResolver; field in SecureSettingsImpl 35 mContentResolver = contentResolver; in SecureSettingsImpl() 41 return mContentResolver; in getContentResolver() 56 return Settings.Secure.getStringForUser(mContentResolver, name, in getStringForUser() 62 return Settings.Secure.putString(mContentResolver, name, value, overrideableByRestore); in putString() 67 return Settings.Secure.putStringForUser(mContentResolver, name, value, in putStringForUser() 75 mContentResolver, name, value, tag, makeDefault, getRealUserHandle(userHandle), in putStringForUser() 81 return Settings.Secure.putString(mContentResolver, name, value, tag, makeDefault); in putString()
|
D | GlobalSettingsImpl.java | 31 private final ContentResolver mContentResolver; field in GlobalSettingsImpl 35 mContentResolver = contentResolver; in GlobalSettingsImpl() 40 return mContentResolver; in getContentResolver() 50 return Settings.Global.getString(mContentResolver, name); in getString() 55 return Settings.Global.putString(mContentResolver, name, value); in putString() 61 return Settings.Global.putString(mContentResolver, name, value, tag, makeDefault); in putString()
|
D | SystemSettingsImpl.java | 30 private final ContentResolver mContentResolver; field in SystemSettingsImpl 35 mContentResolver = contentResolver; in SystemSettingsImpl() 41 return mContentResolver; in getContentResolver() 56 return Settings.System.getStringForUser(mContentResolver, name, in getStringForUser() 62 return Settings.System.putString(mContentResolver, name, value, overrideableByRestore); in putString() 67 return Settings.System.putStringForUser(mContentResolver, name, value, in putStringForUser()
|
/frameworks/base/services/flags/java/com/android/server/flags/ |
D | GlobalSettingsProxy.java | 24 private final ContentResolver mContentResolver; field in GlobalSettingsProxy 27 mContentResolver = contentResolver; in GlobalSettingsProxy() 32 return mContentResolver; in getContentResolver() 42 return Settings.Global.getStringForUser(mContentResolver, name, userHandle); in getStringForUser() 53 return Settings.Global.putStringForUser(mContentResolver, name, value, userHandle); in putStringForUser() 60 mContentResolver, name, value, tag, makeDefault, userHandle, in putStringForUser() 66 return Settings.Global.putString(mContentResolver, name, value, tag, makeDefault); in putString()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/accessibility/ |
D | AccessibilityShortcutControllerTest.java | 140 private MockContentResolver mContentResolver; field in AccessibilityShortcutControllerTest 157 mContentResolver = new MockContentResolver(mContext); in setUp() 158 mContentResolver.addProvider(Settings.AUTHORITY, new FakeSettingsProvider()); in setUp() 160 when(mContext.getContentResolver()).thenReturn(mContentResolver); in setUp() 278 mContentResolver, ACCESSIBILITY_SHORTCUT_ON_LOCK_SCREEN, null); in testShortcutAvailable_onLockScreenAndLockScreenPreferenceUnset() 280 mContentResolver, ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN, in testShortcutAvailable_onLockScreenAndLockScreenPreferenceUnset() 284 mContentResolver, ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN, in testShortcutAvailable_onLockScreenAndLockScreenPreferenceUnset() 368 mContentResolver, ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN, in testOnAccessibilityShortcut_firstTime_showsWarningDialog() 373 mContentResolver, ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN, in testOnAccessibilityShortcut_firstTime_showsWarningDialog() 391 Settings.Secure.putInt(mContentResolver, ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN, in testOnAccessibilityShortcut_withDialogShowing_callsServer() [all …]
|
/frameworks/base/services/accessibility/java/com/android/server/accessibility/magnification/ |
D | OneFingerPanningSettingsProvider.java | 44 ContentResolver mContentResolver; field in OneFingerPanningSettingsProvider 58 mContentResolver = context.getContentResolver(); in OneFingerPanningSettingsProvider() 66 mContentResolver.registerContentObserver(URI, false, mObserver); in OneFingerPanningSettingsProvider() 79 if (mContentResolver != null) { in unregister() 80 mContentResolver.unregisterContentObserver(mObserver); in unregister() 82 mContentResolver = null; in unregister() 87 mContentResolver, in isOneFingerPanningEnabledInSetting()
|
/frameworks/base/packages/SettingsLib/DeviceStateRotationLock/src/com.android.settingslib.devicestate/ |
D | AndroidSecureSettings.java | 29 private final ContentResolver mContentResolver; field in AndroidSecureSettings 32 mContentResolver = contentResolver; in AndroidSecureSettings() 37 Settings.Secure.putStringForUser(mContentResolver, name, value, userHandle); in putStringForUser() 42 return Settings.Secure.getStringForUser(mContentResolver, name, userHandle); in getStringForUser() 48 mContentResolver.registerContentObserver( in registerContentObserver()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ |
D | CoreSettingsObserverTest.java | 75 private MockContentResolver mContentResolver; field in CoreSettingsObserverTest 97 mContentResolver = new MockContentResolver(mContext); in setUp() 98 mContentResolver.addProvider(Settings.AUTHORITY, new FakeSettingsProvider()); in setUp() 99 when(mContext.getContentResolver()).thenReturn(mContentResolver); in setUp() 117 Settings.Secure.putInt(mContentResolver, TEST_SETTING_SECURE_INT, TEST_INT); in testPopulateSettings() 118 Settings.Global.putFloat(mContentResolver, TEST_SETTING_GLOBAL_FLOAT, TEST_FLOAT); in testPopulateSettings() 119 Settings.System.putString(mContentResolver, TEST_SETTING_SYSTEM_STRING, TEST_STRING); in testPopulateSettings() 145 Settings.Secure.putInt(mContentResolver, TEST_SETTING_SECURE_INT, TEST_INT); in testPopulateSettings_settingDeleted() 146 Settings.Global.putFloat(mContentResolver, TEST_SETTING_GLOBAL_FLOAT, TEST_FLOAT); in testPopulateSettings_settingDeleted() 147 Settings.System.putString(mContentResolver, TEST_SETTING_SYSTEM_STRING, TEST_STRING); in testPopulateSettings_settingDeleted() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/ |
D | ZenDurationDialogTest.java | 47 private ContentResolver mContentResolver; field in ZenDurationDialogTest 53 mContentResolver = RuntimeEnvironment.application.getContentResolver(); in setup() 64 Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION, in testAlwaysPrompt() 78 Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION, in testForever() 92 Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION, 45); in testSpecificDuration() 105 Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION, in testChooseAlwaysPromptSetting() 113 assertEquals(Settings.Secure.ZEN_DURATION_PROMPT, Settings.Secure.getInt(mContentResolver, in testChooseAlwaysPromptSetting() 119 Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION, in testChooseForeverSetting() 127 assertEquals(Settings.Secure.ZEN_DURATION_FOREVER, Settings.Secure.getInt(mContentResolver, in testChooseForeverSetting() 133 Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION, in testChooseTimeSetting() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/ |
D | KeyguardSliceProviderTest.java | 80 private ContentResolver mContentResolver; field in KeyguardSliceProviderTest 111 reset(mContentResolver); in setup() 171 clearInvocations(mContentResolver); in updatesClock() 174 verify(mContentResolver).notifyChange(eq(mProvider.getUri()), eq(null)); in updatesClock() 195 verify(mContentResolver).notifyChange(eq(mProvider.getUri()), eq(null)); in updatingNextAlarmInvalidatesSlice() 201 verify(mContentResolver).notifyChange(eq(mProvider.getUri()), eq(null)); in onZenChanged_updatesSlice() 220 reset(mContentResolver); in onMetadataChanged_updatesSlice() 224 verify(mContentResolver).notifyChange(eq(mProvider.getUri()), eq(null)); in onMetadataChanged_updatesSlice() 227 reset(mContentResolver); in onMetadataChanged_updatesSlice() 230 verify(mContentResolver).notifyChange(eq(mProvider.getUri()), eq(null)); in onMetadataChanged_updatesSlice() [all …]
|
/frameworks/opt/car/setupwizard/library/main/tests/robotests/src/com/android/car/setupwizardlib/util/ |
D | FeatureResolverTest.java | 48 private ContentResolver mContentResolver; field in FeatureResolverTest 60 doReturn(mContentResolver).when(mContext).getContentResolver(); in setUp() 79 doReturn(bundle).when(mContentResolver).call((Uri) any(), any(), any(), any()); in testIsSplitNavLayoutFeatureEnabled_whenReturnsTrue() 90 doReturn(bundle).when(mContentResolver).call((Uri) any(), any(), any(), any()); in testIsSplitNavLayoutFeatureEnabled_whenReturnsFalse() 99 doReturn(null).when(mContentResolver).call((Uri) any(), any(), any(), any()); in testIsSplitNavLayoutFeatureEnabled_whenReturnsBundleNull() 110 doReturn(bundle).when(mContentResolver).call((Uri) any(), any(), any(), any()); in testGetGModalVersion_whenVersionNumber1() 121 doReturn(bundle).when(mContentResolver).call((Uri) any(), any(), any(), any()); in testGModalVersion_whenVersionNumber0() 130 doReturn(null).when(mContentResolver).call((Uri) any(), any(), any(), any()); in testGetGModalVersion_whenReturnsBundleNull()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/tuner/ |
D | TunerServiceImpl.java | 95 private ContentResolver mContentResolver; field in TunerServiceImpl 114 mContentResolver = mContext.getContentResolver(); in TunerServiceImpl() 155 Settings.Secure.putStringForUser(mContentResolver, in upgradeTuner() 175 return Settings.Secure.getStringForUser(mContentResolver, setting, mCurrentUser); in getValue() 180 Settings.Secure.putStringForUser(mContentResolver, setting, value, mCurrentUser); in setValue() 185 return Settings.Secure.getIntForUser(mContentResolver, setting, def, mCurrentUser); in getValue() 190 String ret = Secure.getStringForUser(mContentResolver, setting, mCurrentUser); in getValue() 197 Settings.Secure.putIntForUser(mContentResolver, setting, value, mCurrentUser); in setValue() 219 mContentResolver.registerContentObserver(uri, false, mObserver, mCurrentUser); in addTunable() 223 .getStringForUser(mContentResolver, key, mCurrentUser)); in addTunable() [all …]
|
/frameworks/base/core/java/android/content/ |
D | ContentProviderClient.java | 77 private final ContentResolver mContentResolver; field in ContentProviderClient 104 mContentResolver = contentResolver; in ContentProviderClient() 205 mContentResolver.unstableProviderDied(mContentProvider); in query() 223 mContentResolver.unstableProviderDied(mContentProvider); in getType() 243 mContentResolver.unstableProviderDied(mContentProvider); in getStreamTypes() 261 mContentResolver.unstableProviderDied(mContentProvider); in canonicalize() 279 mContentResolver.unstableProviderDied(mContentProvider); in uncanonicalize() 305 mContentResolver.unstableProviderDied(mContentProvider); in refresh() 325 mContentResolver.unstableProviderDied(mContentProvider); in checkUriPermission() 351 mContentResolver.unstableProviderDied(mContentProvider); in insert() [all …]
|
D | DefaultDataHandler.java | 85 private ContentResolver mContentResolver; field in DefaultDataHandler 89 mContentResolver = contentResolver; in insert() 95 mContentResolver = contentResolver; in insert() 128 Uri u = mContentResolver.insert(mUris.lastElement(), mValues); in insertRow() 187 mContentResolver.delete(u, atts.getValue(1), selectionArgs); in startElement() 189 mContentResolver.delete(u, atts.getValue(1), null); in startElement() 191 mContentResolver.delete(u, null, null); in startElement()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/accessibility/ |
D | SecureSettingsContentObserver.java | 47 private final ContentResolver mContentResolver; field in SecureSettingsContentObserver 60 mContentResolver = context.getContentResolver(); in SecureSettingsContentObserver() 83 mContentResolver.registerContentObserver( in addListener() 100 mContentResolver.unregisterContentObserver(mContentObserver); in removeListener() 110 return Settings.Secure.getStringForUser(mContentResolver, mKey, mUserTracker.getUserId()); in getSettingsValue()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/power/ |
D | PreRebootLoggerTest.java | 63 private MockContentResolver mContentResolver; field in PreRebootLoggerTest 78 mContentResolver = new MockContentResolver(getInstrumentation().getTargetContext()); in enableAdbConfig() 79 when(mContext.getContentResolver()).thenReturn(mContentResolver); in enableAdbConfig() 80 mContentResolver.addProvider(Settings.AUTHORITY, new FakeSettingsProvider()); in enableAdbConfig() 81 Settings.Global.putInt(mContentResolver, Settings.Global.ADB_ENABLED, 1); in enableAdbConfig() 125 Settings.Global.putInt(mContentResolver, Settings.Global.ADB_ENABLED, 0); in log_adbDisabled_wipesDumpedInformation()
|
/frameworks/base/services/core/java/com/android/server/display/brightness/clamper/ |
D | BrightnessLowLuxModifier.java | 52 private final ContentResolver mContentResolver; field in BrightnessLowLuxModifier 70 mContentResolver = context.getContentResolver(); in BrightnessLowLuxModifier() 86 mContentResolver, Settings.Secure.EVEN_DIMMER_MIN_NITS, in recalculateLowerBound() 184 mContentResolver.unregisterContentObserver(mSettingsObserver); in stop() 208 return Settings.Secure.getFloatForUser(mContentResolver, in isSettingEnabled() 222 mContentResolver.registerContentObserver( in SettingsObserver() 225 mContentResolver.registerContentObserver( in SettingsObserver()
|