summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/hardware/contexthub/HubEndpoint.java8
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,