From 6134198b782aae115b921f68fb71bd63e2aad558 Mon Sep 17 00:00:00 2001
From: Hunsuk Choi <forestchoi@google.com>
Date: Thu, 8 Feb 2024 15:23:46 +0000
Subject: [PATCH] Make binder call non-blocked in DomainSelectionService

Decrease the possibility for DomainSelectionService
to block the telephony process.
If a binder call should be blocked, executeMethodAsync
shall be used instead of executeMethodAsyncNoException.

Bug: 324406469
Test: atest DomainSelectionServiceTestOnMockModem
Change-Id: I18167a4dbfa79a61048b0d5df6dca05b2cc946ff
---
 telephony/java/android/telephony/DomainSelectionService.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/telephony/java/android/telephony/DomainSelectionService.java b/telephony/java/android/telephony/DomainSelectionService.java
index 3c11da5f2daa..4ff9712f0907 100644
--- a/telephony/java/android/telephony/DomainSelectionService.java
+++ b/telephony/java/android/telephony/DomainSelectionService.java
@@ -831,7 +831,7 @@ public abstract class DomainSelectionService extends Service {
             @NonNull String tag, @NonNull String errorLogName) {
         try {
             CompletableFuture.runAsync(
-                    () -> TelephonyUtils.runWithCleanCallingIdentity(r), executor).join();
+                    () -> TelephonyUtils.runWithCleanCallingIdentity(r), executor);
         } catch (CancellationException | CompletionException e) {
             Rlog.w(tag, "Binder - " + errorLogName + " exception: " + e.getMessage());
         }
-- 
GitLab