Loading services/core/java/com/android/server/location/contexthub/ContextHubEndpointManager.java +5 −5 Original line number Diff line number Diff line Loading @@ -192,9 +192,10 @@ import java.util.function.Consumer; * This is separate from the constructor so that this may be passed into the callback registered * with the HAL. * * @throws InstantiationException on any failure * @throws InstantiationException on unexpected failure * @throws UnsupportedOperationException if not supported by the HAL */ /* package */ void init() throws InstantiationException { /* package */ void init() throws InstantiationException, UnsupportedOperationException { if (mSessionIdsValid) { throw new IllegalStateException("Already initialized"); } Loading @@ -214,12 +215,11 @@ import java.util.function.Consumer; if (mHubInterface == null) { throw new IllegalStateException("Received null IEndpointCommunication"); } } catch (RemoteException | IllegalStateException | ServiceSpecificException | UnsupportedOperationException e) { } catch (RemoteException | IllegalStateException | ServiceSpecificException e) { String error = "Failed to register ContextHubService as message hub"; Log.e(TAG, error, e); throw new InstantiationException(error); } } // Forward UnsupportedOperationException to caller int[] range = null; try { Loading services/core/java/com/android/server/location/contexthub/ContextHubService.java +6 −4 Original line number Diff line number Diff line Loading @@ -342,17 +342,19 @@ public class ContextHubService extends IContextHubService.Stub { new ContextHubEndpointManager( mContext, mContextHubWrapper, registry, mTransactionManager); mEndpointManager.init(); Log.i(TAG, "Enabling generic offload API"); } catch (InstantiationException e) { Log.d(TAG, "Enabling generic offload API"); } catch (InstantiationException | UnsupportedOperationException e) { mEndpointManager = null; registry = null; Log.w(TAG, "Generic offload API not supported, disabling"); if (e instanceof UnsupportedOperationException) { Log.d(TAG, "Generic offload API not supported by HAL"); } } mHubInfoRegistry = registry; } else { mHubInfoRegistry = null; mEndpointManager = null; Log.i(TAG, "Disabling generic offload API"); Log.d(TAG, "Disabling generic offload API due to flag config"); } initDefaultClientMap(); Loading Loading
services/core/java/com/android/server/location/contexthub/ContextHubEndpointManager.java +5 −5 Original line number Diff line number Diff line Loading @@ -192,9 +192,10 @@ import java.util.function.Consumer; * This is separate from the constructor so that this may be passed into the callback registered * with the HAL. * * @throws InstantiationException on any failure * @throws InstantiationException on unexpected failure * @throws UnsupportedOperationException if not supported by the HAL */ /* package */ void init() throws InstantiationException { /* package */ void init() throws InstantiationException, UnsupportedOperationException { if (mSessionIdsValid) { throw new IllegalStateException("Already initialized"); } Loading @@ -214,12 +215,11 @@ import java.util.function.Consumer; if (mHubInterface == null) { throw new IllegalStateException("Received null IEndpointCommunication"); } } catch (RemoteException | IllegalStateException | ServiceSpecificException | UnsupportedOperationException e) { } catch (RemoteException | IllegalStateException | ServiceSpecificException e) { String error = "Failed to register ContextHubService as message hub"; Log.e(TAG, error, e); throw new InstantiationException(error); } } // Forward UnsupportedOperationException to caller int[] range = null; try { Loading
services/core/java/com/android/server/location/contexthub/ContextHubService.java +6 −4 Original line number Diff line number Diff line Loading @@ -342,17 +342,19 @@ public class ContextHubService extends IContextHubService.Stub { new ContextHubEndpointManager( mContext, mContextHubWrapper, registry, mTransactionManager); mEndpointManager.init(); Log.i(TAG, "Enabling generic offload API"); } catch (InstantiationException e) { Log.d(TAG, "Enabling generic offload API"); } catch (InstantiationException | UnsupportedOperationException e) { mEndpointManager = null; registry = null; Log.w(TAG, "Generic offload API not supported, disabling"); if (e instanceof UnsupportedOperationException) { Log.d(TAG, "Generic offload API not supported by HAL"); } } mHubInfoRegistry = registry; } else { mHubInfoRegistry = null; mEndpointManager = null; Log.i(TAG, "Disabling generic offload API"); Log.d(TAG, "Disabling generic offload API due to flag config"); } initDefaultClientMap(); Loading