/cts/apps/VpnApp/src/com/android/cts/vpnfirewall/ |
D | Ipv4Packet.java | 42 public Ipv4Packet(DataInputStream stream) throws IOException { in Ipv4Packet() argument 43 int versionIhl = stream.readUnsignedByte(); in Ipv4Packet() 47 type = stream.readUnsignedByte(); in Ipv4Packet() 48 totalLength = stream.readUnsignedShort(); in Ipv4Packet() 49 identification = stream.readUnsignedShort(); in Ipv4Packet() 50 flagsAndOffset = stream.readUnsignedShort(); in Ipv4Packet() 51 timeToLive = stream.readUnsignedByte(); in Ipv4Packet() 52 protocol = stream.readUnsignedByte(); in Ipv4Packet() 53 int checksum = stream.readUnsignedShort(); in Ipv4Packet() 57 stream.read(address, 0, address.length); in Ipv4Packet() [all …]
|
D | IcmpMessage.java | 31 IcmpMessage(DataInputStream stream, int length) throws IOException { in IcmpMessage() argument 32 type = stream.readUnsignedByte(); in IcmpMessage() 33 code = stream.readUnsignedByte(); in IcmpMessage() 34 int checksum = stream.readUnsignedShort(); in IcmpMessage() 35 quench = stream.readInt() & 0xFFFFFFFFL; in IcmpMessage() 39 int len = stream.read(data, 0, dataLength); in IcmpMessage() 45 stream.reset(); in IcmpMessage() 46 stream.readFully(original); in IcmpMessage() 54 DataOutputStream stream = new DataOutputStream(output); in getEncoded() local 56 stream.writeByte(type); in getEncoded() [all …]
|
/cts/tests/tests/nativemedia/aaudio/jni/ |
D | test_aaudio.cpp | 51 AAudioStream* stream() const { return mHelper->stream(); } in stream() function in AAudioStreamTest 58 AAudioStream_setBufferSizeInFrames(stream(), 0); in checkCallsAfterRelease() 59 AAudioStream_setBufferSizeInFrames(stream(), 99999999); in checkCallsAfterRelease() 63 AAudioStream_requestStart(stream())); in checkCallsAfterRelease() 64 EXPECT_EQ(AAUDIO_STREAM_STATE_CLOSING, AAudioStream_getState(stream())); in checkCallsAfterRelease() 66 if (AAudioStream_getDirection(stream()) == AAUDIO_DIRECTION_OUTPUT) { in checkCallsAfterRelease() 68 AAudioStream_requestPause(stream())); in checkCallsAfterRelease() 70 EXPECT_EQ(AAUDIO_STREAM_STATE_CLOSING, AAudioStream_getState(stream())); in checkCallsAfterRelease() 72 AAudioStream_requestStop(stream())); in checkCallsAfterRelease() 73 EXPECT_EQ(AAUDIO_STREAM_STATE_CLOSING, AAudioStream_getState(stream())); in checkCallsAfterRelease() [all …]
|
D | test_aaudio_mmap.cpp | 52 AAudioStream *stream = nullptr; in TEST() local 65 result = AAudioStreamBuilder_openStream(builder, &stream); in TEST() 72 AAudioStream_close(stream); in TEST() 81 AAudioStream *stream = nullptr; in TEST() local 94 result = AAudioStreamBuilder_openStream(builder, &stream); in TEST() 96 ASSERT_TRUE(AAudioExtensions::getInstance().isMMapUsed(stream)); // MMAP? in TEST() 99 AAudioStream_close(stream); in TEST()
|
D | test_aaudio_callback.cpp | 33 static int32_t measureLatency(AAudioStream *stream) { in measureLatency() argument 37 int32_t sampleRate = AAudioStream_getSampleRate(stream); in measureLatency() 38 int64_t framesWritten = AAudioStream_getFramesWritten(stream); in measureLatency() 39 aaudio_result_t result = AAudioStream_getTimestamp(stream, in measureLatency() 145 static void MyErrorCallbackProc(AAudioStream *stream, void *userData, aaudio_result_t error); 148 AAudioStream* stream() const { return mHelper->stream(); } in stream() function in AAudioStreamCallbackTest 169 AAudioStream *stream, void *userData, void *audioData, int32_t numFrames); 215 ASSERT_FALSE(AAudioExtensions::getInstance().isMMapUsed(mHelper->stream())); in SetUp() 225 const int32_t streamFramesPerDataCallback = AAudioStream_getFramesPerDataCallback(stream()); in TEST_P() 244 EXPECT_NE(AAUDIO_UNSPECIFIED, AAudioStream_getDeviceId(stream())); in TEST_P() [all …]
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-8332/ |
D | poc.c | 59 opj_stream_private_t * stream = NULL; in allocate_stream() local 61 stream = (opj_stream_private_t*) opj_calloc(1, sizeof(opj_stream_private_t)); in allocate_stream() 62 if (!stream) { in allocate_stream() 66 stream->m_buffer_size = OPJ_J2K_STREAM_CHUNK_SIZE; in allocate_stream() 67 stream->m_stored_data = (OPJ_BYTE *) opj_malloc(OPJ_J2K_STREAM_CHUNK_SIZE); in allocate_stream() 68 if (!stream->m_stored_data) { in allocate_stream() 69 opj_free(stream); in allocate_stream() 73 stream->m_current_data = stream->m_stored_data; in allocate_stream() 74 stream->m_status |= OPJ_STREAM_STATUS_INPUT; in allocate_stream() 75 stream->m_opj_skip = opj_stream_read_skip; in allocate_stream() [all …]
|
/cts/tests/inputmethod/mockime/src/com/android/cts/mockime/ |
D | ImeEventStreamTestUtils.java | 81 public static ImeEvent expectEvent(@NonNull ImeEventStream stream, in expectEvent() argument 83 return expectEvent(stream, condition, EventFilterMode.CHECK_ENTER_EVENT_ONLY, timeout); in expectEvent() 102 public static ImeEvent expectEvent(@NonNull ImeEventStream stream, in expectEvent() argument 110 "event not found within the timeout: " + stream.dump()); in expectEvent() 126 result = stream.seekToFirst(combinedCondition); in expectEvent() 135 throw new NullPointerException("found event is null: " + stream.dump()); in expectEvent() 137 stream.skip(1); in expectEvent() 140 throw new RuntimeException("expectEvent failed: " + stream.dump(), e); in expectEvent() 223 public static ImeEvent expectCommand(@NonNull ImeEventStream stream, 233 return expectEvent(stream, predicate, EventFilterMode.CHECK_EXIT_EVENT_ONLY, timeout); [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/ |
D | RingerModeActivity.java | 147 private void testStreamMuting(int stream) { in testStreamMuting() argument 148 if (stream == AudioManager.STREAM_VOICE_CALL) { in testStreamMuting() 150 mAudioManager.adjustStreamVolume(stream, AudioManager.ADJUST_MUTE, 0); in testStreamMuting() 151 … assertFalse("Muting stream " + stream + " should require MODIFY_PHONE_STATE permission.", in testStreamMuting() 152 mAudioManager.isStreamMute(stream)); in testStreamMuting() 154 mAudioManager.adjustStreamVolume(stream, AudioManager.ADJUST_MUTE, 0); in testStreamMuting() 155 assertTrue("Muting stream " + stream + " failed.", in testStreamMuting() 156 mAudioManager.isStreamMute(stream)); in testStreamMuting() 158 mAudioManager.adjustStreamVolume(stream, AudioManager.ADJUST_UNMUTE, 0); in testStreamMuting() 159 assertFalse("Unmuting stream " + stream + " failed.", in testStreamMuting() [all …]
|
/cts/tests/inputmethod/src/android/view/inputmethod/cts/ |
D | InputMethodServiceTest.java | 157 final ImeEventStream stream = imeSession.openEventStream(); 160 expectEvent(stream, event -> "onStartInputView".equals(event.getEventName()), TIMEOUT); 165 expectCommand(stream, command, TIMEOUT).getReturnBooleanValue()); 174 final ImeEventStream stream = imeSession.openEventStream(); 177 expectEvent(stream, event -> "onStartInputView".equals(event.getEventName()), TIMEOUT); 180 expectCommand(stream, command, TIMEOUT); 187 expectEvent(stream, backKeyDownMatcher(true), CHECK_EXIT_EVENT_ONLY, TIMEOUT); 226 final ImeEventStream stream = imeSession.openEventStream(); 229 expectEvent(stream, event -> "onStartInputView".equals(event.getEventName()), TIMEOUT); 234 expectEvent(stream, event -> "hideSoftInput".equals(event.getEventName()), TIMEOUT); [all …]
|
D | KeyboardVisibilityControlTest.java | 192 final ImeEventStream stream = imeSession.openEventStream(); 197 expectEvent(stream, editorMatcher("onStartInput", marker), TIMEOUT); 198 notExpectEvent(stream, editorMatcher("onStartInputView", marker), TIMEOUT); 208 expectEvent(stream, showSoftInputMatcher(InputMethod.SHOW_EXPLICIT), TIMEOUT); 209 expectEvent(stream, editorMatcher("onStartInputView", marker), TIMEOUT); 210 expectEventWithKeyValue(stream, "onWindowVisibilityChanged", "visible", 218 expectEvent(stream, hideSoftInputMatcher(), TIMEOUT); 219 expectEvent(stream, onFinishInputViewMatcher(false), TIMEOUT); 220 expectEventWithKeyValue(stream, "onWindowVisibilityChanged", "visible", 235 final ImeEventStream stream = imeSession.openEventStream(); [all …]
|
D | InputConnectionBlockingMethodTest.java | 142 void run(@NonNull MockImeSession session, @NonNull ImeEventStream stream) throws Exception; in run() argument 192 final ImeEventStream stream = imeSession.openEventStream(); in testInputConnection() local 217 expectBindInput(stream, Process.myPid(), TIMEOUT); in testInputConnection() 220 expectEvent(stream, editorMatcher("onStartInput", marker), TIMEOUT); in testInputConnection() 222 testProcedure.run(imeSession, stream); in testInputConnection() 266 testInputConnection(Wrapper::new, (MockImeSession session, ImeEventStream stream) -> { in testGetTextAfterCursor() 269 expectCommand(stream, command, TIMEOUT).getReturnCharSequenceValue(); in testGetTextAfterCursor() 295 testInputConnection(Wrapper::new, (MockImeSession session, ImeEventStream stream) -> { in testGetTextAfterCursorFailWithTimeout() 299 final ImeEvent result = expectCommand(stream, command, LONG_TIMEOUT); in testGetTextAfterCursorFailWithTimeout() 326 testInputConnection(Wrapper::new, (MockImeSession session, ImeEventStream stream) -> { in testGetTextAfterCursorFailFastAfterUnbindInput() [all …]
|
D | FocusHandlingTest.java | 143 final ImeEventStream stream = imeSession.openEventStream(); in testOnStartInputCalledOnceIme() local 149 expectBindInput(stream, Process.myPid(), TIMEOUT); in testOnStartInputCalledOnceIme() 157 expectEvent(stream, editorMatcher("onStartInput", marker), TIMEOUT); in testOnStartInputCalledOnceIme() 159 assertFalse(stream.dump(), onStart.getEnterState().hasFallbackInputConnection()); in testOnStartInputCalledOnceIme() 160 assertFalse(stream.dump(), onStart.getArguments().getBoolean("restarting")); in testOnStartInputCalledOnceIme() 163 notExpectEvent(stream, editorMatcherRestartingFalse("onStartInput", marker), in testOnStartInputCalledOnceIme() 174 final ImeEventStream stream = imeSession.openEventStream(); in testSoftInputStateAlwaysVisibleWithoutFocusedEditorView() local 198 notExpectEvent(stream, editorMatcher("onStartInput", marker), TIMEOUT); in testSoftInputStateAlwaysVisibleWithoutFocusedEditorView() 200 notExpectEvent(stream, event -> "showSoftInput".equals(event.getEventName()), in testSoftInputStateAlwaysVisibleWithoutFocusedEditorView() 204 expectBindInput(stream, Process.myPid(), TIMEOUT); in testSoftInputStateAlwaysVisibleWithoutFocusedEditorView() [all …]
|
D | InputMethodServiceStrictModeTest.java | 121 final ImeEventStream stream = imeSession.openEventStream(); in verifyIms() local 124 expectEvent(stream, event -> "onStartInput".equals(event.getEventName()), TIMEOUT); in verifyIms() 126 final ImeEventStream forkedStream = clearAllEvents(stream, "onStrictModeViolated"); in verifyIms() 142 notExpectEvent(stream, event -> "onStrictModeViolated".equals(event.getEventName()), in verifyIms() 157 final ImeEventStream stream = imeSession.openEventStream(); in testIncorrectContextUseOnImsDerivedDisplayContext() local 160 expectEvent(stream, event -> "onStartInput".equals(event.getEventName()), TIMEOUT); in testIncorrectContextUseOnImsDerivedDisplayContext() 164 ImeEventStream forkedStream = clearAllEvents(stream, "onStrictModeViolated"); in testIncorrectContextUseOnImsDerivedDisplayContext() 168 expectEvent(stream, event -> "onStrictModeViolated".equals(event.getEventName()), in testIncorrectContextUseOnImsDerivedDisplayContext() 173 forkedStream = clearAllEvents(stream, "onStrictModeViolated"); in testIncorrectContextUseOnImsDerivedDisplayContext() 177 expectEvent(stream, event -> "onStrictModeViolated".equals(event.getEventName()), in testIncorrectContextUseOnImsDerivedDisplayContext() [all …]
|
D | InputMethodStartInputLifecycleTest.java | 100 final ImeEventStream stream = imeSession.openEventStream(); in testInputConnectionStateWhenScreenStateChanges() local 130 expectEvent(stream, editorMatcher("onStartInput", marker), TIMEOUT); in testInputConnectionStateWhenScreenStateChanges() 139 expectEvent(stream, onFinishInputMatcher(), TIMEOUT); in testInputConnectionStateWhenScreenStateChanges() 140 notExpectEvent(stream, editorMatcher("onStartInput", marker), TIMEOUT); in testInputConnectionStateWhenScreenStateChanges() 144 expectEvent(stream, onFinishInputMatcher(), TIMEOUT); in testInputConnectionStateWhenScreenStateChanges() 148 expectCommand(stream, commit, TIMEOUT); in testInputConnectionStateWhenScreenStateChanges() 159 expectEvent(stream, editorMatcher("onStartInput", marker), TIMEOUT); in testInputConnectionStateWhenScreenStateChanges() 162 notExpectEvent(stream, onFinishInputMatcher(), TIMEOUT); in testInputConnectionStateWhenScreenStateChanges() 167 expectCommand(stream, commit1, TIMEOUT); in testInputConnectionStateWhenScreenStateChanges() 188 final ImeEventStream stream = imeSession.openEventStream(); in testNoStartNewInputWhileOtherProcessHasWindowFocus() local [all …]
|
D | SearchViewTest.java | 127 final ImeEventStream stream = imeSession.openEventStream(); in testTapThenSetQuery() local 136 expectBindInput(stream, Process.myPid(), TIMEOUT); in testTapThenSetQuery() 139 expectEvent(stream, event -> in testTapThenSetQuery() 148 expectEvent(stream, event -> "hideSoftInput".equals(event.getEventName()), TIMEOUT); in testTapThenSetQuery() 160 final ImeEventStream stream = imeSession.openEventStream(); in testShowImeWithSearchViewFocus() local 165 expectBindInput(stream, Process.myPid(), TIMEOUT); in testShowImeWithSearchViewFocus() 172 expectEvent(stream, event -> in testShowImeWithSearchViewFocus() 187 final ImeEventStream stream = imeSession.openEventStream(); in testShowImeWhenSearchViewFocusInListView() local 196 expectBindInput(stream, Process.myPid(), TIMEOUT); in testShowImeWhenSearchViewFocusInListView() 199 expectEvent(stream, event -> in testShowImeWhenSearchViewFocusInListView() [all …]
|
/cts/hostsidetests/media/app/MediaMetricsTest/jni/ |
D | aaudio_stream.cpp | 33 AAudioStream *stream = nullptr; in tryOpeningStream() local 34 ASSERT_EQ(AAUDIO_OK, AAudioStreamBuilder_openStream(builder, &stream)); in tryOpeningStream() 35 ASSERT_NE(nullptr, stream); in tryOpeningStream() 36 ASSERT_EQ(direction, AAudioStream_getDirection(stream)); in tryOpeningStream() 38 ASSERT_EQ(AAUDIO_OK, AAudioStream_requestStart(stream)); in tryOpeningStream() 39 ASSERT_EQ(AAUDIO_OK, AAudioStream_requestStop(stream)); in tryOpeningStream() 43 ASSERT_EQ(AAUDIO_OK, AAudioStream_close(stream)); in tryOpeningStream()
|
/cts/hostsidetests/inputmethodservice/deviceside/devicetest/src/android/inputmethodservice/cts/devicetest/ |
D | InputMethodManagerDeviceTest.java | 74 pollingCheck(() -> mImm.getInputMethodList().stream().anyMatch( in testIme1InInputMethodList() 86 assertFalse(mImm.getInputMethodList().stream().anyMatch( in testIme1NotInInputMethodList() 96 pollingCheck(() -> mImm.getEnabledInputMethodList().stream().anyMatch( in testIme1InEnabledInputMethodList() 108 assertFalse(mImm.getEnabledInputMethodList().stream().anyMatch( in testIme1NotInEnabledInputMethodList() 118 pollingCheck(() -> mImm.getInputMethodList().stream().anyMatch( in testIme2InInputMethodList() 130 assertFalse(mImm.getInputMethodList().stream().anyMatch( in testIme2NotInInputMethodList() 140 pollingCheck(() -> mImm.getEnabledInputMethodList().stream().anyMatch( in testIme2InEnabledInputMethodList() 152 assertFalse(mImm.getEnabledInputMethodList().stream().anyMatch( in testIme2NotInEnabledInputMethodList() 163 pollingCheck(() -> mImm.getInputMethodList().stream() in testIme1ImplicitlyEnabledSubtypeExists() 165 .flatMap(imi -> mImm.getEnabledInputMethodSubtypeList(imi, true).stream()) in testIme1ImplicitlyEnabledSubtypeExists() [all …]
|
/cts/tests/tests/media/src/android/media/cts/ |
D | AudioManagerTest.java | 97 import java.util.stream.Collectors; 98 import java.util.stream.IntStream; 695 for (int stream : streams) { in testVolume() 696 if (mIsSingleVolume && stream != STREAM_MUSIC) { in testVolume() 703 int maxVolume = mAudioManager.getStreamMaxVolume(stream); in testVolume() 704 int minVolume = mAudioManager.getStreamMinVolume(stream); in testVolume() 713 mAudioManager.setStreamVolume(stream, minNonZeroVolume, 0); in testVolume() 715 assertEquals(maxVolume, mAudioManager.getStreamVolume(stream)); in testVolume() 718 assertEquals(String.format("stream=%d", stream), in testVolume() 719 minNonZeroVolume, mAudioManager.getStreamVolume(stream)); in testVolume() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/streamquality/ |
D | StreamingVideoActivity.java | 82 Stream stream = (Stream) o; in equals() local 83 return name.equals(stream.name) in equals() 84 && code.equals(stream.code) in equals() 85 && uri.equals(stream.uri); in equals() 198 for (Stream stream : HTTP_STREAMS) { 199 addStreamToTests(adapter, stream); 218 Stream stream = new Stream(name, code, rtspUrl); 219 addStreamToTests(adapter, stream); 222 private void addStreamToTests(ArrayTestListAdapter streams, Stream stream) { 224 i.putExtra(PlayVideoActivity.EXTRA_STREAM, stream); [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/tv/ |
D | TestSequence.java | 5 import java.util.stream.Collectors; 36 steps.stream() in init() 37 .flatMap(step -> step.createUiElements().stream()) in init() 55 return steps.stream() in getFailureDetails() 63 boolean allTestStepsPass = steps.stream().allMatch(step -> step.hasPassed()); in onAllStepsDone()
|
/cts/hostsidetests/theme/app/src/android/theme/app/ |
D | GenerateBitmapTask.java | 79 FileOutputStream stream = null; in doInBackground() local 81 stream = new FileOutputStream(file); in doInBackground() 82 success = bitmap.compress(CompressFormat.PNG, 100, stream); in doInBackground() 84 if (stream != null) { in doInBackground() 85 stream.flush(); in doInBackground() 86 stream.close(); in doInBackground()
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/ |
D | MultiDisplaySystemDecorationTests.java | 91 import java.util.stream.Collectors; 211 return windowManagerState.getMatchingWindowType(TYPE_WALLPAPER).stream().anyMatch( in isWallpaperOnDisplay() 284 List<WindowState> navWindows = expected.stream().filter(ws -> in waitAndAssertNavBarStatesAreTheSame() 406 final ImeEventStream stream = mockImeSession.openEventStream(); in testImeWindowCanSwitchToDifferentDisplays() local 411 expectEvent(stream, editorMatcher("onStartInput", in testImeWindowCanSwitchToDifferentDisplays() 415 showSoftInputAndAssertImeShownOnDisplay(newDisplay.mId, imeTestActivitySession, stream); in testImeWindowCanSwitchToDifferentDisplays() 424 expectEvent(stream, editorMatcher("onStartInput", in testImeWindowCanSwitchToDifferentDisplays() 428 showSoftInputAndAssertImeShownOnDisplay(DEFAULT_DISPLAY, imeTestActivitySession2, stream); in testImeWindowCanSwitchToDifferentDisplays() 455 final ImeEventStream stream = mockImeSession.openEventStream(); in testImeApiForBug118341760() local 457 expectEvent(stream, event -> { in testImeApiForBug118341760() [all …]
|
/cts/tests/tests/appop/ndk-jni/android/app/appops/cts/ |
D | NDKAppOpsLoggingTest.cpp | 60 AAudioStream *stream; in Java_android_app_appops_cts_AppOpsLoggingTestKt_nativeStartStopAudioRecord() local 61 result = AAudioStreamBuilder_openStream(builder, &stream); in Java_android_app_appops_cts_AppOpsLoggingTestKt_nativeStartStopAudioRecord() 67 result = AAudioStream_requestStart(stream); in Java_android_app_appops_cts_AppOpsLoggingTestKt_nativeStartStopAudioRecord() 74 AAudioStream_requestStop(stream); in Java_android_app_appops_cts_AppOpsLoggingTestKt_nativeStartStopAudioRecord() 75 AAudioStream_close(stream); in Java_android_app_appops_cts_AppOpsLoggingTestKt_nativeStartStopAudioRecord()
|
/cts/tests/musicrecognition/src/android/musicrecognition/cts/ |
D | CtsMusicRecognitionService.java | 54 public void onRecognize(@NonNull ParcelFileDescriptor stream, in onRecognize() argument 61 sWatcher.stream = readStream(stream); in onRecognize() 72 private byte[] readStream(ParcelFileDescriptor stream) { in readStream() argument 74 new ParcelFileDescriptor.AutoCloseInputStream(stream); in readStream() 99 public byte[] stream; field in CtsMusicRecognitionService.Watcher
|
/cts/suite/audio_quality/client/src/com/android/cts/audiotest/ |
D | CtsAudioClientActivity.java | 68 int setVolume(int stream, int level) { in setVolume() argument 70 mgr.setStreamMute(stream, false); in setVolume() 74 targetLevel = mgr.getStreamMaxVolume(stream); in setVolume() 76 mgr.setStreamVolume(stream, targetLevel, 0); in setVolume()
|