/cts/tests/tests/text/src/android/text/cts/ |
D | SelectionTest.java | 46 SpannableStringBuilder builder = new SpannableStringBuilder(text); in testGetSelectionStart() local 47 assertEquals(-1, Selection.getSelectionStart(builder)); in testGetSelectionStart() 49 Selection.setSelection(builder, 3, 8); in testGetSelectionStart() 50 assertEquals(3, Selection.getSelectionStart(builder)); in testGetSelectionStart() 52 Selection.setSelection(builder, 3, 9); in testGetSelectionStart() 53 assertEquals(3, Selection.getSelectionStart(builder)); in testGetSelectionStart() 55 Selection.setSelection(builder, 5, 7); in testGetSelectionStart() 56 assertEquals(5, Selection.getSelectionStart(builder)); in testGetSelectionStart() 64 SpannableStringBuilder builder = new SpannableStringBuilder(text); in testGetSelectionEnd() local 65 assertEquals(-1, Selection.getSelectionEnd(builder)); in testGetSelectionEnd() [all …]
|
D | SpannableStringBuilderTest.java | 98 SpannableStringBuilder builder = new SpannableStringBuilder("spannable string"); in testGetSpanFlags() local 99 assertEquals(0, builder.getSpanFlags(mUnderlineSpan)); in testGetSpanFlags() 101 builder.setSpan(mUnderlineSpan, 2, 4, Spanned.SPAN_INCLUSIVE_INCLUSIVE); in testGetSpanFlags() 102 builder.setSpan(mUnderlineSpan, 0, 1, Spanned.SPAN_EXCLUSIVE_INCLUSIVE); in testGetSpanFlags() 103 builder.setSpan(mStrikethroughSpan, 5, 7, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); in testGetSpanFlags() 105 assertEquals(Spanned.SPAN_EXCLUSIVE_INCLUSIVE, builder.getSpanFlags(mUnderlineSpan)); in testGetSpanFlags() 106 assertEquals(Spanned.SPAN_INCLUSIVE_EXCLUSIVE, builder.getSpanFlags(mStrikethroughSpan)); in testGetSpanFlags() 107 assertEquals(0, builder.getSpanFlags(new Object())); in testGetSpanFlags() 112 SpannableStringBuilder builder = new SpannableStringBuilder("spannable string"); in testNextSpanTransition() local 114 builder.setSpan(mUnderlineSpan, 1, 2, Spanned.SPAN_INCLUSIVE_INCLUSIVE); in testNextSpanTransition() [all …]
|
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/utils/ |
D | ShellCommandTest.java | 52 assertThrows(NullPointerException.class, () -> ShellCommand.builder(null)); in constructBuilder_nullCommand_throwsException() 57 assertThat(ShellCommand.builder(/* command= */ COMMAND)).isNotNull(); in constructBuilder_constructs() 62 assertThat(ShellCommand.builder(/* command= */ COMMAND).build()).isEqualTo(COMMAND); in build_containsCommand() 67 ShellCommand.Builder builder = ShellCommand.builder("command") in build_containsOption() local 71 assertThat(builder.build()).isEqualTo("command --optionkey optionvalue"); in build_containsOption() 76 ShellCommand.Builder builder = ShellCommand.builder("command") in build_containsOptions() local 81 assertThat(builder.build()).isEqualTo( in build_containsOptions() 87 ShellCommand.Builder builder = ShellCommand.builder("command") in build_containsOperand() local 91 assertThat(builder.build()).isEqualTo("command operand"); in build_containsOperand() 96 ShellCommand.Builder builder = ShellCommand.builder("command") in build_containsOperands() local [all …]
|
/cts/tests/autofillservice/src/android/autofillservice/cts/unittests/ |
D | DatasetTest.java | 88 final Dataset.Builder builder = new Dataset.Builder(mPresentation); in testBuilder_setNullInlinePresentation() local 89 assertThrows(NullPointerException.class, () -> builder.setInlinePresentation(null)); in testBuilder_setNullInlinePresentation() 99 final Dataset.Builder builder = new Dataset.Builder(mPresentation); in testBuilder_setValueNullId() local 100 assertThrows(NullPointerException.class, () -> builder.setValue(null, mValue)); in testBuilder_setValueNullId() 111 final Dataset.Builder builder = new Dataset.Builder(); in testBuilder_setValueWithNullPresentation() local 112 assertThrows(NullPointerException.class, () -> builder.setValue(mId, mValue, in testBuilder_setValueWithNullPresentation() 118 final Dataset.Builder builder = new Dataset.Builder(); in testBuilder_setValueWithBothPresentation_nullPresentation() local 119 assertThrows(NullPointerException.class, () -> builder.setValue(mId, mValue, in testBuilder_setValueWithBothPresentation_nullPresentation() 125 final Dataset.Builder builder = new Dataset.Builder(); in testBuilder_setValueWithBothPresentation_nullInlinePresentation() local 126 assertThrows(NullPointerException.class, () -> builder.setValue(mId, mValue, in testBuilder_setValueWithBothPresentation_nullInlinePresentation() [all …]
|
D | SaveInfoTest.java | 68 final SaveInfo.Builder builder = new SaveInfo.Builder(SAVE_DATA_TYPE_GENERIC); in testBuild_noOptionalIds() local 69 assertThrows(IllegalStateException.class, ()-> builder.build()); in testBuild_noOptionalIds() 74 final SaveInfo.Builder builder = new SaveInfo.Builder(SAVE_DATA_TYPE_GENERIC, in testSetOptionalIds_null() local 76 assertThrows(IllegalArgumentException.class, ()-> builder.setOptionalIds(null)); in testSetOptionalIds_null() 81 final SaveInfo.Builder builder = new SaveInfo.Builder(SAVE_DATA_TYPE_GENERIC, in testSetOptional_empty() local 84 () -> builder.setOptionalIds(new AutofillId[] {})); in testSetOptional_empty() 89 final SaveInfo.Builder builder = new SaveInfo.Builder(SAVE_DATA_TYPE_GENERIC, in testSetOptional_nullEntry() local 92 () -> builder.setOptionalIds(new AutofillId[] { null })); in testSetOptional_nullEntry() 97 final SaveInfo.Builder builder = new SaveInfo.Builder(SAVE_DATA_TYPE_GENERIC, in testAddSanitizer_illegalArgs() local 101 () -> builder.addSanitizer(null, mId)); in testAddSanitizer_illegalArgs() [all …]
|
/cts/tests/location/location_privileged/src/android/location/cts/privileged/ |
D | GnssCapabilitiesTest.java | 45 GnssCapabilities.Builder builder = new GnssCapabilities.Builder(); in getTestGnssCapabilities() local 46 builder.setHasAntennaInfo(true); in getTestGnssCapabilities() 47 builder.setHasGeofencing(true); in getTestGnssCapabilities() 48 builder.setHasLowPowerMode(true); in getTestGnssCapabilities() 49 builder.setHasMeasurements(true); in getTestGnssCapabilities() 50 builder.setHasMeasurementCorrections(true); in getTestGnssCapabilities() 51 builder.setHasMeasurementCorrectionsExcessPathLength(true); in getTestGnssCapabilities() 52 builder.setHasMeasurementCorrectionsForDriving(true); in getTestGnssCapabilities() 53 builder.setHasMeasurementCorrectionsLosSats(true); in getTestGnssCapabilities() 54 builder.setHasMeasurementCorrectionsReflectingPlane(true); in getTestGnssCapabilities() [all …]
|
/cts/tests/signature/tests/src/android/signature/cts/tests/ |
D | TestClassesProvider.java | 36 Stream.Builder<Class<?>> builder = Stream.builder(); in getAllClasses() local 37 builder.add(AbstractClass.class); in getAllClasses() 38 builder.add(FinalClass.class); in getAllClasses() 39 builder.add(NormalClass.class); in getAllClasses() 40 builder.add(NormalException.class); in getAllClasses() 41 builder.add(NormalInterface.class); in getAllClasses() 42 builder.add(ApiAnnotation.class); in getAllClasses() 43 builder.add(PublicApiClass.class); in getAllClasses() 44 builder.add(SystemApiClass.class); in getAllClasses() 45 builder.add(PrivateClass.class); in getAllClasses() [all …]
|
/cts/tests/tests/appop/ndk-jni/android/app/appops/cts/ |
D | NDKAppOpsLoggingTest.cpp | 35 AAudioStreamBuilder *builder; in Java_android_app_appops_cts_AppOpsLoggingTestKt_nativeStartStopAudioRecord() local 36 aaudio_result_t result = AAudio_createStreamBuilder(&builder); in Java_android_app_appops_cts_AppOpsLoggingTestKt_nativeStartStopAudioRecord() 43 AAudioStreamBuilder_setDirection(builder, AAUDIO_DIRECTION_INPUT); in Java_android_app_appops_cts_AppOpsLoggingTestKt_nativeStartStopAudioRecord() 46 AAudioStreamBuilder_setPerformanceMode(builder, AAUDIO_PERFORMANCE_MODE_LOW_LATENCY); in Java_android_app_appops_cts_AppOpsLoggingTestKt_nativeStartStopAudioRecord() 48 AAudioStreamBuilder_setPerformanceMode(builder, AAUDIO_PERFORMANCE_MODE_NONE); in Java_android_app_appops_cts_AppOpsLoggingTestKt_nativeStartStopAudioRecord() 52 AAudioStreamBuilder_setSharingMode(builder, AAUDIO_SHARING_MODE_SHARED); in Java_android_app_appops_cts_AppOpsLoggingTestKt_nativeStartStopAudioRecord() 54 AAudioStreamBuilder_setSharingMode(builder, AAUDIO_SHARING_MODE_EXCLUSIVE); in Java_android_app_appops_cts_AppOpsLoggingTestKt_nativeStartStopAudioRecord() 57 AAudioStreamBuilder_setPackageName(builder, nativePackageName); in Java_android_app_appops_cts_AppOpsLoggingTestKt_nativeStartStopAudioRecord() 58 AAudioStreamBuilder_setAttributionTag(builder, nativeAttributionTag); in Java_android_app_appops_cts_AppOpsLoggingTestKt_nativeStartStopAudioRecord() 61 result = AAudioStreamBuilder_openStream(builder, &stream); in Java_android_app_appops_cts_AppOpsLoggingTestKt_nativeStartStopAudioRecord() [all …]
|
/cts/tests/autofillservice/src/android/autofillservice/cts/testcore/ |
D | CannedFillResponse.java | 102 private CannedFillResponse(Builder builder) { in CannedFillResponse() argument 103 mResponseType = builder.mResponseType; in CannedFillResponse() 104 mDatasets = builder.mDatasets; in CannedFillResponse() 105 mFailureMessage = builder.mFailureMessage; in CannedFillResponse() 106 mRequiredSavableIds = builder.mRequiredSavableIds; in CannedFillResponse() 107 mRequiredSavableAutofillIds = builder.mRequiredSavableAutofillIds; in CannedFillResponse() 108 mOptionalSavableIds = builder.mOptionalSavableIds; in CannedFillResponse() 109 mSaveDescription = builder.mSaveDescription; in CannedFillResponse() 110 mSaveType = builder.mSaveType; in CannedFillResponse() 111 mExtras = builder.mExtras; in CannedFillResponse() [all …]
|
/cts/tests/tests/nativemedia/aaudio/jni/ |
D | test_aaudio_mmap.cpp | 51 AAudioStreamBuilder *builder = nullptr; in TEST() local 57 EXPECT_EQ(AAUDIO_OK, AAudio_createStreamBuilder(&builder)); in TEST() 60 AAudioStreamBuilder_setPerformanceMode(builder, AAUDIO_PERFORMANCE_MODE_LOW_LATENCY); in TEST() 65 result = AAudioStreamBuilder_openStream(builder, &stream); in TEST() 73 AAudioStreamBuilder_delete(builder); in TEST() 80 AAudioStreamBuilder *builder = nullptr; in TEST() local 87 EXPECT_EQ(AAUDIO_OK, AAudio_createStreamBuilder(&builder)); in TEST() 90 AAudioStreamBuilder_setPerformanceMode(builder, AAUDIO_PERFORMANCE_MODE_LOW_LATENCY); in TEST() 91 AAudioStreamBuilder_setDirection(builder, AAUDIO_DIRECTION_OUTPUT); in TEST() 94 result = AAudioStreamBuilder_openStream(builder, &stream); in TEST() [all …]
|
/cts/tests/uwb/src/android/uwb/cts/ |
D | RangingMeasurementTest.java | 50 RangingMeasurement.Builder builder = new RangingMeasurement.Builder(); in testBuilder() local 52 builder.setStatus(status); in testBuilder() 53 tryBuild(builder, false); in testBuilder() 55 builder.setElapsedRealtimeNanos(time); in testBuilder() 56 tryBuild(builder, false); in testBuilder() 58 builder.setAngleOfArrivalMeasurement(angleMeasurement); in testBuilder() 59 tryBuild(builder, false); in testBuilder() 61 builder.setDistanceMeasurement(distanceMeasurement); in testBuilder() 62 tryBuild(builder, false); in testBuilder() 64 builder.setRemoteDeviceAddress(address); in testBuilder() [all …]
|
D | DistanceMeasurementTest.java | 45 DistanceMeasurement.Builder builder = new DistanceMeasurement.Builder(); in testBuilder() local 46 tryBuild(builder, false); in testBuilder() 48 builder.setMeters(meters); in testBuilder() 49 tryBuild(builder, false); in testBuilder() 51 builder.setErrorMeters(error); in testBuilder() 52 tryBuild(builder, false); in testBuilder() 54 builder.setConfidenceLevel(confidence); in testBuilder() 55 DistanceMeasurement measurement = tryBuild(builder, true); in testBuilder() 62 private DistanceMeasurement tryBuild(DistanceMeasurement.Builder builder, in tryBuild() argument 66 measurement = builder.build(); in tryBuild()
|
/cts/tests/app/src/android/app/cts/ |
D | ZenPolicyTest.java | 31 ZenPolicy.Builder builder = new ZenPolicy.Builder() in testWriteToParcel() local 37 ZenPolicy policy = builder.build(); in testWriteToParcel() 49 ZenPolicy.Builder builder = new ZenPolicy.Builder(); in testAlarms() local 50 ZenPolicy policy = builder.allowAlarms(true).build(); in testAlarms() 56 policy = builder.allowAlarms(false).build(); in testAlarms() 65 ZenPolicy.Builder builder = new ZenPolicy.Builder(); in testMedia() local 66 ZenPolicy policy = builder.allowMedia(true).build(); in testMedia() 72 policy = builder.allowMedia(false).build(); in testMedia() 81 ZenPolicy.Builder builder = new ZenPolicy.Builder(); in testSystem() local 82 ZenPolicy policy = builder.allowSystem(true).build(); in testSystem() [all …]
|
/cts/common/device-side/bedstead/dpmwrapper/src/main/java/com/android/bedstead/dpmwrapper/ |
D | Utils.java | 82 StringBuilder builder = new StringBuilder("["); in toString() local 83 filter.actionsIterator().forEachRemaining((s) -> builder.append(s).append(",")); in toString() 84 builder.deleteCharAt(builder.length() - 1); in toString() 85 return builder.append(']').toString(); in toString() 135 StringBuilder builder = new StringBuilder("[Intent: action="); in toString() local 138 builder.append("null"); in toString() 140 builder.append(action); in toString() 144 builder.append(", no_categories"); in toString() 146 builder.append(", ").append(categories.size()).append(" categories: ") in toString() 150 builder.append(", "); in toString() [all …]
|
/cts/tests/location/location_gnss/src/android/location/cts/gnss/asn1/base/ |
D | Asn1UTCTime.java | 109 StringBuilder builder = new StringBuilder(); in encodeToIA5String() local 110 builder.append(twoDigit.format(year % 100)); in encodeToIA5String() 111 builder.append(twoDigit.format(month)); in encodeToIA5String() 112 builder.append(twoDigit.format(day)); in encodeToIA5String() 113 builder.append(twoDigit.format(hour % 100)); in encodeToIA5String() 114 builder.append(twoDigit.format(minute)); in encodeToIA5String() 115 builder.append(twoDigit.format(second)); in encodeToIA5String() 116 builder.append("Z"); in encodeToIA5String() 119 result.setValue(builder.toString()); in encodeToIA5String() 124 StringBuilder builder = new StringBuilder(); in toHumanReadableString() local [all …]
|
/cts/tests/inputmethod/src/android/view/inputmethod/cts/util/ |
D | InputConnectionTestUtils.java | 46 final SpannableStringBuilder builder = new SpannableStringBuilder(); in formatString() local 53 selectionStart = builder.length(); in formatString() 56 selectionEnd = builder.length(); in formatString() 59 builder.append(U1F427.charAt(0)); // High surrogate in formatString() 62 builder.append(U1F427.charAt(1)); // Low surrogate in formatString() 65 builder.append(c); in formatString() 75 Selection.setSelection(builder, selectionStart, selectionEnd); in formatString() 76 return builder; in formatString()
|
/cts/tests/location/location_gnss/src/android/location/cts/gnss/asn1/supl2/rrlp_components/ |
D | Rel_98_MsrPosition_Rsp_Extension.java | 135 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getComponents() local 137 builder.add(new SequenceComponent() { in getComponents() 180 return builder.build(); in getComponents() 185 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getExtensionComponents() local 187 builder.add(new SequenceComponent() { in getExtensionComponents() 231 return builder.build(); in getExtensionComponents() 325 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getComponents() local 327 builder.add(new SequenceComponent() { in getComponents() 370 return builder.build(); in getComponents() 375 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getExtensionComponents() local [all …]
|
D | AccuracyOpt.java | 121 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getComponents() local 123 builder.add(new SequenceComponent() { in getComponents() 166 return builder.build(); in getComponents() 171 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getExtensionComponents() local 173 return builder.build(); in getExtensionComponents() 203 StringBuilder builder = new StringBuilder(); in toIndentedString() local 204 builder.append("AccuracyOpt = {\n"); in toIndentedString() 208 builder.append(internalIndent) in toIndentedString() 213 builder.append(internalIndent).append("...\n"); in toIndentedString() 216 builder.append(internalIndent) in toIndentedString() [all …]
|
D | MsrAssistData.java | 121 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getComponents() local 123 builder.add(new SequenceComponent() { in getComponents() 166 return builder.build(); in getComponents() 171 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getExtensionComponents() local 173 return builder.build(); in getExtensionComponents() 203 StringBuilder builder = new StringBuilder(); in toIndentedString() local 204 builder.append("MsrAssistData = {\n"); in toIndentedString() 208 builder.append(internalIndent) in toIndentedString() 213 builder.append(internalIndent).append("...\n"); in toIndentedString() 216 builder.append(internalIndent) in toIndentedString() [all …]
|
D | Rel_5_ProtocolError_Extension.java | 121 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getComponents() local 123 builder.add(new SequenceComponent() { in getComponents() 166 return builder.build(); in getComponents() 171 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getExtensionComponents() local 173 return builder.build(); in getExtensionComponents() 203 StringBuilder builder = new StringBuilder(); in toIndentedString() local 204 builder.append("Rel_5_ProtocolError_Extension = {\n"); in toIndentedString() 208 builder.append(internalIndent) in toIndentedString() 213 builder.append(internalIndent).append("...\n"); in toIndentedString() 216 builder.append(internalIndent) in toIndentedString() [all …]
|
/cts/tests/location/location_gnss/src/android/location/cts/gnss/asn1/supl2/ver2_ulp_components/ |
D | MeasResultEUTRA.java | 151 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getComponents() local 153 builder.add(new SequenceComponent() { in getComponents() 196 builder.add(new SequenceComponent() { in getComponents() 239 builder.add(new SequenceComponent() { in getComponents() 282 return builder.build(); in getComponents() 287 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getExtensionComponents() local 289 return builder.build(); in getExtensionComponents() 400 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getComponents() local 402 builder.add(new SequenceComponent() { in getComponents() 445 builder.add(new SequenceComponent() { in getComponents() [all …]
|
/cts/tests/location/location_gnss/src/android/location/cts/gnss/asn1/supl2/map_extensiondatatypes/ |
D | PrivateExtension.java | 106 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getComponents() local 108 return builder.build(); in getComponents() 113 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getExtensionComponents() local 115 return builder.build(); in getExtensionComponents() 143 StringBuilder builder = new StringBuilder(); in toIndentedString() local 144 builder.append("PrivateExtension = {\n"); in toIndentedString() 148 builder.append(internalIndent) in toIndentedString() 153 builder.append(internalIndent).append("...\n"); in toIndentedString() 156 builder.append(internalIndent) in toIndentedString() 161 builder.append(indent).append("};\n"); in toIndentedString() [all …]
|
/cts/tests/sensor/src/android/hardware/cts/helpers/ |
D | TestSensorEventListener.java | 200 StringBuilder builder = new StringBuilder(); in logCollectedEventsToFile() local 201 builder.append("Sensor='").append(mEnvironment.getSensor()).append("', "); in logCollectedEventsToFile() 202 builder.append("SamplingRateOverloaded=") in logCollectedEventsToFile() 204 builder.append("RequestedSamplingPeriod=") in logCollectedEventsToFile() 206 builder.append("MaxReportLatency=") in logCollectedEventsToFile() 208 builder.append("StartedTimestamp=") in logCollectedEventsToFile() 210 builder.append("StoppedTimestamp=") in logCollectedEventsToFile() 220 builder.append("\n"); in logCollectedEventsToFile() 221 builder.append("AP wake-up time=").append(deviceWakeUpTimeMs).append("ms"); in logCollectedEventsToFile() 224 builder.append("\n"); in logCollectedEventsToFile() [all …]
|
/cts/hostsidetests/inputmethodservice/deviceside/devicetest/src/android/inputmethodservice/cts/devicetest/ |
D | MoreCollectors.java | 48 public void accept(Builder<E> builder, E element) { in endingAt() 55 builder.accept(element); in endingAt() 59 Stream::builder, in endingAt() 61 (builder, builder2) -> { in endingAt() 85 public void accept(Builder<E> builder, E element) { in startingFrom() 87 builder.accept(element); in startingFrom() 92 builder.accept(element); in startingFrom() 97 Stream::builder, in startingFrom() 99 (builder, builder2) -> { in startingFrom()
|
/cts/tests/location/location_gnss/src/android/location/cts/gnss/asn1/supl2/ulp_components/ |
D | FrequencyInfoTDD.java | 121 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getComponents() local 123 builder.add(new SequenceComponent() { in getComponents() 166 return builder.build(); in getComponents() 171 ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); in getExtensionComponents() local 173 return builder.build(); in getExtensionComponents() 203 StringBuilder builder = new StringBuilder(); in toIndentedString() local 204 builder.append("FrequencyInfoTDD = {\n"); in toIndentedString() 208 builder.append(internalIndent) in toIndentedString() 213 builder.append(internalIndent).append("...\n"); in toIndentedString() 216 builder.append(internalIndent) in toIndentedString() [all …]
|