summaryrefslogtreecommitdiff
path: root/core/java/android/util/ArrayMap.java
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2021-08-29 13:28:40 -0700
committerYohei Yukawa <yukawa@google.com>2021-08-29 13:28:40 -0700
commitba8cdf5dcf0f89239a306c11757c9c016434b669 (patch)
tree172a164fb26e062c2a59b72e9a5d9a51b8ba7de2 /core/java/android/util/ArrayMap.java
parent84710464117ae0440a412015b0ff7ab635be2fae (diff)
Use CompletableFuture instead
This CL converts our inhouse Completable class with CompletableFuture. One of downsides of switching into CompletableFuture is performance. It creates much more objects, especially in unsuccessful cases including timeout scenarios: * CompletableFuture#cancel() always creates a CancellationException object with full stack trace. This is going to be problematic when we start cancelling pending InputConnection tasks in Bug 195115071 from the IME client side. * Timeout cases always creates a TimeoutException object with a full stack trace. * Exception cases always creates a ExecutionException object with full stack trace. Also, none of its getter methods directly fits our existing use cases in the input method framework world. We must always use CompletableFutureUtil to retrieve the result value so as not to accidentally break existing APIs. Other than above, there should be no observable semantic behavior changes in this CL. Bug: 192412909 Bug: 195699814 Test: presubmit Test: atest -c FrameworksCoreTests:CompletableFutureUtilTest Change-Id: I215bbc870f952effa262fa431064b36ace28e8f4
Diffstat (limited to 'core/java/android/util/ArrayMap.java')
0 files changed, 0 insertions, 0 deletions