Home
last modified time | relevance | path

Searched refs:mContentResolver (Results 1 – 25 of 83) sorted by relevance

1234

/packages/apps/TvSettings/Settings/src/com/android/tv/settings/system/development/
DDevelopmentFragment.java169 private ContentResolver mContentResolver; field in DevelopmentFragment
260 mContentResolver = getActivity().getContentResolver(); in onCreate()
269 || Settings.Global.getInt(mContentResolver, in onCreatePreferences()
501 mLastEnabledState = Settings.Global.getInt(mContentResolver, in onResume()
511 Settings.Global.putInt(mContentResolver, in onResume()
732 mDebugApp = Settings.Global.getString(mContentResolver, Settings.Global.DEBUG_APP); in updateDebuggerOptions()
733 updateSwitchPreference(mWaitForDebugger, Settings.Global.getInt(mContentResolver, in updateDebuggerOptions()
791 Settings.Global.getInt(mContentResolver, in updateVerifyAppsOverUsbOptions()
797 Settings.Global.putInt(mContentResolver, Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB, in writeVerifyAppsOverUsbOptions()
802 if (Settings.Global.getInt(mContentResolver, Settings.Global.ADB_ENABLED, 0) == 0) { in enableVerifierSetting()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/display/
DBrightnessLevelPreferenceControllerTest.java52 private ContentResolver mContentResolver; field in BrightnessLevelPreferenceControllerTest
65 when(mContext.getContentResolver()).thenReturn(mContentResolver); in setUp()
126 System.putInt(mContentResolver, System.SCREEN_BRIGHTNESS_FOR_VR, 85); in updateState_inVrMode_shouldSetSummaryToVrBrightness()
136 System.putInt(mContentResolver, System.SCREEN_BRIGHTNESS_MODE, in updateState_autoBrightness_shouldSetSummaryToAutoBrightness()
139 System.putFloat(mContentResolver, System.SCREEN_AUTO_BRIGHTNESS_ADJ, 0.0f); in updateState_autoBrightness_shouldSetSummaryToAutoBrightness()
149 System.putInt(mContentResolver, System.SCREEN_BRIGHTNESS_MODE, in updateState_manualBrightness_shouldSetSummaryToScreenBrightness()
152 System.putInt(mContentResolver, System.SCREEN_BRIGHTNESS, 45); in updateState_manualBrightness_shouldSetSummaryToScreenBrightness()
164 System.putInt(mContentResolver, System.SCREEN_BRIGHTNESS_FOR_VR, 105); in updateState_brightnessOutOfRange_shouldSetSummaryInRange()
168 System.putInt(mContentResolver, System.SCREEN_BRIGHTNESS_FOR_VR, -20); in updateState_brightnessOutOfRange_shouldSetSummaryInRange()
174 System.putInt(mContentResolver, System.SCREEN_BRIGHTNESS_MODE, in updateState_brightnessOutOfRange_shouldSetSummaryInRange()
[all …]
DAutoRotatePreferenceControllerTest.java61 private ContentResolver mContentResolver; field in AutoRotatePreferenceControllerTest
68 mContentResolver = RuntimeEnvironment.application.getContentResolver(); in setUp()
72 when(mContext.getContentResolver()).thenReturn(mContentResolver); in setUp()
88 Settings.System.putInt(mContentResolver, in isAvailableWhenPolicyAllows()
96 Settings.System.putIntForUser(mContentResolver, in updatePreference_settingsIsOff_shouldTurnOffToggle()
106 Settings.System.putIntForUser(mContentResolver, in updatePreference_settingsIsOn_shouldTurnOnToggle()
/packages/providers/TelephonyProvider/tests/src/com/android/providers/telephony/
DCarrierProviderTest.java54 private MockContentResolver mContentResolver; field in CarrierProviderTest
130 mContentResolver = (MockContentResolver) mContext.getContentResolver(); in setUp()
157 mContentResolver.insert(CarrierProvider.CONTENT_URI, contentValues); in testInsertCertificates()
162 Cursor countCursor = mContentResolver.query(CarrierProvider.CONTENT_URI, in testInsertCertificates()
193 mContentResolver.insert(CarrierProvider.CONTENT_URI, contentValues); in testUpdateCertificates()
201 mContentResolver.update(CarrierProvider.CONTENT_URI, updatedValues, in testUpdateCertificates()
210 Cursor findEntry = mContentResolver.query(CarrierProvider.CONTENT_URI, columns, in testUpdateCertificates()
247 mContentResolver.insert(CarrierProvider.CONTENT_URI, contentValues); in testMultipleCertificates()
248 mContentResolver.insert(CarrierProvider.CONTENT_URI, contentValuesNew); in testMultipleCertificates()
254 Cursor countCursor = mContentResolver.query(CarrierProvider.CONTENT_URI, in testMultipleCertificates()
[all …]
DTelephonyProviderTest.java71 private MockContentResolver mContentResolver; field in TelephonyProviderTest
146 mContentResolver = (MockContentResolver) mContext.getContentResolver(); in setUp()
187 int rows = mContentResolver.bulkInsert(Carriers.CONTENT_URI, values); in testBulkInsertCarriers()
203 Cursor cursor = mContentResolver.query(Carriers.CONTENT_URI, in testBulkInsertCarriers()
237 mContentResolver.insert(Carriers.CONTENT_URI, contentValues); in testInsertCarriers()
251 Cursor cursor = mContentResolver.query(Carriers.CONTENT_URI, in testInsertCarriers()
270 int numRowsDeleted = mContentResolver.delete(Carriers.CONTENT_URI, in testInsertCarriers()
275 cursor = mContentResolver.query(Carriers.CONTENT_URI, in testInsertCarriers()
299 mContentResolver.insert(SubscriptionManager.CONTENT_URI, contentValues); in testSimTable()
311 Cursor cursor = mContentResolver.query(SubscriptionManager.CONTENT_URI, in testSimTable()
[all …]
/packages/apps/Settings/src/com/android/settings/display/
DBrightnessLevelPreferenceController.java56 private final ContentResolver mContentResolver; field in BrightnessLevelPreferenceController
91 mContentResolver = mContext.getContentResolver(); in BrightnessLevelPreferenceController()
117 mContentResolver.registerContentObserver(BRIGHTNESS_MODE_URI, false, mBrightnessObserver); in onStart()
118 mContentResolver.registerContentObserver(BRIGHTNESS_URI, false, mBrightnessObserver); in onStart()
119 mContentResolver.registerContentObserver(BRIGHTNESS_FOR_VR_URI, false, mBrightnessObserver); in onStart()
120 mContentResolver.registerContentObserver(BRIGHTNESS_ADJ_URI, false, mBrightnessObserver); in onStart()
125 mContentResolver.unregisterContentObserver(mBrightnessObserver); in onStop()
136 final double value = System.getInt(mContentResolver, System.SCREEN_BRIGHTNESS_FOR_VR, in getCurrentBrightness()
140 final int brightnessMode = Settings.System.getInt(mContentResolver, in getCurrentBrightness()
143 final float value = Settings.System.getFloat(mContentResolver, in getCurrentBrightness()
[all …]
/packages/apps/Dialer/java/com/android/voicemail/impl/sync/
DVoicemailsQueryHelper.java58 private ContentResolver mContentResolver; field in VoicemailsQueryHelper
63 mContentResolver = context.getContentResolver(); in VoicemailsQueryHelper()
104 Cursor cursor = mContentResolver.query(mSourceUri, PROJECTION, selection, null, null); in getLocalVoicemails()
149 return mContentResolver.delete(Voicemails.CONTENT_URI, selectionStatement, null); in deleteFromDatabase()
154 mContentResolver.delete( in deleteNonArchivedFromDatabase()
173 mContentResolver.update(uri, contentValues, null, null); in markReadInDatabase()
197 mContentResolver.update(uri, contentValues, null, null); in markCleanInDatabase()
205 mContentResolver.update(uri, contentValues, null, null); in updateWithTranscription()
235 cursor = mContentResolver.query(mSourceUri, PROJECTION, whereClause, whereArgs, null); in isVoicemailUnique()
266 mContentResolver.update(uri, contentValues, null, null); in markArchiveInDatabase()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/
DEmergencyTonePreferenceControllerTest.java53 private ContentResolver mContentResolver; field in EmergencyTonePreferenceControllerTest
70 when(mActivity.getContentResolver()).thenReturn(mContentResolver); in setUp()
92 Global.putInt(mContentResolver, Global.EMERGENCY_TONE, 0); in displayPreference_emergencyToneOff_shouldSelectFirstItem()
101 Global.putInt(mContentResolver, Global.EMERGENCY_TONE, 1); in displayPreference_emergencyToneAlert_shouldSelectSecondItem()
110 Global.putInt(mContentResolver, Global.EMERGENCY_TONE, 2); in displayPreference_emergencyToneVibrate_shouldSelectThirdItem()
123 assertThat(Global.getInt(mContentResolver, Global.EMERGENCY_TONE, 0)).isEqualTo(0); in onPreferenceChanged_firstItemSelected_shouldSetEmergencyToneToOff()
132 assertThat(Global.getInt(mContentResolver, Global.EMERGENCY_TONE, 0)).isEqualTo(1); in onPreferenceChanged_secondItemSelected_shouldSetEmergencyToneToAlert()
141 assertThat(Global.getInt(mContentResolver, Global.EMERGENCY_TONE, 0)).isEqualTo(2); in onPreferenceChanged_thirdItemSelected_shouldSetEmergencyToneToVibrate()
DScreenLockSoundPreferenceControllerTest.java50 private ContentResolver mContentResolver; field in ScreenLockSoundPreferenceControllerTest
63 when(mActivity.getContentResolver()).thenReturn(mContentResolver); in setUp()
77 System.putInt(mContentResolver, System.LOCKSCREEN_SOUNDS_ENABLED, 1); in displayPreference_lockScreenSoundEnabled_shouldCheckedPreference()
86 System.putInt(mContentResolver, System.LOCKSCREEN_SOUNDS_ENABLED, 0); in displayPreference_lockScreenSoundDisabled_shouldUncheckedPreference()
99 assertThat(System.getInt(mContentResolver, System.LOCKSCREEN_SOUNDS_ENABLED, 1)) in onPreferenceChanged_preferenceChecked_shouldEnabledLockScreenSound()
109 assertThat(System.getInt(mContentResolver, System.LOCKSCREEN_SOUNDS_ENABLED, 1)) in onPreferenceChanged_preferenceUnchecked_shouldDisabledLockScreenSound()
DChargingSoundPreferenceControllerTest.java50 private ContentResolver mContentResolver; field in ChargingSoundPreferenceControllerTest
63 when(mActivity.getContentResolver()).thenReturn(mContentResolver); in setUp()
77 Global.putInt(mContentResolver, Global.CHARGING_SOUNDS_ENABLED, 1); in displayPreference_chargingSoundEnabled_shouldCheckedPreference()
86 Global.putInt(mContentResolver, Global.CHARGING_SOUNDS_ENABLED, 0); in displayPreference_chargingSoundDisabled_shouldUncheckedPreference()
99 assertThat(Global.getInt(mContentResolver, Global.CHARGING_SOUNDS_ENABLED, 1)) in onPreferenceChanged_preferenceChecked_shouldEnabledChargingSound()
109 assertThat(Global.getInt(mContentResolver, Global.CHARGING_SOUNDS_ENABLED, 1)) in onPreferenceChanged_preferenceUnchecked_shouldDisabledChargingSound()
DTouchSoundPreferenceControllerTest.java54 private ContentResolver mContentResolver; field in TouchSoundPreferenceControllerTest
68 when(mActivity.getContentResolver()).thenReturn(mContentResolver); in setUp()
82 System.putInt(mContentResolver, System.SOUND_EFFECTS_ENABLED, 1); in displayPreference_soundEffectEnabled_shouldCheckedPreference()
91 System.putInt(mContentResolver, System.SOUND_EFFECTS_ENABLED, 0); in displayPreference_soundEffectDisabled_shouldUncheckedPreference()
104 assertThat(System.getInt(mContentResolver, System.SOUND_EFFECTS_ENABLED, 1)).isEqualTo(1); in onPreferenceChanged_preferenceChecked_shouldEnabledSoundEffect()
113 assertThat(System.getInt(mContentResolver, System.SOUND_EFFECTS_ENABLED, 1)).isEqualTo(0); in onPreferenceChanged_preferenceUnchecked_shouldDisabledSoundEffect()
DDialPadTonePreferenceControllerTest.java53 private ContentResolver mContentResolver; field in DialPadTonePreferenceControllerTest
69 when(mActivity.getContentResolver()).thenReturn(mContentResolver); in setUp()
90 System.putInt(mContentResolver, System.DTMF_TONE_WHEN_DIALING, 1); in displayPreference_dialToneEnabled_shouldCheckedPreference()
99 System.putInt(mContentResolver, System.DTMF_TONE_WHEN_DIALING, 0); in displayPreference_dialToneDisabled_shouldUncheckedPreference()
112 assertThat(System.getInt(mContentResolver, System.DTMF_TONE_WHEN_DIALING, 1)).isEqualTo(1); in onPreferenceChanged_preferenceChecked_shouldEnabledDialTone()
121 assertThat(System.getInt(mContentResolver, System.DTMF_TONE_WHEN_DIALING, 1)).isEqualTo(0); in onPreferenceChanged_preferenceUnchecked_shouldDisabledDialTone()
DVibrateOnTouchPreferenceControllerTest.java52 private ContentResolver mContentResolver; field in VibrateOnTouchPreferenceControllerTest
70 when(mActivity.getContentResolver()).thenReturn(mContentResolver); in setUp()
92 System.putInt(mContentResolver, System.HAPTIC_FEEDBACK_ENABLED, 1); in displayPreference_hapticEnabled_shouldCheckedPreference()
101 System.putInt(mContentResolver, System.HAPTIC_FEEDBACK_ENABLED, 0); in displayPreference_hapticDisabled_shouldUncheckedPreference()
114 assertThat(System.getInt(mContentResolver, System.HAPTIC_FEEDBACK_ENABLED, 1)).isEqualTo(1); in onPreferenceChanged_preferenceChecked_shouldEnabledHaptic()
123 assertThat(System.getInt(mContentResolver, System.HAPTIC_FEEDBACK_ENABLED, 1)).isEqualTo(0); in onPreferenceChanged_preferenceUnchecked_shouldDisabledHaptic()
DDockingSoundPreferenceControllerTest.java51 private ContentResolver mContentResolver; field in DockingSoundPreferenceControllerTest
64 when(mActivity.getContentResolver()).thenReturn(mContentResolver); in setUp()
91 Global.putInt(mContentResolver, Global.DOCK_SOUNDS_ENABLED, 1); in displayPreference_dockingSoundEnabled_shouldCheckedPreference()
100 Global.putInt(mContentResolver, Global.DOCK_SOUNDS_ENABLED, 0); in displayPreference_dockingSoundDisabled_shouldUncheckedPreference()
113 assertThat(Global.getInt(mContentResolver, Global.DOCK_SOUNDS_ENABLED, 1)).isEqualTo(1); in onPreferenceChanged_preferenceChecked_shouldEnabledDockingSound()
122 assertThat(Global.getInt(mContentResolver, Global.DOCK_SOUNDS_ENABLED, 1)).isEqualTo(0); in onPreferenceChanged_preferenceUnchecked_shouldDisabledDockingSound()
DDockAudioMediaPreferenceControllerTest.java52 private ContentResolver mContentResolver; field in DockAudioMediaPreferenceControllerTest
66 when(mActivity.getContentResolver()).thenReturn(mContentResolver); in setUp()
94 Global.putInt(mContentResolver, Global.DOCK_AUDIO_MEDIA_ENABLED, 0); in displayPreference_dockAudioDisabled_shouldSelectFirstItem()
103 Global.putInt(mContentResolver, Global.DOCK_AUDIO_MEDIA_ENABLED, 1); in displayPreference_dockAudioEnabled_shouldSelectSecondItem()
116 assertThat(Global.getInt(mContentResolver, Global.DOCK_AUDIO_MEDIA_ENABLED, 0)) in onPreferenceChanged_firstItemSelected_shouldDisableDockAudio()
126 assertThat(Global.getInt(mContentResolver, Global.DOCK_AUDIO_MEDIA_ENABLED, 0)) in onPreferenceChanged_secondItemSelected_shouldEnableDockAudio()
/packages/apps/TV/tests/unit/src/com/android/tv/data/
DChannelDataManagerTest.java78 private FakeContentResolver mContentResolver; field in ChannelDataManagerTest
86 mContentResolver = new FakeContentResolver(); in setUp()
87 mContentResolver.addProvider(TvContract.AUTHORITY, mContentProvider); in setUp()
95 mContentResolver); in setUp()
220 mContentResolver.mNotifyDisabled = true; in testBrowsable()
257 mContentResolver.mNotifyDisabled = true; in testBrowsable_skipNotification()
289 mContentResolver.mNotifyDisabled = true; in testLocked()
466 mContentResolver.notifyChange(uri, null); in update()
468 mContentResolver.notifyChange(Channels.CONTENT_URI, null); in update()
486 mContentResolver.notifyChange(TvContract.buildChannelUri(channelId), null); in simulateInsert()
[all …]
/packages/apps/Messaging/src/com/android/messaging/mmslib/pdu/
DPduPersister.java299 private final ContentResolver mContentResolver; field in PduPersister
303 mContentResolver = context.getContentResolver(); in PduPersister()
373 final Cursor c = SqliteWrapper.query(mContext, mContentResolver, in loadParts()
464 is = mContentResolver.openInputStream(partURI); in loadParts()
500 final Cursor c = SqliteWrapper.query(mContext, mContentResolver, in loadAddress()
591 final Cursor c = SqliteWrapper.query(mContext, mContentResolver, uri, in load()
734 SqliteWrapper.insert(mContext, mContentResolver, uri, values); in persistAddress()
826 res = SqliteWrapper.insert(mContext, mContentResolver, uri, values); in persistPart()
879 if (mContentResolver.update(uri, cv, null, null) != 1) { in persistData()
915 os = mContentResolver.openOutputStream(uri); in persistData()
[all …]
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/
DTelephonyBackupAgent.java304 private ContentResolver mContentResolver; field in TelephonyBackupAgent
331 mContentResolver = getContentResolver(); in onCreate()
337 mContentResolver = contentResolver; in setContentResolver()
367 Cursor smsCursor = mContentResolver.query(Telephony.Sms.CONTENT_URI, SMS_PROJECTION, in onFullBackup()
369 Cursor mmsCursor = mContentResolver.query(Telephony.Mms.CONTENT_URI, MMS_PROJECTION, in onFullBackup()
644 mContentResolver.bulkInsert(Telephony.Sms.CONTENT_URI, values);
648 mContentResolver.bulkInsert(Telephony.Sms.CONTENT_URI,
681 try (Cursor cursor = mContentResolver.query(Telephony.Sms.CONTENT_URI, PROJECTION_ID, where,
690 try (Cursor cursor = mContentResolver.query(Telephony.Mms.CONTENT_URI, PROJECTION_ID, where,
993 if (mContentResolver.update(
[all …]
/packages/providers/DownloadProvider/tests/public_api_access/src/com/android/providers/downloads/public_api_access_tests/
DPublicApiAccessTest.java47 private ContentResolver mContentResolver; field in PublicApiAccessTest
53 mContentResolver = getContext().getContentResolver(); in setUp()
59 if (mContentResolver != null) { in tearDown()
60 mContentResolver.delete(Downloads.Impl.CONTENT_URI, null, null); in tearDown()
66 mContentResolver.insert(Downloads.Impl.CONTENT_URI, buildValidValues()); in testMinimalValidWrite()
78 mContentResolver.insert(Downloads.Impl.CONTENT_URI, values); in testMaximalValidWrite()
135 mContentResolver.insert(Downloads.Impl.CONTENT_URI, values); in testInvalidValues()
/packages/apps/Settings/src/com/android/settings/wifi/
DUseOpenWifiPreferenceController.java43 private final ContentResolver mContentResolver; field in UseOpenWifiPreferenceController
55 mContentResolver = context.getContentResolver(); in UseOpenWifiPreferenceController()
93 mSettingObserver.register(mContentResolver); in onResume()
98 mSettingObserver.unregister(mContentResolver); in onPause()
144 Settings.Global.putString(mContentResolver, in onPreferenceChange()
156 String enabledUseOpenWifiPackage = Settings.Global.getString(mContentResolver, in isSettingEnabled()
169 Settings.Global.putString(mContentResolver, Settings.Global.USE_OPEN_WIFI_PACKAGE, in onActivityResult()
/packages/apps/Contacts/src/com/android/contacts/
DContactsActivity.java38 private ContentResolver mContentResolver; field in ContactsActivity
42 if (mContentResolver == null) { in getContentResolver()
45 mContentResolver = services.getContentResolver(); in getContentResolver()
47 if (mContentResolver == null) { in getContentResolver()
48 mContentResolver = super.getContentResolver(); in getContentResolver()
51 return mContentResolver; in getContentResolver()
DAppCompatContactsActivity.java39 private ContentResolver mContentResolver; field in AppCompatContactsActivity
43 if (mContentResolver == null) { in getContentResolver()
46 mContentResolver = services.getContentResolver(); in getContentResolver()
48 if (mContentResolver == null) { in getContentResolver()
49 mContentResolver = super.getContentResolver(); in getContentResolver()
52 return mContentResolver; in getContentResolver()
/packages/apps/Gallery/src/com/android/camera/gallery/
DBaseImage.java42 protected ContentResolver mContentResolver; field in BaseImage
62 mContentResolver = cr; in BaseImage()
98 url, mContentResolver, useNative); in fullSizeBitmap()
109 InputStream input = mContentResolver.openInputStream(mUri); in fullSizeImageData()
143 input = mContentResolver.openFileDescriptor(mUri, "r"); in setupDimension()
172 b = BitmapManager.instance().getThumbnail(mContentResolver, id, in miniThumbBitmap()
/packages/apps/Contacts/tests/src/com/android/contacts/test/mocks/
DContactsMockContext.java35 private MockContentResolver mContentResolver; field in ContactsMockContext
47 mContentResolver = new MockContentResolver(); in ContactsMockContext()
49 mContentResolver.addProvider(authority, mContactsProvider); in ContactsMockContext()
51 mContentResolver.addProvider(Settings.AUTHORITY, mSettingsProvider); in ContactsMockContext()
56 return mContentResolver; in getContentResolver()
/packages/apps/Messaging/tests/src/com/android/messaging/
DFakeContext.java43 private final MockContentResolver mContentResolver; field in FakeContext
50 mContentResolver = new MockContentResolver(); in FakeContext()
89 return mContentResolver; in getContentResolver()
93 mContentResolver.addProvider(name, provider); in addContentProvider()
98 mContentResolver.addProvider(uri.getAuthority(), provider); in addDefaultProvider()

1234