Class ShadowContextHubManager


  • @Implements(value=android.hardware.location.ContextHubManager.class,
                minSdk=24,
                isInAndroidSdk=false,
                looseSignatures=true)
    public class ShadowContextHubManager
    extends java.lang.Object
    Shadow for ContextHubManager.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Object createClient​(java.lang.Object contextHubInfo, java.lang.Object contextHubClientCallback)  
      protected java.lang.Object createClient​(java.lang.Object contextHubInfo, java.lang.Object contextHubClientCallback, java.lang.Object executor)  
      protected int[] getContextHubHandles()
      Provides an array of fake handles.
      protected android.hardware.location.ContextHubInfo getContextHubInfo​(int hubHandle)  
      protected java.util.List<android.hardware.location.ContextHubInfo> getContextHubs()
      Provides a list with fake ContextHubInfos.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShadowContextHubManager

        public ShadowContextHubManager()
    • Method Detail

      • getContextHubs

        @Implementation(minSdk=28)
        @HiddenApi
        protected java.util.List<android.hardware.location.ContextHubInfo> getContextHubs()
        Provides a list with fake ContextHubInfos.

        ContextHubInfo describes an optional physical chip on the device. This does not exist in test; this implementation allows to avoid possible NPEs.

      • createClient

        @Implementation(minSdk=28)
        @HiddenApi
        protected java.lang.Object createClient​(java.lang.Object contextHubInfo,
                                                java.lang.Object contextHubClientCallback)
      • createClient

        @Implementation(minSdk=28)
        @HiddenApi
        protected java.lang.Object createClient​(java.lang.Object contextHubInfo,
                                                java.lang.Object contextHubClientCallback,
                                                java.lang.Object executor)
      • getContextHubHandles

        @Implementation
        @HiddenApi
        protected int[] getContextHubHandles()
        Provides an array of fake handles.

        These describe an optional physical chip on the device which does not exist during testing. This implementation enables testing of classes that utilize these APIs.

      • getContextHubInfo

        @Implementation
        @HiddenApi
        protected android.hardware.location.ContextHubInfo getContextHubInfo​(int hubHandle)