Loading contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHub.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -47,5 +47,6 @@ interface IContextHub { void onHostEndpointDisconnected(char hostEndpointId); long[] getPreloadedNanoappIds(); void onNanSessionStateChanged(in boolean state); const int EX_CONTEXT_HUB_UNSPECIFIED = -1; void setTestMode(in boolean enable); const int EX_CONTEXT_HUB_UNSPECIFIED = (-1); } contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/NanoappBinary.aidl +3 −3 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ parcelable NanoappBinary { byte targetChreApiMajorVersion; byte targetChreApiMinorVersion; byte[] customBinary; const int FLAG_SIGNED = 1; const int FLAG_ENCRYPTED = 2; const int FLAG_TCM_CAPABLE = 4; const int FLAG_SIGNED = (1 << 0); const int FLAG_ENCRYPTED = (1 << 1); const int FLAG_TCM_CAPABLE = (1 << 2); } contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Setting.aidl +6 −6 Original line number Diff line number Diff line Loading @@ -35,10 +35,10 @@ package android.hardware.contexthub; @Backing(type="byte") @VintfStability enum Setting { LOCATION = 1, WIFI_MAIN = 2, WIFI_SCANNING = 3, AIRPLANE_MODE = 4, MICROPHONE = 5, BT_MAIN = 6, BT_SCANNING = 7, WIFI_MAIN, WIFI_SCANNING, AIRPLANE_MODE, MICROPHONE, BT_MAIN, BT_SCANNING, } contexthub/aidl/android/hardware/contexthub/IContextHub.aidl +16 −0 Original line number Diff line number Diff line Loading @@ -216,6 +216,22 @@ interface IContextHub { */ void onNanSessionStateChanged(in boolean state); /** * Puts the context hub in and out of test mode. Test mode is a clean state * where tests can be executed in the same environment. If enable is true, * this will enable test mode by unloading all nanoapps. If enable is false, * this will disable test mode and reverse the actions of enabling test mode * by loading all preloaded nanoapps. This puts CHRE in a normal state. * * This should only be used for a test environment, either through a * @TestApi or development tools. This should not be used in a production * environment. * * @param enable If true, put the context hub in test mode. If false, disable * test mode. */ void setTestMode(in boolean enable); /** * Error codes that are used as service specific errors with the AIDL return * value EX_SERVICE_SPECIFIC. Loading contexthub/aidl/default/ContextHub.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,10 @@ ScopedAStatus ContextHub::sendMessageToHub(int32_t in_contextHubId, } } ScopedAStatus ContextHub::setTestMode(bool /* enable */) { return ndk::ScopedAStatus::ok(); } ScopedAStatus ContextHub::onHostEndpointConnected(const HostEndpointInfo& in_info) { mConnectedHostEndpoints.insert(in_info.hostEndpointId); Loading Loading
contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHub.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -47,5 +47,6 @@ interface IContextHub { void onHostEndpointDisconnected(char hostEndpointId); long[] getPreloadedNanoappIds(); void onNanSessionStateChanged(in boolean state); const int EX_CONTEXT_HUB_UNSPECIFIED = -1; void setTestMode(in boolean enable); const int EX_CONTEXT_HUB_UNSPECIFIED = (-1); }
contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/NanoappBinary.aidl +3 −3 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ parcelable NanoappBinary { byte targetChreApiMajorVersion; byte targetChreApiMinorVersion; byte[] customBinary; const int FLAG_SIGNED = 1; const int FLAG_ENCRYPTED = 2; const int FLAG_TCM_CAPABLE = 4; const int FLAG_SIGNED = (1 << 0); const int FLAG_ENCRYPTED = (1 << 1); const int FLAG_TCM_CAPABLE = (1 << 2); }
contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Setting.aidl +6 −6 Original line number Diff line number Diff line Loading @@ -35,10 +35,10 @@ package android.hardware.contexthub; @Backing(type="byte") @VintfStability enum Setting { LOCATION = 1, WIFI_MAIN = 2, WIFI_SCANNING = 3, AIRPLANE_MODE = 4, MICROPHONE = 5, BT_MAIN = 6, BT_SCANNING = 7, WIFI_MAIN, WIFI_SCANNING, AIRPLANE_MODE, MICROPHONE, BT_MAIN, BT_SCANNING, }
contexthub/aidl/android/hardware/contexthub/IContextHub.aidl +16 −0 Original line number Diff line number Diff line Loading @@ -216,6 +216,22 @@ interface IContextHub { */ void onNanSessionStateChanged(in boolean state); /** * Puts the context hub in and out of test mode. Test mode is a clean state * where tests can be executed in the same environment. If enable is true, * this will enable test mode by unloading all nanoapps. If enable is false, * this will disable test mode and reverse the actions of enabling test mode * by loading all preloaded nanoapps. This puts CHRE in a normal state. * * This should only be used for a test environment, either through a * @TestApi or development tools. This should not be used in a production * environment. * * @param enable If true, put the context hub in test mode. If false, disable * test mode. */ void setTestMode(in boolean enable); /** * Error codes that are used as service specific errors with the AIDL return * value EX_SERVICE_SPECIFIC. Loading
contexthub/aidl/default/ContextHub.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,10 @@ ScopedAStatus ContextHub::sendMessageToHub(int32_t in_contextHubId, } } ScopedAStatus ContextHub::setTestMode(bool /* enable */) { return ndk::ScopedAStatus::ok(); } ScopedAStatus ContextHub::onHostEndpointConnected(const HostEndpointInfo& in_info) { mConnectedHostEndpoints.insert(in_info.hostEndpointId); Loading