Home
last modified time | relevance | path

Searched refs:cr (Results 1 – 25 of 118) sorted by relevance

12345

/frameworks/base/services/core/java/com/android/server/
DCertBlacklister.java57 public BlacklistObserver(String key, String name, String path, ContentResolver cr) { in BlacklistObserver() argument
63 mContentResolver = cr; in BlacklistObserver()
113 private BlacklistObserver buildPubkeyObserver(ContentResolver cr) { in buildPubkeyObserver() argument
117 cr); in buildPubkeyObserver()
120 private BlacklistObserver buildSerialObserver(ContentResolver cr) { in buildSerialObserver() argument
124 cr); in buildSerialObserver()
127 private void registerObservers(ContentResolver cr) { in registerObservers() argument
129 cr.registerContentObserver( in registerObservers()
132 buildPubkeyObserver(cr) in registerObservers()
136 cr.registerContentObserver( in registerObservers()
[all …]
DDockObserver.java160 final ContentResolver cr = getContext().getContentResolver(); in handleDockStateChange() local
161 if (Settings.Global.getInt(cr, in handleDockStateChange()
172 boolean dockSoundsEnabled = Settings.Global.getInt(cr, in handleDockStateChange()
174 boolean dockSoundsEnabledWhenAccessibility = Settings.Global.getInt(cr, in handleDockStateChange()
176 boolean accessibilityEnabled = Settings.Secure.getInt(cr, in handleDockStateChange()
203 final String soundPath = Settings.Global.getString(cr, whichSound); in handleDockStateChange()
/frameworks/base/core/java/android/provider/
DBrowser.java243 public static final Cursor getAllBookmarks(ContentResolver cr) throws in getAllBookmarks() argument
255 public static final Cursor getAllVisitedUrls(ContentResolver cr) throws in getAllVisitedUrls() argument
264 private static final Cursor getVisitedLike(ContentResolver cr, String url) { in getVisitedLike() argument
299 return cr.query(History.CONTENT_URI, new String[] { History._ID, History.VISITS }, in getVisitedLike()
313 public static final void updateVisitedHistory(ContentResolver cr, in updateVisitedHistory() argument
325 public static final String[] getVisitedHistory(ContentResolver cr) { in getVisitedHistory() argument
339 public static final void truncateHistory(ContentResolver cr) { in truncateHistory() argument
349 public static final boolean canClearHistory(ContentResolver cr) { in canClearHistory() argument
360 public static final void clearHistory(ContentResolver cr) { in clearHistory() argument
374 public static final void deleteHistoryTimeFrame(ContentResolver cr, in deleteHistoryTimeFrame() argument
[all …]
DSettings.java2650 public boolean putStringForUser(ContentResolver cr, String name, String value, in putStringForUser() argument
2666 IContentProvider cp = mProviderHolder.getProvider(cr); in putStringForUser()
2667 cp.call(cr.getPackageName(), cr.getAttributionTag(), in putStringForUser()
2676 public boolean setStringsForPrefix(ContentResolver cr, String prefix, in setStringsForPrefix() argument
2686 IContentProvider cp = mProviderHolder.getProvider(cr); in setStringsForPrefix()
2687 Bundle bundle = cp.call(cr.getPackageName(), cr.getAttributionTag(), in setStringsForPrefix()
2698 public String getStringForUser(ContentResolver cr, String name, final int userHandle) { in getStringForUser() argument
2708 + cr.getPackageName() +" and user:" + userHandle); in getStringForUser()
2724 IContentProvider cp = mProviderHolder.getProvider(cr); in getStringForUser()
2747 + " in package:" + cr.getPackageName() +" and user:" in getStringForUser()
[all …]
DSearchRecentSuggestions.java189 ContentResolver cr = mContext.getContentResolver(); in saveRecentQueryBlocking() local
201 cr.insert(mSuggestionsUri, values); in saveRecentQueryBlocking()
207 truncateHistory(cr, MAX_HISTORY_COUNT); in saveRecentQueryBlocking()
219 ContentResolver cr = mContext.getContentResolver(); in clearHistory() local
220 truncateHistory(cr, 0); in clearHistory()
229 protected void truncateHistory(ContentResolver cr, int maxEntries) { in truncateHistory() argument
243 cr.delete(mSuggestionsUri, selection, null); in truncateHistory()
/frameworks/rs/tests/java_api/RsCameraDemo/src/com/android/example/rscamera/
DMediaStoreSaver.java54 public static final String insertImage(ContentResolver cr, in insertImage() argument
72 url = cr.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); in insertImage()
75 OutputStream imageOut = cr.openOutputStream(url); in insertImage()
84 … Bitmap miniThumb = Images.Thumbnails.getThumbnail(cr, id, Images.Thumbnails.MINI_KIND, null); in insertImage()
86 storeThumbnail(cr, miniThumb, id, 50F, 50F, Images.Thumbnails.MICRO_KIND); in insertImage()
88 cr.delete(url, null, null); in insertImage()
93 cr.delete(url, null, null); in insertImage()
113 ContentResolver cr, in storeThumbnail() argument
140 Uri url = cr.insert(Images.Thumbnails.EXTERNAL_CONTENT_URI, values); in storeThumbnail()
143 OutputStream thumbOut = cr.openOutputStream(url); in storeThumbnail()
/frameworks/rs/tests/java_api/CannyLive/src/com/android/example/cannylive/
DMediaStoreSaver.java54 public static final String insertImage(ContentResolver cr, in insertImage() argument
72 url = cr.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); in insertImage()
75 OutputStream imageOut = cr.openOutputStream(url); in insertImage()
84 … Bitmap miniThumb = Images.Thumbnails.getThumbnail(cr, id, Images.Thumbnails.MINI_KIND, null); in insertImage()
86 storeThumbnail(cr, miniThumb, id, 50F, 50F, Images.Thumbnails.MICRO_KIND); in insertImage()
88 cr.delete(url, null, null); in insertImage()
93 cr.delete(url, null, null); in insertImage()
113 ContentResolver cr, in storeThumbnail() argument
140 Uri url = cr.insert(Images.Thumbnails.EXTERNAL_CONTENT_URI, values); in storeThumbnail()
143 OutputStream thumbOut = cr.openOutputStream(url); in storeThumbnail()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/
DThreadUtilsTest.java54 TestRunnable cr = new TestRunnable(); in testPostOnMainThread_shouldRunOnMainThread() local
56 ThreadUtils.postOnMainThread(cr); in testPostOnMainThread_shouldRunOnMainThread()
57 assertThat(cr.called).isFalse(); in testPostOnMainThread_shouldRunOnMainThread()
60 assertThat(cr.called).isTrue(); in testPostOnMainThread_shouldRunOnMainThread()
61 assertThat(cr.onUiThread).isTrue(); in testPostOnMainThread_shouldRunOnMainThread()
/frameworks/layoutlib/create/src/com/android/tools/layoutlib/create/
DAsmGenerator.java242 ClassReader cr = new ClassReader(is);
243 byte[] b = transform(cr, true);
244 name = classNameToEntryPath(transformName(cr.getClassName()));
249 ClassReader cr = entry.getValue();
250 byte[] b = transform(cr, true);
251 String name = classNameToEntryPath(transformName(cr.getClassName()));
256 ClassReader cr = entry.getValue();
257 byte[] b = transform(cr, true);
258 String name = classNameToEntryPath(transformName(cr.getClassName()));
310 byte[] transform(ClassReader cr, boolean stubNativesOnly) {
[all …]
/frameworks/layoutlib/create/tests/src/com/android/tools/layoutlib/create/
DDelegateClassAdapterTest.java94 ClassReader cr = new ClassReader(NATIVE_CLASS_NAME); in testNoOp() local
95 cr.accept(cv, 0 /* flags */); in testNoOp()
151 ClassReader cr = new ClassReader(NATIVE_CLASS_NAME); in testConstructorAfterDelegate() local
152 cr.accept(cv, 0 /* flags */); in testConstructorAfterDelegate()
183 ClassReader cr = new ClassReader(INNER_CLASS_NAME); in testInnerConstructorAfterDelegate() local
184 cr.accept(cv, 0 /* flags */); in testInnerConstructorAfterDelegate()
218 ClassReader cr = new ClassReader(STATIC_INNER_CLASS_NAME); in testStaticInnerConstructorAfterDelegate() local
219 cr.accept(cv, 0 /* flags */); in testStaticInnerConstructorAfterDelegate()
249 ClassReader cr = new ClassReader(NATIVE_CLASS_NAME); in testDelegateNative() local
250 cr.accept(cv, 0 /* flags */); in testDelegateNative()
[all …]
DRefactorClassAdapterTest.java49 ClassReader cr = new ClassReader(OUTER_CLASS_NAME); in testRefactorWithLambdas() local
50 cr.accept(cv, 0 /* flags */); in testRefactorWithLambdas()
54 cr = new ClassReader(USAGE_CLASS_NAME); in testRefactorWithLambdas()
55 cr.accept(cv, 0 /* flags */); in testRefactorWithLambdas()
111 ClassReader cr = new ClassReader(name); in findClass()
113 cr.accept(cw, 0); in findClass()
DAsmAnalyzerTest.java110 ClassReader cr = AsmAnalyzer.findClass("mock_android.view.ViewGroup$LayoutParams", in testFindClass() local
113 assertNotNull(cr); in testFindClass()
114 assertEquals("mock_android/view/ViewGroup$LayoutParams", cr.getClassName()); in testFindClass()
117 assertArrayEquals(new ClassReader[] { cr }, found.values().toArray()); in testFindClass()
188 … ClassReader cr = AsmAnalyzer.findClass("mock_android.widget.LinearLayout", zipClasses, keep); in testDependencyVisitor() local
192 cr.accept(visitor, 0 /* flags */); in testDependencyVisitor()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/
DComprehensionTlv.java52 protected ComprehensionTlv(int tag, boolean cr, int length, byte[] data, in ComprehensionTlv() argument
55 mCr = cr; in ComprehensionTlv()
127 boolean cr; // Comprehension required flag in decode()
143 cr = (tag & 0x8000) != 0; in decode()
150 cr = (tag & 0x80) != 0; in decode()
200 return new ComprehensionTlv(tag, cr, length, data, curIndex); in decode()
/frameworks/base/core/java/android/hardware/display/
DNightDisplayListener.java108 final ContentResolver cr = mContext.getContentResolver(); in setCallbackInternal() local
109 cr.registerContentObserver(Secure.getUriFor(Secure.NIGHT_DISPLAY_ACTIVATED), in setCallbackInternal()
111 cr.registerContentObserver(Secure.getUriFor(Secure.NIGHT_DISPLAY_AUTO_MODE), in setCallbackInternal()
113 cr.registerContentObserver( in setCallbackInternal()
116 cr.registerContentObserver( in setCallbackInternal()
119 cr.registerContentObserver( in setCallbackInternal()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DWifiSettingsStore.java126 final ContentResolver cr = mContext.getContentResolver(); in persistWifiState() local
128 Settings.Global.putInt(cr, Settings.Global.WIFI_ON, state); in persistWifiState()
153 final ContentResolver cr = mContext.getContentResolver(); in getPersistedWifiState() local
155 return Settings.Global.getInt(cr, Settings.Global.WIFI_ON); in getPersistedWifiState()
157 Settings.Global.putInt(cr, Settings.Global.WIFI_ON, WIFI_DISABLED); in getPersistedWifiState()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DIntRangeManager.java467 ClientRange cr = clients.get(0); in disableRange() local
468 if (cr.mStartId == startId && cr.mEndId == endId && cr.mClient.equals(client)) { in disableRange()
495 ClientRange cr = clients.get(crIndex); in disableRange() local
496 if (cr.mStartId == startId && cr.mEndId == endId && cr.mClient.equals(client)) { in disableRange()
511 clients.add(crIndex, cr); in disableRange()
512 range.mEndId = cr.mEndId; in disableRange()
583 if (cr.mEndId > largestEndId) { in disableRange()
584 largestEndId = cr.mEndId; in disableRange()
/frameworks/base/services/core/java/com/android/server/testharness/
DTestHarnessModeService.java163 ContentResolver cr = getContext().getContentResolver(); in configureSettings() local
167 Settings.Global.putInt(cr, Settings.Global.ADB_ENABLED, 0); in configureSettings()
174 Settings.Global.putLong(cr, Settings.Global.ADB_ALLOWED_CONNECTION_TIME, 0); in configureSettings()
175 Settings.Global.putInt(cr, Settings.Global.ADB_ENABLED, 1); in configureSettings()
176 Settings.Global.putInt(cr, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 1); in configureSettings()
177 Settings.Global.putInt(cr, Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB, 0); in configureSettings()
179 cr, in configureSettings()
182 Settings.Global.putInt(cr, Settings.Global.OTA_DISABLE_AUTOMATIC_UPDATE, 1); in configureSettings()
228 ContentResolver cr = getContext().getContentResolver(); in setDeviceProvisioned() local
229 Settings.Global.putInt(cr, Settings.Global.DEVICE_PROVISIONED, 1); in setDeviceProvisioned()
[all …]
/frameworks/base/core/java/android/database/
DAbstractCursor.java412 public void setNotificationUri(ContentResolver cr, Uri notifyUri) { in setNotificationUri() argument
413 setNotificationUris(cr, Arrays.asList(notifyUri)); in setNotificationUri()
417 public void setNotificationUris(@NonNull ContentResolver cr, @NonNull List<Uri> notifyUris) { in setNotificationUris() argument
418 Objects.requireNonNull(cr); in setNotificationUris()
421 setNotificationUris(cr, notifyUris, cr.getUserId(), true); in setNotificationUris()
431 public void setNotificationUris(ContentResolver cr, List<Uri> notifyUris, int userHandle, in setNotificationUris() argument
436 mContentResolver = cr; in setNotificationUris()
DCursor.java436 void setNotificationUri(ContentResolver cr, Uri uri); in setNotificationUri() argument
452 default void setNotificationUris(@NonNull ContentResolver cr, @NonNull List<Uri> uris) { in setNotificationUris() argument
453 setNotificationUri(cr, uris.get(0)); in setNotificationUris()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/fuelgauge/
DBatterySaverUtils.java120 final ContentResolver cr = context.getContentResolver(); in setPowerSaveMode() local
135 Secure.getInt(cr, Secure.LOW_POWER_MANUAL_ACTIVATION_COUNT, 0) + 1; in setPowerSaveMode()
136 Secure.putInt(cr, Secure.LOW_POWER_MANUAL_ACTIVATION_COUNT, count); in setPowerSaveMode()
142 && Global.getInt(cr, Global.LOW_POWER_MODE_TRIGGER_LEVEL, 0) == 0 in setPowerSaveMode()
143 && Secure.getInt(cr, in setPowerSaveMode()
/frameworks/base/core/java/com/android/internal/
DBrightnessSynchronizer.java271 final ContentResolver cr = mContext.getContentResolver(); in startObserving() local
272 cr.unregisterContentObserver(this); in startObserving()
273 cr.registerContentObserver(BRIGHTNESS_URI, false, this, UserHandle.USER_ALL); in startObserving()
274 cr.registerContentObserver(BRIGHTNESS_FLOAT_URI, false, this, UserHandle.USER_ALL); in startObserving()
278 final ContentResolver cr = mContext.getContentResolver(); in stopObserving() local
279 cr.unregisterContentObserver(this); in stopObserving()
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DLockPatternUtilsTest.java59 final MockContentResolver cr = new MockContentResolver(context); in configureTest() local
60 cr.addProvider(Settings.AUTHORITY, new FakeSettingsProvider()); in configureTest()
61 when(context.getContentResolver()).thenReturn(cr); in configureTest()
62 Settings.Global.putInt(cr, Settings.Global.DEVICE_DEMO_MODE, deviceDemoMode); in configureTest()
/frameworks/base/services/core/java/com/android/server/display/color/
DColorDisplayService.java239 final ContentResolver cr = getContext().getContentResolver(); in onUserChanged() local
243 cr.unregisterContentObserver(mUserSetupObserver); in onUserChanged()
253 if (!isUserSetupCompleted(cr, mCurrentUser)) { in onUserChanged()
257 if (isUserSetupCompleted(cr, mCurrentUser)) { in onUserChanged()
258 cr.unregisterContentObserver(this); in onUserChanged()
267 cr.registerContentObserver(Secure.getUriFor(Secure.USER_SETUP_COMPLETE), in onUserChanged()
275 private static boolean isUserSetupCompleted(ContentResolver cr, int userHandle) { in isUserSetupCompleted() argument
276 return Secure.getIntForUser(cr, Secure.USER_SETUP_COMPLETE, 0, userHandle) == 1; in isUserSetupCompleted()
366 final ContentResolver cr = getContext().getContentResolver(); in setUp() local
367 cr.registerContentObserver(Secure.getUriFor(Secure.NIGHT_DISPLAY_ACTIVATED), in setUp()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/
DRecents.java142 ContentResolver cr = mContext.getContentResolver(); in isUserSetup() local
143 return (Settings.Global.getInt(cr, Settings.Global.DEVICE_PROVISIONED, 0) != 0) && in isUserSetup()
144 (Settings.Secure.getInt(cr, Settings.Secure.USER_SETUP_COMPLETE, 0) != 0); in isUserSetup()
/frameworks/base/core/java/android/view/accessibility/
DCaptioningManager.java476 public static CaptionStyle getCustomStyle(ContentResolver cr) { in getCustomStyle() argument
479 cr, Secure.ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR, defStyle.foregroundColor); in getCustomStyle()
481 cr, Secure.ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR, defStyle.backgroundColor); in getCustomStyle()
483 cr, Secure.ACCESSIBILITY_CAPTIONING_EDGE_TYPE, defStyle.edgeType); in getCustomStyle()
485 cr, Secure.ACCESSIBILITY_CAPTIONING_EDGE_COLOR, defStyle.edgeColor); in getCustomStyle()
487 cr, Secure.ACCESSIBILITY_CAPTIONING_WINDOW_COLOR, defStyle.windowColor); in getCustomStyle()
489 String rawTypeface = Secure.getString(cr, Secure.ACCESSIBILITY_CAPTIONING_TYPEFACE); in getCustomStyle()

12345