diff options
| author | 2024-12-13 09:23:59 -0800 | |
|---|---|---|
| committer | 2024-12-13 09:23:59 -0800 | |
| commit | bd0648d549c8742920953bf9c96612a49bffe807 (patch) | |
| tree | e9fa7ed966c662fc82b24df06f3d11db61cc2115 | |
| parent | e549b5b11084f7083d43dc6abda31c7bfbfc9283 (diff) | |
| parent | f3722be6f593706b1c597e2f8de52ca851372f01 (diff) | |
Merge "Fix race condition in HubEndpoint active sessions" into main
| -rw-r--r-- | core/java/android/hardware/contexthub/HubEndpoint.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/java/android/hardware/contexthub/HubEndpoint.java b/core/java/android/hardware/contexthub/HubEndpoint.java index b251aa1abc0d..99f331f43450 100644 --- a/core/java/android/hardware/contexthub/HubEndpoint.java +++ b/core/java/android/hardware/contexthub/HubEndpoint.java @@ -404,11 +404,11 @@ public class HubEndpoint { HubEndpointSession newSession; try { - // Request system service to assign session id. - int sessionId = mServiceToken.openSession(destinationInfo, serviceDescriptor); - - // Save the newly created session synchronized (mLock) { + // Request system service to assign session id. + int sessionId = mServiceToken.openSession(destinationInfo, serviceDescriptor); + + // Save the newly created session newSession = new HubEndpointSession( sessionId, |