Home
last modified time | relevance | path

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

1234

/cts/tests/tests/provider/src/android/provider/cts/settings/
DSettings_SystemTest.java69 final ContentResolver cr = InstrumentationRegistry.getTargetContext().getContentResolver(); in testSystemSettings() local
79 Cursor c = cr.query(System.CONTENT_URI, null, null, null, null); in testSystemSettings()
83 System.getConfiguration(cr, cfg); in testSystemSettings()
87 final String originalIntValue = System.getString(cr, INT_FIELD); in testSystemSettings()
88 final String originalLongValue = System.getString(cr, LONG_FIELD); in testSystemSettings()
89 final String originalStringValue = System.getString(cr, STRING_FIELD); in testSystemSettings()
98 assertTrue(System.putInt(cr, INT_FIELD, 2)); in testSystemSettings()
99 assertTrue(System.putLong(cr, LONG_FIELD, 20l)); in testSystemSettings()
100 assertTrue(System.putFloat(cr, FLOAT_FIELD, 1.3f)); in testSystemSettings()
101 assertTrue(System.putString(cr, STRING_FIELD, stringValue)); in testSystemSettings()
[all …]
DSettings_SecureTest.java49 private ContentResolver cr; field in Settings_SecureTest
53 cr = InstrumentationRegistry.getTargetContext().getContentResolver(); in setUp()
54 assertNotNull(cr); in setUp()
60 assertNull(Secure.getString(cr, NO_SUCH_SETTING)); in assertSettingsForTests()
62 String value = Secure.getString(cr, STRING_VALUE_SETTING); in assertSettingsForTests()
73 assertEquals(10, Secure.getInt(cr, "int", 10)); in testGetDefaultValues()
74 assertEquals(20, Secure.getLong(cr, "long", 20)); in testGetDefaultValues()
75 assertEquals(30.0f, Secure.getFloat(cr, "float", 30), 0.001); in testGetDefaultValues()
80 assertNull(Secure.getString(cr, NO_SUCH_SETTING)); in testGetPutInt()
83 Secure.putInt(cr, NO_SUCH_SETTING, -1); in testGetPutInt()
[all …]
DSettings_NameValueTableTest.java45 final ContentResolver cr = InstrumentationRegistry.getTargetContext().getContentResolver(); in testPutString() local
52 Cursor c = cr.query(uri, null, null, null, null); in testPutString()
57 MyNameValueTable.putString(cr, uri, name, value); in testPutString()
58 c = cr.query(uri, null, null, null, null); in testPutString()
64 c = cr.query(uri, null, selection, null, null); in testPutString()
DSettingsTest.java90 ContentResolver cr = getContext().getContentResolver(); in testSystemTable() local
92 cr.acquireContentProviderClient(Settings.System.CONTENT_URI); in testSystemTable()
141 ContentResolver cr = getContext().getContentResolver(); in testSecureTable() local
143 cr.acquireContentProviderClient(Settings.Secure.CONTENT_URI); in testSecureTable()
165 ContentResolver cr = getContext().getContentResolver(); in tryBadTableAccess() local
173 cr.insert(uri, cv); in tryBadTableAccess()
181 cr.update(uri, cv, NAME_EQ_PLACEHOLDER, new String[]{name}); in tryBadTableAccess()
189 cr.query(uri, SELECT_VALUE, NAME_EQ_PLACEHOLDER, in tryBadTableAccess()
199 cr.delete(uri, NAME_EQ_PLACEHOLDER, new String[]{name}); in tryBadTableAccess()
207 String mimeType = cr.getType(uri); in tryBadTableAccess()
[all …]
/cts/tests/tests/systemui/src/android/systemui/cts/
DColorUtils.java48 final float cr = (V - r) / vtemp; in hue() local
55 H = 2 + cr - cb; in hue()
57 H = 4 + cg - cr; in hue()
/cts/tests/accessibility/common/src/android/accessibility/cts/common/
DServiceControlUtils.java33 public static String getEnabledServices(ContentResolver cr) { in getEnabledServices() argument
34 return Settings.Secure.getString(cr, Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES); in getEnabledServices()
/cts/tests/tests/provider/src/android/provider/cts/
DSearchRecentSuggestionsTest.java94 ContentResolver cr = mProviderContext.getContentResolver(); in testSearchRecentSuggestions() local
95 ((MySearchRecentSuggestions) srs).truncateHistory(cr, 2); in testSearchRecentSuggestions()
192 protected void truncateHistory(ContentResolver cr, int maxEntries) { in truncateHistory() argument
193 super.truncateHistory(cr, maxEntries); in truncateHistory()
/cts/tests/tests/media/src/android/media/cts/
DAudioManagerStub.java42 public static void setCTSResult(CTSResult cr) { in setCTSResult() argument
43 mCTSResult = cr; in setCTSResult()
/cts/tests/tests/permission/src/android/permission/cts/
DLocationAccessCheckTest.java341 ContentResolver cr = sContext.getContentResolver(); in reduceDelays() local
344 Settings.Secure.putLong(cr, LOCATION_ACCESS_CHECK_INTERVAL_MILLIS, 100); in reduceDelays()
345 Settings.Secure.putLong(cr, LOCATION_ACCESS_CHECK_DELAY_MILLIS, 50); in reduceDelays()
549 ContentResolver cr = sContext.getContentResolver(); in resetDelays() local
551 Settings.Secure.resetToDefaults(cr, LOCATION_ACCESS_CHECK_INTERVAL_MILLIS); in resetDelays()
552 Settings.Secure.resetToDefaults(cr, LOCATION_ACCESS_CHECK_DELAY_MILLIS); in resetDelays()
/cts/apps/CameraITS/tests/scene4/
Dtest_multi_camera_alignment.py550 cr = caps[(fmt, i)]['metadata']['android.scaler.cropRegion']
551 crw = cr['right'] - cr['left']
552 crh = cr['bottom'] - cr['top']
556 circle[i]['x'] = cr['left'] + circle[i]['x'] / zoom_ratio
557 circle[i]['y'] = cr['top'] + circle[i]['y'] / zoom_ratio
/cts/tests/tests/uiautomation/src/android/app/uiautomation/cts/
DUiAutomationTest.java528 ContentResolver cr = context.getContentResolver(); in enableAccessibilityService() local
529 String enabledServices = Settings.Secure.getString(cr, in enableAccessibilityService()
531 Settings.Secure.putString(cr, Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, in enableAccessibilityService()
533 Settings.Secure.putInt(cr, Settings.Secure.ACCESSIBILITY_ENABLED, 1); in enableAccessibilityService()
592 ContentResolver cr = context.getContentResolver(); in turnAccessibilityOff() local
594 cr, Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, null); in turnAccessibilityOff()
/cts/tests/tests/tv/src/android/media/tv/tuner/cts/
DTunerFrontendTest.java234 DvbsCodeRate cr = settings.getCodeRate(); in testDvbsFrontendSettings() local
235 assertNotNull(cr); in testDvbsFrontendSettings()
236 assertEquals(FrontendSettings.FEC_9_10, cr.getInnerFec()); in testDvbsFrontendSettings()
237 assertEquals(true, cr.isLinear()); in testDvbsFrontendSettings()
238 assertEquals(false, cr.isShortFrameEnabled()); in testDvbsFrontendSettings()
239 assertEquals(55, cr.getBitsPer1000Symbol()); in testDvbsFrontendSettings()
/cts/tests/tests/telephony/current/src/android/telephony/cts/
DPhoneNumberUtilsTest.java172 ContentResolver cr = getContext().getContentResolver(); in testGetMethods() local
179 personRecord = cr.insert(People.CONTENT_URI, values); in testGetMethods()
184 phoneRecord = cr.insert(phoneUri, values); in testGetMethods()
191 cr.delete(personRecord, null, null); in testGetMethods()
194 cr.delete(phoneRecord, null, null); in testGetMethods()
/cts/hostsidetests/devicepolicy/app/SimpleApp/src/com/android/cts/launcherapps/simpleapp/
DSimpleService4.java141 ContentResolver cr = getContentResolver(); in doAction() local
142 mProviderClient = cr.acquireContentProviderClient( in doAction()
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/settings/
DSettingsSession.java68 T get(ContentResolver cr, String key) throws SettingNotFoundException; in get() argument
73 void set(ContentResolver cr, String key, T value); in set() argument
/cts/hostsidetests/scopedstorage/legacy/src/android/scopedstorage/cts/legacy/
DLegacyStorageTest.java540 final ContentResolver cr = getContentResolver(); in testCreateAndRenameDoesntLeaveStaleDBRow_hasRW() local
571 final ContentResolver cr = getContentResolver(); in testRenameDoesntInvalidateUri_hasRW() local
591 final Uri scannedUri = MediaStore.scanFile(cr, imageFile); in testRenameDoesntInvalidateUri_hasRW()
614 final ContentResolver cr = getContentResolver(); in testCanRenameAFileWithNoDBRow_hasRW() local
623 MediaStore.scanFile(cr, directoryNoMedia); in testCanRenameAFileWithNoDBRow_hasRW()
/cts/tests/app/app/src/android/app/stubs/
DLocalActivityManagerTestHelper.java46 public static void setResult(CTSResult cr) { in setResult() argument
47 sResult = cr; in setResult()
/cts/hostsidetests/scopedstorage/src/android/scopedstorage/cts/
DScopedStorageTest.java1472 final ContentResolver cr = getContentResolver(); in testRenameAndReplaceFile() local
1476 final Uri uriVideoFile1 = MediaStore.scanFile(cr, videoFile1); in testRenameAndReplaceFile()
1477 final Uri uriVideoFile2 = MediaStore.scanFile(cr, videoFile2); in testRenameAndReplaceFile()
1483 assertThat(cr.openFileDescriptor(uriVideoFile2, "rw")).isNotNull(); in testRenameAndReplaceFile()
1486 () -> { cr.openFileDescriptor(uriVideoFile1, "rw"); }); in testRenameAndReplaceFile()
2393 final ContentResolver cr = getContentResolver(); in testCreateCanRestoreDeletedRowId() local
2399 final Uri uriOfOldFile = MediaStore.scanFile(cr, imageFile); in testCreateCanRestoreDeletedRowId()
2406 assertThat(cr.openFileDescriptor(uriOfOldFile, "rw")).isNotNull(); in testCreateCanRestoreDeletedRowId()
2430 final ContentResolver cr = getContentResolver(); in testRenameCanRestoreDeletedRowId() local
2434 final Uri oldUri = MediaStore.scanFile(cr, imageFile); in testRenameCanRestoreDeletedRowId()
[all …]
/cts/tests/tests/content/src/android/content/cts/
DAsyncQueryHandlerTest.java318 public MockAsyncQueryHandler(ContentResolver cr) { in MockAsyncQueryHandler() argument
319 super(cr); in MockAsyncQueryHandler()
/cts/hostsidetests/net/app/src/com/android/cts/net/hostside/
DVpnTest.java637 final ContentResolver cr = getInstrumentation().getContext().getContentResolver(); in setAndVerifyPrivateDns() local
642 Settings.Global.putString(cr, PRIVATE_DNS_SPECIFIER_SETTING, privateDnsHostname); in setAndVerifyPrivateDns()
643 Settings.Global.putString(cr, PRIVATE_DNS_MODE_SETTING, in setAndVerifyPrivateDns()
646 Settings.Global.putString(cr, PRIVATE_DNS_MODE_SETTING, PRIVATE_DNS_MODE_OPPORTUNISTIC); in setAndVerifyPrivateDns()
/cts/tests/camera/src/android/hardware/camera2/cts/
DAllocationTest.java316 float cr = yuvData[2] & 0xFF; // V channel in convertPixelYuvToRgb() local
319 float r = y + 1.402f * (cr - 128); in convertPixelYuvToRgb()
320 float g = y - 0.34414f * (cb - 128) - 0.71414f * (cr - 128); in convertPixelYuvToRgb()
DImageReaderTest.java822 float cr = crRow[crPix] & 0xFF; in convertPixelYuvToRgba() local
825 int r = (int) Math.max(0.0f, Math.min(COLOR_RANGE, y + 1.402f * (cr - 128))); in convertPixelYuvToRgba()
827 Math.min(COLOR_RANGE, y - 0.34414f * (cb - 128) - 0.71414f * (cr - 128))); in convertPixelYuvToRgba()
/cts/hostsidetests/statsd/src/android/cts/statsd/atom/
DAtomTestCase.java228 CommandResult cr = getDevice().executeShellV2Command(cmd); in resetPerfettoGuardrails() local
229 if (cr.getStatus() != CommandStatus.SUCCESS) in resetPerfettoGuardrails()
230 …ew Exception(String.format("Error while executing %s: %s %s", cmd, cr.getStdout(), cr.getStderr())… in resetPerfettoGuardrails()
/cts/tests/autofillservice/src/android/autofillservice/cts/
DHelper.java1571 final ContentResolver cr = context.getContentResolver(); in mockSwitchInputMethod() local
1572 final int subtype = Settings.Secure.getInt(cr, SELECTED_INPUT_METHOD_SUBTYPE); in mockSwitchInputMethod()
1573 Settings.Secure.putInt(cr, SELECTED_INPUT_METHOD_SUBTYPE, subtype); in mockSwitchInputMethod()
/cts/tests/quickaccesswallet/src/android/quickaccesswallet/cts/
DQuickAccessWalletClientTest.java91 ContentResolver cr = mContext.getContentResolver(); in tearDown() local

1234