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

Commit b1491487 authored by Madhav Iyengar's avatar Madhav Iyengar Committed by Android (Google) Code Review
Browse files

Merge "contexthub: Handle unsupported APIs" into main

parents 33c0bf2d 175884b6
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -326,8 +326,15 @@ public class ContextHubService extends IContextHubService.Stub {
        }

        if (Flags.offloadApi()) {
            mHubInfoRegistry = new HubInfoRegistry(mContextHubWrapper);
            HubInfoRegistry registry;
            try {
                registry = new HubInfoRegistry(mContextHubWrapper);
                Log.i(TAG, "Enabling generic offload API");
            } catch (UnsupportedOperationException e) {
                registry = null;
                Log.w(TAG, "Generic offload API not supported, disabling");
            }
            mHubInfoRegistry = registry;
        } else {
            mHubInfoRegistry = null;
            Log.i(TAG, "Disabling generic offload API");