Home
last modified time | relevance | path

Searched refs:IoUtils (Results 1 – 25 of 59) sorted by relevance

123

/packages/services/Car/service/src/com/android/car/telemetry/
DResultStore.java33 import com.android.car.telemetry.util.IoUtils;
110 PersistableBundle interimResultBundle = IoUtils.readBundle(file); in loadInterimResultsIntoMemory()
150 IoUtils.deleteSilently(mMetricsReportDirectory, metricsConfigName); in getMetricsReports()
274 data = IoUtils.readBundle(file); in getPublisherData()
352 IoUtils.deleteSilently(mInterimResultDirectory, metricsConfigName); in removeInterimResult()
360 IoUtils.deleteSilently(mMetricsReportDirectory, metricsConfigName); in removeMetricsReports()
368 IoUtils.deleteSilently(mErrorResultDirectory, metricsConfigName); in removeErrorResult()
376 IoUtils.deleteSilently(mPublisherDataDirectory, publisherName); in removePublisherData()
396 IoUtils.deleteAllSilently(mInterimResultDirectory); in removeAllResults()
397 IoUtils.deleteAllSilently(mMetricsReportDirectory); in removeAllResults()
[all …]
DMetricsConfigStore.java31 import com.android.car.telemetry.util.IoUtils;
99 IoUtils.writeProto(mConfigDirectory, metricsConfig.getName(), metricsConfig); in addMetricsConfig()
119 return IoUtils.deleteSilently(mConfigDirectory, metricsConfigName); in removeMetricsConfig()
125 IoUtils.deleteAllSilently(mConfigDirectory); in removeAllMetricsConfigs()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/telemetry/util/
DIoUtilsTest.java59 assertThat(IoUtils.readBundle(mTestFile).toString()).isEqualTo(bundle.toString()); in testReadBundle()
66 assertThrows(IOException.class, () -> IoUtils.readBundle(mTestFile)); in testReadBundle_invalidBundle_shouldThrowException()
76 IoUtils.writeBundle(mTestFile, bundle); in testWriteBundle()
86 IoUtils.writeProto(mTestFile, config); in testWriteProto_metricsConfig()
96 IoUtils.writeProto(mTestFile, error); in testWriteProto_telemetryError()
105 assertThat(IoUtils.deleteSilently(mTestDir, mTestFile.getName())).isTrue(); in testDeleteIfExists()
106 assertThat(IoUtils.deleteSilently(mTestDir, mTestFile.getName())).isFalse(); in testDeleteIfExists()
116 IoUtils.deleteAllSilently(mTestDir); in testDeleteAll()
132 IoUtils.deleteOldFiles(1_000_000L, mTestDir); in testDeleteStaleData()
/packages/modules/Connectivity/staticlibs/testutils/devicetests/com/android/testutils/
DDumpTestUtils.java30 import libcore.io.IoUtils;
77 IoUtils.closeQuietly(pipe[1]); in dumpService()
82 IoUtils.closeQuietly(pipe[0]); in dumpService()
83 if (pipe[1].valid()) IoUtils.closeQuietly(pipe[1]); in dumpService()
DPacketBridge.kt33 import libcore.io.IoUtils
97 IoUtils.setBlocking(internalFd, true /* blocking */) in start()
98 IoUtils.setBlocking(externalFd, true /* blocking */) in start()
/packages/modules/OnDevicePersonalization/tests/servicetests/src/com/android/ondevicepersonalization/services/util/
DIoUtilsTest.java38 String modelFile = IoUtils.writeToFile(context, fileName, data); in testIoApis_success()
41 IoUtils.createFileDescriptor(modelFile, ParcelFileDescriptor.MODE_READ_ONLY); in testIoApis_success()
43 ByteBuffer buffer = IoUtils.getByteBufferFromFd(fd); in testIoApis_success()
/packages/services/Car/car-builtin-lib/src/android/car/builtin/os/
DBinderHelper.java33 import libcore.io.IoUtils;
145 IoUtils.closeQuietly(in); in onTransactForCmd()
146 IoUtils.closeQuietly(out); in onTransactForCmd()
147 IoUtils.closeQuietly(err); in onTransactForCmd()
/packages/apps/UniversalMediaPlayer/java/com/android/pump/util/
DIoUtils.java34 public final class IoUtils { class
35 private static final String TAG = Clog.tag(IoUtils.class);
37 private IoUtils() { } in IoUtils() method in IoUtils
DHttp.java135 IoUtils.writeToStream(outputStream, data); in getOrPost()
141 return IoUtils.readFromStream(inputStream); in getOrPost()
143 IoUtils.close(inputStream); in getOrPost()
144 IoUtils.close(outputStream); in getOrPost()
160 byte[] responseBody = IoUtils.readFromStream(errorStream); in checkResponseCode()
165 IoUtils.close(errorStream); in checkResponseCode()
DImageLoader.java151 data = IoUtils.readFromFile(new File(mUri.getPath())); in run()
208 return IoUtils.readFromAssetFileDescriptor(assetFileDescriptor); in readFromContent()
210 IoUtils.close(assetFileDescriptor); in readFromContent()
/packages/modules/Connectivity/tests/unit/java/com/android/internal/net/
DNetworkUtilsInternalTest.java39 import libcore.io.IoUtils;
51 IoUtils.closeQuietly(Os.socket(domain, type, 0)); in expectSocketSuccess()
59 IoUtils.closeQuietly(Os.socket(domain, type, 0)); in expectSocketPemissionError()
/packages/modules/OnDevicePersonalization/src/com/android/ondevicepersonalization/services/util/
DIoUtils.java32 public class IoUtils { class
35 private static final String TAG = IoUtils.class.getSimpleName();
37 private IoUtils() {} in IoUtils() method in IoUtils
/packages/modules/Permission/service/java/com/android/permission/persistence/
DIoUtils.java26 public class IoUtils { class
28 private IoUtils() {} in IoUtils() method in IoUtils
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/utils/
DIoUtils.java19 public final class IoUtils { class
20 private IoUtils() { in IoUtils() method in IoUtils
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/telemetry/
DResultStoreTest.java33 import com.android.car.telemetry.util.IoUtils;
120 IoUtils.writeProto( in testFlushToDisk_shouldRemoveStaleData()
219 IoUtils.writeProto( in testGetMetricsReports_whenMultipleReports_shouldReceiveCorrectList()
238 IoUtils.writeProto( in testGetMetricsReports_whenDeleteFlagTrue_shouldDeleteData()
259 IoUtils.writeProto( in testGetAllMetricsReports_shouldReturnMapWithBundle()
436 IoUtils.writeProto( in testRemoveFinalReports()
474 IoUtils.writeProto( in testRemoveResult()
509 IoUtils.writeProto( in testGetFinishedMetricsConfigNames()
/packages/modules/Connectivity/framework/src/android/net/
DNetwork.java33 import libcore.io.IoUtils;
216 if (failed) IoUtils.closeQuietly(socket); in connectToHost()
241 if (failed) IoUtils.closeQuietly(socket); in createSocket()
254 if (failed) IoUtils.closeQuietly(socket); in createSocket()
272 if (failed) IoUtils.closeQuietly(socket); in createSocket()
/packages/services/Car/car-lib/src/android/car/
DCarBugreportManager.java31 import libcore.io.IoUtils;
229 IoUtils.closeQuietly(output); in requestBugreport()
230 IoUtils.closeQuietly(extraOutput); in requestBugreport()
/packages/services/Car/service/src/com/android/car/systeminterface/
DSystemPowerControlHelper.java24 import libcore.io.IoUtils;
113 String fileContents = IoUtils.readFileAsString(sysFsPowerControlFile).trim(); in isSuspendTypeSupported()
/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DDownloadIdleService.java42 import libcore.io.IoUtils;
133 IoUtils.closeQuietly(cursor); in cleanStale()
183 IoUtils.closeQuietly(cursor); in cleanOrphans()
DDownloadStorageProvider.java59 import libcore.io.IoUtils;
304 IoUtils.closeQuietly(cursor); in queryDocument()
351 IoUtils.closeQuietly(cursor); in queryChildDocuments()
417 IoUtils.closeQuietly(cursor); in queryRecentDocuments()
450 IoUtils.closeQuietly(cursor); in querySearchDocuments()
561 IoUtils.closeQuietly(cursor); in getFileForDocId()
849 IoUtils.closeQuietly(c); in queryForSingleItem()
852 IoUtils.closeQuietly(c); in queryForSingleItem()
859 IoUtils.closeQuietly(c); in queryForSingleItem()
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/
DIkeUdpSocket.java28 import libcore.io.IoUtils;
121 IoUtils.close(mSocket); in close()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/systeminterface/
DSystemPowerControlHelperTest.java29 import libcore.io.IoUtils;
74 assertThat(IoUtils.readFileAsString(powerStateControlFile.getFile().getAbsolutePath())) in testHelperMockedFileWrite()
/packages/modules/Connectivity/framework/src/android/net/util/
DDnsUtils.java32 import libcore.io.IoUtils;
181 IoUtils.closeQuietly(socket); in findSrcAddress()
373 IoUtils.closeQuietly(socket); in checkConnectivity()
/packages/modules/Connectivity/service-t/src/com/android/server/
DIpSecXfrmController.java42 import libcore.io.IoUtils;
122 IoUtils.closeQuietly(fd); in releaseNetlinkSocket()
/packages/services/Car/service/src/com/android/car/telemetry/databroker/
DDataBrokerImpl.java57 import com.android.car.telemetry.util.IoUtils;
555 IoUtils.closeQuietly(readFd); in invokeScriptForLargeInput()
556 IoUtils.closeQuietly(writeFd); in invokeScriptForLargeInput()
559 IoUtils.closeQuietly(readFd); in invokeScriptForLargeInput()

123