Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ad82f5d authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Reorder operations in ContextHubEndpointBroker#onHalRestart." into main

parents 2bf65fdd c9c15817
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -648,12 +648,6 @@ public class ContextHubEndpointBroker extends IContextHubEndpoint.Stub
     * @param hubInterface The new interface to the Context Hub HAL.
     */
    /* package */ void onHalRestart(@NonNull IEndpointCommunication hubInterface) {
        synchronized (mOpenSessionLock) {
            for (int i = mSessionMap.size() - 1; i >= 0; i--) {
                int id = mSessionMap.keyAt(i);
                onCloseEndpointSession(id, Reason.HUB_RESET);
            }
        }
        synchronized (mRegistrationLock) {
            if (mIsRegistered) {
                mIsRegistered = false;
@@ -665,6 +659,12 @@ public class ContextHubEndpointBroker extends IContextHubEndpoint.Stub
                }
            }
        }
        synchronized (mOpenSessionLock) {
            for (int i = mSessionMap.size() - 1; i >= 0; i--) {
                int id = mSessionMap.keyAt(i);
                onCloseEndpointSession(id, Reason.HUB_RESET);
            }
        }
    }

    /* package */ Optional<Byte> onEndpointSessionOpenRequest(