diff options
author | Ruchi Kandoi <kandoiruchi@google.com> | 2018-06-28 10:55:40 -0700 |
---|---|---|
committer | Ruchi Kandoi <kandoiruchi@google.com> | 2018-07-03 16:32:09 +0000 |
commit | 8c3120040e48bad823bc5ea053995d8594a952d5 (patch) | |
tree | 6668b41e8149ea14164b84556c200a2a784f46bb | |
parent | 0f8b45235b612ac4d7a9cd7af7233039e4358b81 (diff) | |
download | SecureElement-8c3120040e48bad823bc5ea053995d8594a952d5.tar.gz |
Fix race conditions where the HAL service starts after client pollsandroid-9.0.0_r35android-9.0.0_r34android-9.0.0_r33android-9.0.0_r32android-9.0.0_r31android-9.0.0_r30android-9.0.0_r22android-9.0.0_r21android-9.0.0_r20android-9.0.0_r19android-9.0.0_r16pie-qpr2-releasepie-qpr1-s3-releasepie-qpr1-s2-releasepie-qpr1-s1-releasepie-qpr1-releasepie-dr1-dev
getService(<instance>, true) will wait for the service to start.
Test: Add delays and check if the client waits;
Bug: 110053681
Bug: 110972464
Change-Id: I5a0b708e93274810c2852837429695213da50b7b
-rw-r--r-- | src/com/android/se/Terminal.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/se/Terminal.java b/src/com/android/se/Terminal.java index b3bedba..bc46bab 100644 --- a/src/com/android/se/Terminal.java +++ b/src/com/android/se/Terminal.java @@ -155,7 +155,7 @@ public class Terminal { */ public void initialize() throws NoSuchElementException, RemoteException { synchronized (mLock) { - mSEHal = ISecureElement.getService(mName); + mSEHal = ISecureElement.getService(mName, true); if (mSEHal == null) { throw new NoSuchElementException("No HAL is provided for " + mName); } |