Loading contexthub/1.0/default/Contexthub.cpp +7 −10 Original line number Diff line number Diff line Loading @@ -440,9 +440,6 @@ Return<Result> Contexthub::loadNanoApp(uint32_t hubId, // Data from the nanoapp header is passed through HIDL as explicit fields, // but the legacy HAL expects it prepended to the binary, therefore we must // reconstruct it here prior to passing to the legacy HAL. uint32_t targetChreApiVersion = (appBinary.targetChreApiMajorVersion << 24) | (appBinary.targetChreApiMinorVersion << 16); const struct nano_app_binary_t header = { .header_version = htole32(1), .magic = htole32(NANOAPP_MAGIC), Loading @@ -450,8 +447,8 @@ Return<Result> Contexthub::loadNanoApp(uint32_t hubId, .app_version = htole32(appBinary.appVersion), .flags = htole32(appBinary.flags), .hw_hub_type = htole64(0), .reserved[0] = htole32(targetChreApiVersion), .reserved[1] = 0, .target_chre_api_major_version = appBinary.targetChreApiMajorVersion, .target_chre_api_minor_version = appBinary.targetChreApiMinorVersion, }; const uint8_t *headerBytes = reinterpret_cast<const uint8_t *>(&header); Loading Loading
contexthub/1.0/default/Contexthub.cpp +7 −10 Original line number Diff line number Diff line Loading @@ -440,9 +440,6 @@ Return<Result> Contexthub::loadNanoApp(uint32_t hubId, // Data from the nanoapp header is passed through HIDL as explicit fields, // but the legacy HAL expects it prepended to the binary, therefore we must // reconstruct it here prior to passing to the legacy HAL. uint32_t targetChreApiVersion = (appBinary.targetChreApiMajorVersion << 24) | (appBinary.targetChreApiMinorVersion << 16); const struct nano_app_binary_t header = { .header_version = htole32(1), .magic = htole32(NANOAPP_MAGIC), Loading @@ -450,8 +447,8 @@ Return<Result> Contexthub::loadNanoApp(uint32_t hubId, .app_version = htole32(appBinary.appVersion), .flags = htole32(appBinary.flags), .hw_hub_type = htole64(0), .reserved[0] = htole32(targetChreApiVersion), .reserved[1] = 0, .target_chre_api_major_version = appBinary.targetChreApiMajorVersion, .target_chre_api_minor_version = appBinary.targetChreApiMinorVersion, }; const uint8_t *headerBytes = reinterpret_cast<const uint8_t *>(&header); Loading