/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 | DeviceConfigServiceTest.java | 51 private ContentResolver mContentResolver; field in DeviceConfigServiceTest 55 mContentResolver = InstrumentationRegistry.getContext().getContentResolver(); in setUp() 60 deleteFromContentProvider(mContentResolver, sNamespace, sKey); in cleanUp() 68 String result = getFromContentProvider(mContentResolver, sNamespace, sKey); in testPut() 75 result = getFromContentProvider(mContentResolver, sNamespace, sKey); in testPut() 77 result = getFromContentProvider(mContentResolver, newNamespace, sKey); in testPut() 80 deleteFromContentProvider(mContentResolver, newNamespace, sKey); in testPut() 88 String result = getFromContentProvider(mContentResolver, sNamespace, sKey); in testPut_invalidArgs() 95 result = getFromContentProvider(mContentResolver, sNamespace, sKey); in testPut_invalidArgs() 104 putWithContentProvider(mContentResolver, sNamespace, sKey, sValue); in testDelete() [all …]
|
D | SettingsHelperRestoreTest.java | 45 private ContentResolver mContentResolver; field in SettingsHelperRestoreTest 51 mContentResolver = mContext.getContentResolver(); in setUp() 66 Settings.Secure.putFloat(mContentResolver, settingName, configuredSettingValue); in testRestoreAccessibilityDisplayMagnificationScale_alreadyConfigured_doesNotRestoreValue() 70 mContentResolver, in testRestoreAccessibilityDisplayMagnificationScale_alreadyConfigured_doesNotRestoreValue() 79 Settings.Secure.getFloat(mContentResolver, settingName), in testRestoreAccessibilityDisplayMagnificationScale_alreadyConfigured_doesNotRestoreValue() 93 mContentResolver, in testRestoreAccessibilityDisplayMagnificationScale_notAlreadyConfigured_restoresValue() 102 Settings.Secure.getFloat(mContentResolver, settingName), in testRestoreAccessibilityDisplayMagnificationScale_notAlreadyConfigured_restoresValue() 118 mContentResolver, in setDefaultAccessibilityDisplayMagnificationScale() 132 Settings.Secure.putInt(mContentResolver, settingName, configuredSettingValue); in testRestoreAccessibilityDisplayMagnificationNavbarEnabled_alreadyConfigured_doesNotRestoreValue() 136 mContentResolver, in testRestoreAccessibilityDisplayMagnificationNavbarEnabled_alreadyConfigured_doesNotRestoreValue() [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/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | DeviceProvisionedControllerImpl.java | 45 private final ContentResolver mContentResolver; field in DeviceProvisionedControllerImpl 58 mContentResolver = context.getContentResolver(); in DeviceProvisionedControllerImpl() 76 return Global.getInt(mContentResolver, Global.DEVICE_PROVISIONED, 0) != 0; in isDeviceProvisioned() 81 return Secure.getIntForUser(mContentResolver, Secure.USER_SETUP_COMPLETE, 0, currentUser) in isUserSetup() 109 mContentResolver.registerContentObserver(mDeviceProvisionedUri, true, in startListening() 111 mContentResolver.registerContentObserver(mUserSetupUri, true, in startListening() 118 mContentResolver.unregisterContentObserver(mSettingsObserver); in stopListening() 123 mContentResolver.unregisterContentObserver(mSettingsObserver); in onUserSwitched() 124 mContentResolver.registerContentObserver(mDeviceProvisionedUri, true, in onUserSwitched() 126 mContentResolver.registerContentObserver(mUserSetupUri, true, in onUserSwitched()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/tuner/ |
D | TunerServiceImpl.java | 78 private ContentResolver mContentResolver; field in TunerServiceImpl 88 mContentResolver = mContext.getContentResolver(); in TunerServiceImpl() 125 Settings.Secure.putStringForUser(mContentResolver, in upgradeTuner() 145 return Settings.Secure.getStringForUser(mContentResolver, setting, mCurrentUser); in getValue() 150 Settings.Secure.putStringForUser(mContentResolver, setting, value, mCurrentUser); in setValue() 155 return Settings.Secure.getIntForUser(mContentResolver, setting, def, mCurrentUser); in getValue() 160 String ret = Secure.getStringForUser(mContentResolver, setting, mCurrentUser); in getValue() 167 Settings.Secure.putIntForUser(mContentResolver, setting, value, mCurrentUser); in setValue() 189 mContentResolver.registerContentObserver(uri, false, mObserver, mCurrentUser); in addTunable() 192 String value = Settings.Secure.getStringForUser(mContentResolver, key, mCurrentUser); in addTunable() [all …]
|
/frameworks/base/tests/net/java/com/android/server/connectivity/ |
D | DnsManagerTest.java | 73 MockContentResolver mContentResolver; field in DnsManagerTest 82 mContentResolver = new MockContentResolver(); in setUp() 83 mContentResolver.addProvider(Settings.AUTHORITY, in setUp() 85 when(mCtx.getContentResolver()).thenReturn(mContentResolver); in setUp() 89 Settings.Global.putString(mContentResolver, PRIVATE_DNS_DEFAULT_MODE, ""); in setUp() 90 Settings.Global.putString(mContentResolver, PRIVATE_DNS_MODE, ""); in setUp() 91 Settings.Global.putString(mContentResolver, PRIVATE_DNS_SPECIFIER, ""); in setUp() 130 Settings.Global.putString(mContentResolver, in testTrackedValidationUpdates() 132 Settings.Global.putString(mContentResolver, PRIVATE_DNS_SPECIFIER, "strictmode.com"); in testTrackedValidationUpdates() 225 Settings.Global.putString(mContentResolver, PRIVATE_DNS_MODE, PRIVATE_DNS_MODE_OFF); in testIgnoreUntrackedValidationUpdates() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ |
D | CoreSettingsObserverTest.java | 67 private MockContentResolver mContentResolver; field in CoreSettingsObserverTest 89 mContentResolver = new MockContentResolver(mContext); in setUp() 90 mContentResolver.addProvider(Settings.AUTHORITY, new FakeSettingsProvider()); in setUp() 91 when(mContext.getContentResolver()).thenReturn(mContentResolver); in setUp() 99 Settings.Secure.putInt(mContentResolver, TEST_SETTING_SECURE_INT, TEST_INT); in testPopulateSettings() 100 Settings.Global.putFloat(mContentResolver, TEST_SETTING_GLOBAL_FLOAT, TEST_FLOAT); in testPopulateSettings() 101 Settings.System.putString(mContentResolver, TEST_SETTING_SYSTEM_STRING, TEST_STRING); in testPopulateSettings() 127 Settings.Secure.putInt(mContentResolver, TEST_SETTING_SECURE_INT, TEST_INT); in testPopulateSettings_settingDeleted() 128 Settings.Global.putFloat(mContentResolver, TEST_SETTING_GLOBAL_FLOAT, TEST_FLOAT); in testPopulateSettings_settingDeleted() 129 Settings.System.putString(mContentResolver, TEST_SETTING_SYSTEM_STRING, TEST_STRING); in testPopulateSettings_settingDeleted() [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/accessibility/ |
D | AccessibilityShortcutControllerTest.java | 120 private MockContentResolver mContentResolver; field in AccessibilityShortcutControllerTest 137 mContentResolver = new MockContentResolver(mContext); in setUp() 138 mContentResolver.addProvider(Settings.AUTHORITY, new FakeSettingsProvider()); in setUp() 139 when(mContext.getContentResolver()).thenReturn(mContentResolver); in setUp() 242 mContentResolver, ACCESSIBILITY_SHORTCUT_ON_LOCK_SCREEN, null); in testShortcutAvailable_onLockScreenAndLockScreenPreferenceUnset() 243 Settings.Secure.putInt(mContentResolver, ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN, 0); in testShortcutAvailable_onLockScreenAndLockScreenPreferenceUnset() 245 Settings.Secure.putInt(mContentResolver, ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN, 1); in testShortcutAvailable_onLockScreenAndLockScreenPreferenceUnset() 254 Settings.Secure.putString(mContentResolver, ACCESSIBILITY_SHORTCUT_TARGET_SERVICE, ""); in testShortcutAvailable_whenServiceIdBecomesNull_shouldReturnFalse() 323 Settings.Secure.putInt(mContentResolver, ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN, 0); in testOnAccessibilityShortcut_firstTime_showsWarningDialog() 327 mContentResolver, ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN, 0)); in testOnAccessibilityShortcut_firstTime_showsWarningDialog() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/ |
D | KeyguardSliceProviderTest.java | 72 private ContentResolver mContentResolver; field in KeyguardSliceProviderTest 137 verify(mContentResolver).notifyChange(eq(mProvider.getUri()), eq(null)); in updatesClock() 158 verify(mContentResolver).notifyChange(eq(mProvider.getUri()), eq(null)); in updatingNextAlarmInvalidatesSlice() 164 verify(mContentResolver).notifyChange(eq(mProvider.getUri()), eq(null)); in onZenChanged_updatesSlice() 183 reset(mContentResolver); in onMetadataChanged_updatesSlice() 185 verify(mContentResolver).notifyChange(eq(mProvider.getUri()), eq(null)); in onMetadataChanged_updatesSlice() 188 reset(mContentResolver); in onMetadataChanged_updatesSlice() 190 verify(mContentResolver).notifyChange(eq(mProvider.getUri()), eq(null)); in onMetadataChanged_updatesSlice() 197 reset(mContentResolver); in onDozingChanged_updatesSliceIfMedia() 200 verify(mContentResolver).notifyChange(eq(mProvider.getUri()), eq(null)); in onDozingChanged_updatesSliceIfMedia() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/ |
D | ZenDurationDialogTest.java | 45 private ContentResolver mContentResolver; field in ZenDurationDialogTest 51 mContentResolver = RuntimeEnvironment.application.getContentResolver(); in setup() 62 Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION, in testAlwaysPrompt() 76 Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION, in testForever() 90 Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION, 45); in testSpecificDuration() 103 Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION, in testChooseAlwaysPromptSetting() 111 assertEquals(Settings.Secure.ZEN_DURATION_PROMPT, Settings.Secure.getInt(mContentResolver, in testChooseAlwaysPromptSetting() 117 Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION, in testChooseForeverSetting() 125 assertEquals(Settings.Secure.ZEN_DURATION_FOREVER, Settings.Secure.getInt(mContentResolver, in testChooseForeverSetting() 131 Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION, in testChooseTimeSetting() [all …]
|
/frameworks/base/core/java/android/content/ |
D | ContentProviderClient.java | 78 private final ContentResolver mContentResolver; field in ContentProviderClient 103 mContentResolver = contentResolver; in ContentProviderClient() 203 mContentResolver.unstableProviderDied(mContentProvider); in query() 221 mContentResolver.unstableProviderDied(mContentProvider); in getType() 241 mContentResolver.unstableProviderDied(mContentProvider); in getStreamTypes() 259 mContentResolver.unstableProviderDied(mContentProvider); in canonicalize() 277 mContentResolver.unstableProviderDied(mContentProvider); in uncanonicalize() 302 mContentResolver.unstableProviderDied(mContentProvider); in refresh() 321 mContentResolver.unstableProviderDied(mContentProvider); in insert() 341 mContentResolver.unstableProviderDied(mContentProvider); in bulkInsert() [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/keyguard/clock/ |
D | SettingsWrapper.java | 29 private ContentResolver mContentResolver; field in SettingsWrapper 32 mContentResolver = contentResolver; in SettingsWrapper() 41 return Settings.Secure.getStringForUser(mContentResolver, CUSTOM_CLOCK_FACE, userId); in getLockScreenCustomClockFace() 50 return Settings.Secure.getStringForUser(mContentResolver, DOCKED_CLOCK_FACE, userId); in getDockedClockFace()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | CarrierInfoManager.java | 78 ContentResolver mContentResolver = context.getContentResolver(); in getCarrierInfoForImsiEncryption() local 82 findCursor = mContentResolver.query(Telephony.CarrierColumns.CONTENT_URI, columns, in getCarrierInfoForImsiEncryption() 117 ContentResolver mContentResolver = context.getContentResolver(); in updateOrInsertCarrierKey() local 134 mContentResolver.insert(Telephony.CarrierColumns.CONTENT_URI, contentValues); in updateOrInsertCarrierKey() 144 int nRows = mContentResolver.update(Telephony.CarrierColumns.CONTENT_URI, in updateOrInsertCarrierKey() 224 ContentResolver mContentResolver = context.getContentResolver(); in deleteCarrierInfoForImsiEncryption() local 228 mContentResolver.delete(Telephony.CarrierColumns.CONTENT_URI, whereClause, whereArgs); in deleteCarrierInfoForImsiEncryption() 240 ContentResolver mContentResolver = context.getContentResolver(); in deleteAllCarrierKeysForImsiEncryption() local 242 mContentResolver.delete(Telephony.CarrierColumns.CONTENT_URI, null, null); in deleteAllCarrierKeysForImsiEncryption()
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | CarrierAppUtilsTest.java | 60 private MockContentResolver mContentResolver; field in CarrierAppUtilsTest 70 mContentResolver = new MockContentResolver(); in setUp() 72 mContentResolver.addProvider(Settings.AUTHORITY, mContentProvider); in setUp() 74 mContentResolver, Settings.Secure.CARRIER_APPS_HANDLED, 0, USER_ID); in setUp() 81 mTelephonyManager, mContentResolver, USER_ID, new ArraySet<>(), in testDisableCarrierAppsUntilPrivileged_EmptyList() 96 mTelephonyManager, mContentResolver, USER_ID, in testDisableCarrierAppsUntilPrivileged_MissingApp() 117 mTelephonyManager, mContentResolver, USER_ID, CARRIER_APPS, ASSOCIATED_APPS); in testDisableCarrierAppsUntilPrivileged_NonSystemApp() 146 mTelephonyManager, mContentResolver, USER_ID, CARRIER_APPS, ASSOCIATED_APPS); in testDisableCarrierAppsUntilPrivileged_HasPrivileges_DisabledUser() 169 mTelephonyManager, mContentResolver, USER_ID, CARRIER_APPS, ASSOCIATED_APPS); in testDisableCarrierAppsUntilPrivileged_HasPrivileges_Disabled() 192 mTelephonyManager, mContentResolver, USER_ID, CARRIER_APPS, ASSOCIATED_APPS); in testDisableCarrierAppsUntilPrivileged_HasPrivileges_Enabled() [all …]
|
/frameworks/base/services/robotests/backup/src/com/android/server/backup/ |
D | BackupAgentTimeoutParametersTest.java | 40 private ContentResolver mContentResolver; field in BackupAgentTimeoutParametersTest 48 mContentResolver = context.getContentResolver(); in setUp() 49 mParameters = new BackupAgentTimeoutParameters(new Handler(), mContentResolver); in setUp() 152 Settings.Global.putString(mContentResolver, BackupAgentTimeoutParameters.SETTING, value); in putStringAndNotify() 156 mContentResolver.notifyChange( in putStringAndNotify()
|
/frameworks/opt/vcard/java/com/android/vcard/ |
D | VCardEntryCommitter.java | 43 private final ContentResolver mContentResolver; field in VCardEntryCommitter 50 mContentResolver = resolver; in VCardEntryCommitter() 71 mOperationList = vcardEntry.constructInsertOperations(mContentResolver, mOperationList); in onEntryCreated() 83 final ContentProviderResult[] results = mContentResolver.applyBatch( in pushIntoContentResolver()
|
/frameworks/base/core/java/android/view/accessibility/ |
D | CaptioningManager.java | 52 private final ContentResolver mContentResolver; field in CaptioningManager 61 mContentResolver = context.getContentResolver(); in CaptioningManager() 72 mContentResolver, Secure.ACCESSIBILITY_CAPTIONING_ENABLED, DEFAULT_ENABLED) == 1; in isEnabled() 82 return Secure.getString(mContentResolver, Secure.ACCESSIBILITY_CAPTIONING_LOCALE); in getRawLocale() 113 mContentResolver, Secure.ACCESSIBILITY_CAPTIONING_FONT_SCALE, DEFAULT_FONT_SCALE); in getFontScale() 122 mContentResolver, Secure.ACCESSIBILITY_CAPTIONING_PRESET, DEFAULT_PRESET); in getRawUserStyle() 133 return CaptionStyle.getCustomStyle(mContentResolver); in getUserStyle() 165 mContentResolver.registerContentObserver(Secure.getUriFor(key), false, mContentObserver); in registerObserver() 179 mContentResolver.unregisterContentObserver(mContentObserver); in removeCaptioningChangeListener()
|
/frameworks/base/core/java/android/database/ |
D | AbstractCursor.java | 74 protected ContentResolver mContentResolver; field in AbstractCursor 153 mContentResolver.unregisterContentObserver(mSelfObserver); in onDeactivateOrClose() 165 mContentResolver.registerContentObserver(notifyUri, true, mSelfObserver); in requery() 399 mContentResolver.notifyChange(notifyUri, mSelfObserver); in onChange() 437 mContentResolver = cr; in setNotificationUris() 439 mContentResolver.unregisterContentObserver(mSelfObserver); in setNotificationUris() 447 mContentResolver.registerContentObserver( in setNotificationUris() 522 mContentResolver.unregisterContentObserver(mSelfObserver); in finalize()
|
/frameworks/opt/chips/src/com/android/ex/chips/ |
D | DefaultPhotoManager.java | 55 private final ContentResolver mContentResolver; field in DefaultPhotoManager 59 mContentResolver = contentResolver; in DefaultPhotoManager() 92 final Cursor photoCursor = mContentResolver.query( in fetchPhotoAsync() 108 InputStream is = mContentResolver.openInputStream( in fetchPhotoAsync()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/applications/ |
D | ServiceListing.java | 43 private final ContentResolver mContentResolver; field in ServiceListing 58 mContentResolver = context.getContentResolver(); in ServiceListing() 87 mContentResolver.registerContentObserver(Settings.Secure.getUriFor(mSetting), in setListening() 91 mContentResolver.unregisterContentObserver(mSettingsObserver); in setListening() 105 Settings.Secure.putString(mContentResolver, mSetting, in saveEnabledServices() 111 final String flat = Settings.Secure.getString(mContentResolver, mSetting); in loadEnabledServices()
|
/frameworks/base/services/core/java/com/android/server/gpu/ |
D | GpuService.java | 74 private ContentResolver mContentResolver; field in GpuService 106 mContentResolver = mContext.getContentResolver(); in onBootPhase() 124 mContentResolver.registerContentObserver(mGameDriverBlackUri, false, this, in SettingsObserver() 230 Settings.Global.putString(mContentResolver, in fetchGameDriverPackageProperties() 252 Settings.Global.getString(mContentResolver, in processBlacklists() 277 Settings.Global.putString(mContentResolver, in setBlacklist() 286 Settings.Global.putString(mContentResolver, in setBlacklist()
|
/frameworks/base/services/accessibility/java/com/android/server/accessibility/ |
D | AutoclickController.java | 151 private ContentResolver mContentResolver; field in AutoclickController.ClickDelayObserver 173 if (mContentResolver != null || mClickScheduler != null) { in start() 183 mContentResolver = contentResolver; in start() 185 mContentResolver.registerContentObserver(mAutoclickDelaySettingUri, false, this, in start() 199 if (mContentResolver == null || mClickScheduler == null) { in stop() 203 mContentResolver.unregisterContentObserver(this); in stop() 210 mContentResolver, Settings.Secure.ACCESSIBILITY_AUTOCLICK_DELAY, in onChange()
|