Home
last modified time | relevance | path

Searched refs:autoCloseable (Results 1 – 2 of 2) sorted by relevance

/cts/tests/framework/base/windowmanager/util/src/android/server/wm/
DObjectTracker.java57 public <T extends AutoCloseable> T manage(@NonNull T autoCloseable) { in manage() argument
61 mAutoCloseables.add(autoCloseable); in manage()
62 return autoCloseable; in manage()
69 public void close(@NonNull AutoCloseable autoCloseable) { in close() argument
73 mAutoCloseables.remove(autoCloseable); in close()
75 autoCloseable.close(); in close()
77 throw new AssertionError("Failed to close " + autoCloseable, e); in close()
98 final AutoCloseable autoCloseable = mAutoCloseables.removeLast(); in tearDown() local
100 autoCloseable.close(); in tearDown()
102 StateLogger.logE("Failed to close " + autoCloseable, t); in tearDown()
/cts/tests/inputmethod/src/android/view/inputmethod/cts/
DFocusHandlingTest.java750 private CloseOnce(@NonNull AutoCloseable autoCloseable) { in CloseOnce() argument
751 mAutoCloseable = autoCloseable; in CloseOnce()
760 static CloseOnce of(@NonNull AutoCloseable autoCloseable) { in of() argument
761 return new CloseOnce(autoCloseable); in of()