summaryrefslogtreecommitdiff
path: root/telephony/common
diff options
context:
space:
mode:
authorPeter Wang <tpwang@google.com>2019-10-29 15:56:31 -0700
committerPeter Wang <tpwang@google.com>2020-01-15 14:25:18 -0800
commitf7eb0fa7976715e72bf4d9bdcf95ea1bda346cdc (patch)
tree0a44177e78fcf989a3ea845959512ddeb41598de /telephony/common
parent9edf72d04157a226743e5dbe737aaaafad8d5ce5 (diff)
[Telephony Mainline] Refactored PermissionManager
to expose grantDefaultPermissionsToEnabledImsServices,grantDefaultPermissionsToEnabledTelephonyDataServices,revokeDefaultPermissionsFromDisabledTelephonyDataServices Bug: 138745534 Test: Build and ImsServiceControllerTest Change-Id: I9a7cf7a3a960e23fc943f58a67baed354c0d2a92
Diffstat (limited to 'telephony/common')
-rw-r--r--telephony/common/com/android/internal/telephony/util/TelephonyUtils.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/telephony/common/com/android/internal/telephony/util/TelephonyUtils.java b/telephony/common/com/android/internal/telephony/util/TelephonyUtils.java
index 2abcc76fdccc..a7ad884ca107 100644
--- a/telephony/common/com/android/internal/telephony/util/TelephonyUtils.java
+++ b/telephony/common/com/android/internal/telephony/util/TelephonyUtils.java
@@ -28,6 +28,8 @@ import android.os.RemoteException;
import android.os.SystemProperties;
import java.io.PrintWriter;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;
/**
@@ -137,4 +139,12 @@ public final class TelephonyUtils {
}
return ret;
}
+
+ /** Wait for latch to trigger */
+ public static void waitUntilReady(CountDownLatch latch, long timeoutMs) {
+ try {
+ latch.await(timeoutMs, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException ignored) {
+ }
+ }
}