Adding ApexInfo utility

This is to get name/version when the HAL is started from an APEX. This
is the initial work and just prints name/version on startup.

Bug: 268439003
Test: adb logcat | grep com.google.android.widevine
Change-Id: I756c042d544f973999738f7d17022d916b9712cd
This commit is contained in:
Jooyung Han
2023-02-28 15:41:12 +09:00
parent e8add8eed8
commit f63f6011fa
8 changed files with 209 additions and 2 deletions

View File

@@ -22,11 +22,19 @@
#include "WVCreatePluginFactories.h"
#include "WVDrmFactory.h"
#include "widevine_apex_info.h"
using ::wvdrm::hardware::drm::widevine::createDrmFactory;
using ::wvdrm::hardware::drm::widevine::WVDrmFactory;
int main(int /* argc */, char** /* argv */) {
#ifdef __ANDROID_APEX__
{
auto info = widevine::apex::GetApexInfo();
CHECK(info.ok()) << info.error();
LOG(INFO) << "Starting from " << info->name << "(" << info->version << ")";
}
#endif
ABinderProcess_setThreadPoolMaxThreadCount(8);
std::shared_ptr<WVDrmFactory> drmFactory = createDrmFactory();