Home
last modified time | relevance | path

Searched refs:httpUrlConnection (Results 1 – 5 of 5) sorted by relevance

/packages/modules/AdServices/adservices/tests/unittest/service-core/measurement/src/com/android/adservices/service/measurement/reporting/
DEventReportSenderTest.java77 HttpURLConnection httpUrlConnection = Mockito.mock(HttpURLConnection.class); in testSendEventReport() local
80 Mockito.when(httpUrlConnection.getOutputStream()).thenReturn(outputStream); in testSendEventReport()
81 Mockito.when(httpUrlConnection.getResponseCode()).thenReturn(200); in testSendEventReport()
89 Mockito.doReturn(httpUrlConnection).when(spyEventReportSender) in testSendEventReport()
104 HttpURLConnection httpUrlConnection = Mockito.mock(HttpURLConnection.class); in testSendEventReportWithExtraHeaders() local
107 Mockito.when(httpUrlConnection.getOutputStream()).thenReturn(outputStream); in testSendEventReportWithExtraHeaders()
108 Mockito.when(httpUrlConnection.getResponseCode()).thenReturn(200); in testSendEventReportWithExtraHeaders()
116 Mockito.doReturn(httpUrlConnection) in testSendEventReportWithExtraHeaders()
128 verify(httpUrlConnection) in testSendEventReportWithExtraHeaders()
DAggregateReportSenderTest.java89 HttpURLConnection httpUrlConnection = Mockito.mock(HttpURLConnection.class); in testSendAggregateReport() local
92 Mockito.when(httpUrlConnection.getOutputStream()).thenReturn(outputStream); in testSendAggregateReport()
93 Mockito.when(httpUrlConnection.getResponseCode()).thenReturn(200); in testSendAggregateReport()
104 Mockito.doReturn(httpUrlConnection).when(spyAggregateReportSender) in testSendAggregateReport()
119 HttpURLConnection httpUrlConnection = Mockito.mock(HttpURLConnection.class); in testSendAggregateReportWithExtraHeaders() local
122 Mockito.when(httpUrlConnection.getOutputStream()).thenReturn(outputStream); in testSendAggregateReportWithExtraHeaders()
123 Mockito.when(httpUrlConnection.getResponseCode()).thenReturn(200); in testSendAggregateReportWithExtraHeaders()
134 Mockito.doReturn(httpUrlConnection) in testSendAggregateReportWithExtraHeaders()
146 verify(httpUrlConnection) in testSendAggregateReportWithExtraHeaders()
DDebugReportSenderTest.java40 HttpURLConnection httpUrlConnection = Mockito.mock(HttpURLConnection.class); in testSendDebugReport() local
43 Mockito.when(httpUrlConnection.getOutputStream()).thenReturn(outputStream); in testSendDebugReport()
44 Mockito.when(httpUrlConnection.getResponseCode()).thenReturn(200); in testSendDebugReport()
52 Mockito.doReturn(httpUrlConnection) in testSendDebugReport()
/packages/apps/Dialer/java/com/android/incallui/calllocation/impl/
DHttpFetcher.java128 HttpURLConnection httpUrlConnection = null; in sendRequestAsInputStream() local
131 httpUrlConnection = (HttpURLConnection) url.openConnection(); in sendRequestAsInputStream()
132 setMethodAndHeaders(httpUrlConnection, requestMethod, headers); in sendRequestAsInputStream()
133 int responseCode = httpUrlConnection.getResponseCode(); in sendRequestAsInputStream()
139 InputStream is = httpUrlConnection.getInputStream(); in sendRequestAsInputStream()
141 is = new HttpInputStreamWrapper(httpUrlConnection, is); in sendRequestAsInputStream()
149 if (httpUrlConnection != null && !isSuccess) { in sendRequestAsInputStream()
150 httpUrlConnection.disconnect(); in sendRequestAsInputStream()
268 final HttpURLConnection httpUrlConnection; field in HttpFetcher.HttpInputStreamWrapper
273 httpUrlConnection = conn; in HttpInputStreamWrapper()
[all …]
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/common/httpclient/
DAdServicesHttpsClient.java867 HttpURLConnection httpUrlConnection = (HttpURLConnection) urlConnection; in maybeDisconnect() local
868 httpUrlConnection.disconnect(); in maybeDisconnect()