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

Commit 1996c0b2 authored by Matthew Sedam's avatar Matthew Sedam Committed by Android (Google) Code Review
Browse files

Merge "Reduce locking in ContextHubTransactionManager" into main

parents 9be12da0 e38d5e03
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -444,8 +444,17 @@ public class ContextHubService extends IContextHubService.Stub {
        mSupportedContextHubPerms = hubInfo.second;
        mContextHubInfoList = new ArrayList<>(mContextHubIdToInfoMap.values());
        mClientManager = new ContextHubClientManager(mContext, mContextHubWrapper);
        mTransactionManager = new ContextHubTransactionManager(

        if (Flags.reduceLockingContextHubTransactionManager()) {
            mTransactionManager =
                    new ContextHubTransactionManager(
                            mContextHubWrapper, mClientManager, mNanoAppStateManager);
        } else {
            mTransactionManager =
                    new ContextHubTransactionManagerOld(
                            mContextHubWrapper, mClientManager, mNanoAppStateManager);
        }

        mSensorPrivacyManagerInternal =
                LocalServices.getService(SensorPrivacyManagerInternal.class);
        return true;