Home
last modified time | relevance | path

Searched defs:try (Results 1 – 25 of 866) sorted by relevance

12345678910>>...35

/aosp12/system/tools/xsdc/tests/src/com/android/xsdc/tests/
H A DXmlParserTest.java41 try (InputStream str = this.getClass().getClassLoader().getResourceAsStream( in testPurchaseSimple() method
56 try (InputStream str = this.getClass().getClassLoader().getResourceAsStream( in testPurchaseSimple() method
60 try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { in testPurchaseSimple() method
61 try(purchase.simple.XmlWriter writer = in testPurchaseSimple() method
74 try (InputStream str = this.getClass().getClassLoader().getResourceAsStream( in testNestedType() method
102 try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { in testSimpleComplexContent() method
103 try(simple.complex.content.XmlWriter writer = in testSimpleComplexContent() method
213 try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { in testPredefinedTypes() method
214 try(predefined.types.XmlWriter writer = in testPredefinedTypes() method
240 try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { in testSimpleType() method
[all …]
/aosp12/frameworks/base/core/tests/coretests/src/com/android/internal/os/
H A DKernelCpuProcStringReaderTest.java100 try (KernelCpuProcStringReader.ProcFileIterator iter = mReader.open()) { in testReadErrorsLimit() method
106 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testReadErrorsLimit() method
109 try (KernelCpuProcStringReader.ProcFileIterator iter = mReader.open()) { in testReadErrorsLimit() method
120 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testReadErrorsLimit() method
141 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testReadLine() method
144 try (KernelCpuProcStringReader.ProcFileIterator iter = mReader.open()) { in testReadLine() method
192 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testReadLineToArray() method
196 try (KernelCpuProcStringReader.ProcFileIterator iter = mReader.open()) { in testReadLineToArray() method
230 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testReadOverLimit() method
233 try (KernelCpuProcStringReader.ProcFileIterator iter = mReader.open()) { in testReadOverLimit() method
[all …]
/aosp12/packages/apps/Launcher3/tests/tapl/com/android/launcher3/tapl/
H A DBaseOverview.java51 try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck()) { in flingForward() method
57 try (LauncherInstrumentation.Closable c = in flingForwardImpl() method
65 try (LauncherInstrumentation.Closable c2 = in flingForwardImpl() method
77 try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); in dismissAllTasks() method
99 try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); in flingBackward() method
108 try (LauncherInstrumentation.Closable c2 = in flingBackward() method
123 try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); in scrollCurrentTaskOffScreen() method
132 try (LauncherInstrumentation.Closable c2 = in scrollCurrentTaskOffScreen() method
186 try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer( in getTasks() method
212 try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer( in getOverviewActions() method
[all …]
H A DOverviewActions.java41 try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); in clickAndDismissScreenshot() method
48 try (LauncherInstrumentation.Closable c1 = mLauncher.addContextLayer( in clickAndDismissScreenshot() method
60 try (LauncherInstrumentation.Closable c2 = mLauncher.addContextLayer( in clickAndDismissScreenshot() method
75 try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); in clickSelect() method
81 try (LauncherInstrumentation.Closable c1 = mLauncher.addContextLayer( in clickSelect() method
96 try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer( in getSelectModeButtons() method
H A DWorkspace.java75 try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); in switchToAllApps() method
114 try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer( in tryGetWorkspaceAppIcon() method
132 try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer( in getWorkspaceAppIcon() method
146 try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck()) { in ensureWorkspaceIsScrollable() method
177 try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck()) { in dragIcon() method
233 try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); in deleteAppIcon() method
361 try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck()) { in flingForward() method
375 try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck()) { in flingBackward() method
391 try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck()) { in openAllWidgets() method
414 try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer( in tryGetWidget() method
[all …]
H A DOverview.java47 try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); in switchToAllApps() method
65 try (LauncherInstrumentation.Closable c1 = mLauncher.addContextLayer( in switchToAllApps() method
75 try (LauncherInstrumentation.Closable c1 = mLauncher.addContextLayer( in dismissAllTasks() method
/aosp12/frameworks/base/services/core/java/com/android/server/soundtrigger_middleware/
H A DSoundTriggerMiddlewareService.java93 try (SafeCloseable ignored = establishIdentityDirect(identity)) { in listModulesAsOriginator() method
101 try (SafeCloseable ignored = establishIdentityIndirect(middlemanIdentity, in listModulesAsMiddleman() method
118 try (SafeCloseable ignored = establishIdentityIndirect( in attachAsMiddleman() method
153 try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { in loadModel() method
160 try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { in loadPhraseModel() method
167 try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { in unloadModel() method
175 try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { in startRecognition() method
182 try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { in stopRecognition() method
189 try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { in forceRecognitionEvent() method
197 try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { in setModelParameter() method
[all …]
H A DSoundTriggerHw2Watchdog.java49 try (Watchdog ignore = new Watchdog()) { in getProperties() method
57 try (Watchdog ignore = new Watchdog()) { in loadSoundModel() method
65 try (Watchdog ignore = new Watchdog()) { in loadPhraseSoundModel() method
72 try (Watchdog ignore = new Watchdog()) { in unloadSoundModel() method
79 try (Watchdog ignore = new Watchdog()) { in stopRecognition() method
86 try (Watchdog ignore = new Watchdog()) { in stopAllRecognitions() method
94 try (Watchdog ignore = new Watchdog()) { in startRecognition() method
101 try (Watchdog ignore = new Watchdog()) { in getModelState() method
108 try (Watchdog ignore = new Watchdog()) { in getModelParameter() method
115 try (Watchdog ignore = new Watchdog()) { in setModelParameter() method
[all …]
/aosp12/frameworks/base/core/tests/coretests/src/android/util/
H A DBinaryXmlTest.java111 try (OutputStream os = new FileOutputStream(file)) { in testResolve_File() method
116 try (InputStream is = new FileInputStream(file)) { in testResolve_File() method
122 try (OutputStream os = new FileOutputStream(file)) { in testResolve_File() method
127 try (InputStream is = new FileInputStream(file)) { in testResolve_File() method
137 try (ByteArrayOutputStream os = new ByteArrayOutputStream()) { in testResolve_Memory() method
143 try (InputStream is = new ByteArrayInputStream(data) { in testResolve_Memory() method
154 try (ByteArrayOutputStream os = new ByteArrayOutputStream()) { in testResolve_Memory() method
160 try (InputStream is = new ByteArrayInputStream(data) { in testResolve_Memory() method
/aosp12/frameworks/base/core/java/android/content/
H A DLoggingContentInterface.java107 try (Logger l = new Logger("getType", uri)) { in getType() method
120 try (Logger l = new Logger("getStreamTypes", uri, mimeTypeFilter)) { in getStreamTypes() method
132 try (Logger l = new Logger("canonicalize", uri)) { in canonicalize() method
144 try (Logger l = new Logger("uncanonicalize", uri)) { in uncanonicalize() method
183 try (Logger l = new Logger("insert", uri, initialValues, extras)) { in insert() method
196 try (Logger l = new Logger("bulkInsert", uri, initialValues)) { in bulkInsert() method
208 try (Logger l = new Logger("delete", uri, extras)) { in delete() method
221 try (Logger l = new Logger("update", uri, values, extras)) { in update() method
234 try (Logger l = new Logger("openFile", uri, mode, signal)) { in openFile() method
247 try (Logger l = new Logger("openAssetFile", uri, mode, signal)) { in openAssetFile() method
[all …]
/aosp12/packages/providers/MediaProvider/tests/src/com/android/providers/media/
H A DDatabaseHelperTest.java84 try (DatabaseHelper helper = new DatabaseHelperS(sIsolatedContext, TEST_CLEAN_DB)) { in testFilterVolumeNames() method
264 try (DatabaseHelper helper = before.getConstructor(Context.class, String.class) in assertDowngrade() method
283 try (DatabaseHelper helper = after.getConstructor(Context.class, String.class) in assertDowngrade() method
316 try (DatabaseHelper helper = before.getConstructor(Context.class, String.class) in assertRecompute() method
369 try (DatabaseHelper helper = after.getConstructor(Context.class, String.class) in assertRecompute() method
404 try (Cursor c = db.query("files", null, in assertRecompute() method
413 try (Cursor c = db.query("files", null, in assertRecompute() method
427 try (DatabaseHelper helper = before.getConstructor(Context.class, String.class) in assertUpgrade() method
432 try (DatabaseHelper helper = after.getConstructor(Context.class, String.class) in assertUpgrade() method
442 try (Cursor c1 = db.query("sqlite_master", in assertUpgrade() method
[all …]
H A DResolvePlaylistTest.java114 try (Cursor cursor = mIsolatedContext.getContentResolver().query( in doPlaylist() method
125 try (Cursor cursor = mIsolatedResolver.query(membersUri, new String[] { in doPlaylist() method
146 try (Cursor cursor = mIsolatedResolver.query(membersUri, new String[] { in doPlaylist() method
166 try (Cursor cursor = mIsolatedResolver.query(membersUri, new String[] { in doPlaylist() method
193 try (Cursor cursor = mIsolatedContext.getContentResolver().query( in testBrokenPlaylistM3u() method
204 try (Cursor cursor = mIsolatedResolver.query(membersUri, new String[] { in testBrokenPlaylistM3u() method
226 try (Cursor cursor = mIsolatedContext.getContentResolver().query(playlistUri, in testPlaylistDeletion() method
240 try (Cursor cursor = mIsolatedResolver.query(membersUri, null, null, null)) { in testPlaylistDeletion() method
260 try (Cursor cursor = mIsolatedContext.getContentResolver().query(playlistUri, in testPlaylistMembersDeletion() method
274 try (Cursor cursor = mIsolatedResolver.query(membersUri, null, null, null)) { in testPlaylistMembersDeletion() method
/aosp12/packages/services/Car/tests/carservice_unit_test/src/com/android/car/storagemonitoring/
H A DCarStorageMonitoringTest.java77 try (TemporaryFile lifetimeFile = new TemporaryFile(TAG)) { in testEMmcWearInformationProvider() method
78 try (TemporaryFile eolFile = new TemporaryFile(TAG)) { in testEMmcWearInformationProvider() method
99 try (TemporaryFile lifetimeFile = new TemporaryFile(TAG)) { in testUfsWearInformationProvider() method
227 try (TemporaryFile temporaryFile = new TemporaryFile(TAG)) { in testWearEstimateRecordJson() method
257 try (TemporaryFile temporaryFile = new TemporaryFile(TAG)) { in testWearHistoryJson() method
356 try (TemporaryFile statsFile = new TemporaryFile(TAG)) { in testUidIoStatEntry() method
402 try (TemporaryFile statsFile = new TemporaryFile(TAG)) { in testUidIoStatEntryMissingFields() method
417 try (TemporaryFile statsFile = new TemporaryFile(TAG)) { in testUidIoStatEntryNonNumericFields() method
470 try (TemporaryFile temporaryFile = new TemporaryFile(TAG)) { in testUidIoStatEntryJson() method
673 try (TemporaryFile temporaryFile = new TemporaryFile(TAG)) { in testUidIoStatsDeltaJson() method
[all …]
/aosp12/packages/services/Car/tests/carservice_test/src/com/android/car/audio/
H A DCarAudioZonesHelperTest.java152 try (InputStream versionOneStream = mContext.getResources().openRawResource( in loadAudioZones_versionOneParsesAllZones() method
300 try (InputStream missingAudioZoneIdStream = mContext.getResources().openRawResource( in loadAudioZones_passesOnMissingAudioZoneIdForPrimary() method
368 try (InputStream inputDevicesStream = mContext.getResources().openRawResource( in loadAudioZones_parsesInputDevices() method
429 try (InputStream inputDevicesStream = mContext.getResources().openRawResource( in loadAudioZones_failsOnEmptyInputDeviceAddress() method
444 try (InputStream nonNumericalStream = mContext.getResources().openRawResource( in loadAudioZones_failsOnNonNumericalAudioZoneId() method
472 try (InputStream inputDevicesStream = mContext.getResources().openRawResource( in loadAudioZones_failsOnMissingInputDevice() method
487 try (InputStream nonNumericalStream = mContext.getResources().openRawResource( in loadAudioZones_failsOnNonNumericalOccupantZoneId() method
515 try (InputStream inputDevicesStream = mContext.getResources().openRawResource( in loadAudioZones_failsOnNonExistentInputDevice() method
544 try (InputStream nonZeroForPrimaryStream = mContext.getResources().openRawResource( in loadAudioZones_failsOnNonZeroAudioZoneIdForPrimary() method
572 try (InputStream inputDevicesStream = mContext.getResources().openRawResource( in loadAudioZones_failsOnRepeatedInputDevice() method
[all …]
/aosp12/frameworks/base/services/core/java/com/android/server/om/
H A DIdmapDaemon.java117 try (Connection c = connect()) { in createIdmap() method
124 try (Connection c = connect()) { in removeIdmap() method
132 try (Connection c = connect()) { in verifyIdmap() method
139 try (Connection c = connect()) { in idmapExists() method
148 try (Connection c = connect()) { in createFabricatedOverlay() method
157 try (Connection c = connect()) { in deleteFabricatedOverlay() method
167 try (Connection c = connect()) { in getFabricatedOverlayInfos() method
187 try (Connection c = connect()) { in dumpIdmap() method
/aosp12/frameworks/base/core/tests/benchmarks/src/android/os/
H A DFileUtilsBenchmark.java48 try (FileOutputStream os = new FileOutputStream(mSrc)) { in setUp() method
55 try (FileInputStream in = new FileInputStream(mSrc); in timeRegularUserspace() method
64 try (FileInputStream in = new FileInputStream(mSrc); in timeRegularSendfile() method
73 try (MemoryPipe in = MemoryPipe.createSource(mData); in timePipeSourceUserspace() method
82 try (MemoryPipe in = MemoryPipe.createSource(mData); in timePipeSourceSplice() method
91 try (FileInputStream in = new FileInputStream(mSrc); in timePipeSinkUserspace() method
100 try (FileInputStream in = new FileInputStream(mSrc); in timePipeSinkSplice() method
/aosp12/packages/providers/MediaProvider/tests/src/com/android/providers/media/scan/
H A DModernMediaScannerTest.java589 try (Cursor cursor = mIsolatedResolver in testScan_Common() method
601 try (ParcelFileDescriptor pfd = mIsolatedResolver.openFile(uri, "wt", null)) { in testScan_Common() method
610 try (Cursor cursor = mIsolatedResolver in testScan_Common() method
796 try (Cursor cursor = mIsolatedResolver in testScan_audio_empty_title() method
815 try (Cursor cursor = mIsolatedResolver in testScan_audio_recording() method
834 try (Cursor cursor = mIsolatedResolver in testScan_148316354() method
856 try (Cursor cursor = in testScan_audioMp4_notRescanIfUnchanged() method
934 try (Cursor cursor = mIsolatedResolver in testScan_BitmapFile() method
1168 try (FileInputStream output = new FileInputStream( in executeShellCommandInternal() method
1243 try (Cursor cursor = mIsolatedResolver in testScan_TrackNumber() method
[all …]
/aosp12/packages/services/Mtp/tests/src/com/android/mtp/
H A DMtpDocumentsProviderTest.java153 try (final Cursor cursor = mProvider.queryRoots(columns)) { in testOpenDeviceOnDemand() method
561 try (final ParcelFileDescriptor fd = mProvider.openDocument("3", "r", null)) { in testOpenDocument() method
599 try (final ParcelFileDescriptor fd = mProvider.openDocument("3", "r", null)) { in testOpenDocument_shortBytes() method
613 try (ParcelFileDescriptor.AutoCloseOutputStream stream = in testOpenDocument_writing() method
621 try (ParcelFileDescriptor.AutoCloseInputStream stream = in testOpenDocument_writing() method
646 try (final Cursor cursor = mProvider.queryRoots(null)) { in testBusyDevice() method
667 try (final Cursor cursor = mProvider.queryRoots(null)) { in testLockedDevice() method
720 try (final Cursor cursor = mProvider.queryChildDocuments( in testMappingDisconnectedDocuments() method
741 try (final Cursor cursor = mProvider.queryChildDocuments( in testMappingDisconnectedDocuments() method
764 try (final Cursor cursor = mProvider.queryDocument(documentId, null)) { in testCreateDocument() method
[all …]
H A DMtpDatabaseTest.java280 try (final Cursor cursor = in testPutChildDocuments_operationsSupported() method
297 try (final Cursor cursor = in testPutChildDocuments_operationsSupported() method
313 try (final Cursor cursor = in testPutChildDocuments_operationsSupported() method
627 try (final Cursor cursor = mDatabase.queryRoots(resources, rootColumns)) { in testClearMtpIdentifierBeforeResolveRootDocuments() method
767 try (final Cursor oldCursor = in testFailToReplaceExisitingUnmappedRoots() method
785 try (final Cursor newCursor = mDatabase.queryChildDocuments( in testFailToReplaceExisitingUnmappedRoots() method
964 try (final Cursor cursor = mDatabase.queryRoots(resources, columns)) { in testGetClosedDevice() method
986 try (final Cursor cursor = in testMappingWithoutKey() method
1011 try (final Cursor cursor = in testMappingFailsWithoutKey() method
1084 try (final Cursor cursor = mDatabase.queryChildDocuments( in testCleanDatabase() method
[all …]
/aosp12/frameworks/base/core/java/com/android/internal/os/
H A DBatteryUsageStatsStore.java122 try (FileLock lock = lockSnapshotDirectory()) { in storeBatteryUsageStats() method
149 try (FileLock lock = lockSnapshotDirectory()) { in listBatteryUsageStatsTimestamps() method
175 try (FileLock lock = lockSnapshotDirectory()) { in loadBatteryUsageStats() method
194 try (FileLock lock = lockSnapshotDirectory()) { in setLastBatteryUsageStatsBeforeResetAtomPullTimestamp() method
195 try (InputStream in = mConfigFile.openRead()) { in setLastBatteryUsageStatsBeforeResetAtomPullTimestamp() method
222 try (FileLock lock = lockSnapshotDirectory()) { in getLastBatteryUsageStatsBeforeResetAtomPullTimestamp() method
223 try (InputStream in = mConfigFile.openRead()) { in getLastBatteryUsageStatsBeforeResetAtomPullTimestamp() method
251 try (OutputStream out = new FileOutputStream(file)) { in writeXmlFileLocked() method
262 try (InputStream in = new FileInputStream(file)) { in readXmlFileLocked() method
/aosp12/packages/apps/TV/src/com/android/tv/data/
H A DInternalDataUtils.java59 try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes))) { in deserializeInternalProviderData() method
81 try (ObjectOutputStream out = new ObjectOutputStream(bos)) { in serializeInternalProviderData() method
109 try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes))) { in deserializeInternalProviderData() method
127 try (ObjectOutputStream out = new ObjectOutputStream(bos)) { in serializeInternalProviderData() method
/aosp12/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
H A DWindowManagerSettingsTests.java61 try (BoolSettingsSession forceDesktopModeSession = new in testForceDesktopModeOnExternalDisplays() method
73 try (BoolSettingsSession freeformWindowSession = new in testFreeformWindow() method
87 try (BoolSettingsSession freeformWindowSession = new in testFreeformWindow_valueChanged_updatesDisplaySettings() method
109 try (BoolSettingsSession forceResizableSession = new in testForceResizableMode() method
122 try (BoolSettingsSession supportsNonResizableMultiWindowSession = new in testSupportsNonResizableMultiWindow() method
137 try (StringSettingsSession baseDisplaySettingsPathSession = new in testChangeBaseDisplaySettingsPath() method
/aosp12/packages/providers/MediaProvider/tests/client/src/com/android/providers/media/client/
H A DPublicVolumeTest.java78 try (OutputStream out = contentResolver.openOutputStream(targetUri)) { in testIncludeRecentlyUnmountedVolumes() method
90 try (Cursor c = contentResolver.query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, in testIncludeRecentlyUnmountedVolumes() method
98 try (Cursor c = contentResolver.query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, in testIncludeRecentlyUnmountedVolumes() method
106 try (Cursor c = contentResolver.query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, in testIncludeRecentlyUnmountedVolumes() method
/aosp12/packages/providers/TvProvider/tests/src/com/android/providers/tv/
H A DDatabaseHelperTest.java78 try (Cursor cursor = mResolver.query( in testUpgradeDatabase() method
82 try (Cursor cursor = mResolver.query( in testUpgradeDatabase() method
86 try (Cursor cursor = mResolver.query( in testUpgradeDatabase() method
90 try (Cursor cursor = mResolver.query( in testUpgradeDatabase() method
94 try (Cursor cursor = mResolver.query( in testUpgradeDatabase() method
98 try (Cursor cursor = mResolver.query( in testUpgradeDatabase() method
/aosp12/packages/modules/GeoTZ/s2storage/src/test/java/com/android/timezone/location/storage/block/
H A DBlockFileTest.java63 try (BlockFileWriter bfw = BlockFileWriter.open(magic, 1, blockFile)) { in testReadWrite() method
68 try (BlockFileReader bfr = BlockFileReader.open(memoryMapBlocks, blockFile, magic, 1)) { in testReadWrite() method
104 try (BlockFileWriter bfw = BlockFileWriter.open(magic, 2, blockFile)) { in blockIdBounds() method
111 try (BlockFileReader bfr = BlockFileReader.open(false, blockFile, magic, 2)) { in blockIdBounds() method
130 try (BlockFileWriter bfw = BlockFileWriter.open(magic, version, blockFile)) { in visit() method
138 try (BlockFileReader bfr = in visit() method

12345678910>>...35