wvcdm: filter logs by app uid

This commit is a combination of the following:
* http://go/wvgerrit/117003
* http://go/wvgerrit/118303

Bug: 162255728
Test: MediaDrmTest#testGetLogMessages
Change-Id: I5699b64d5c4bab463e5b587595fa7d324dc1d93f
This commit is contained in:
Robert Shih
2021-03-01 08:53:15 -08:00
parent 1ffc6ab16a
commit 7cb52c1ccf
19 changed files with 127 additions and 16 deletions

View File

@@ -435,6 +435,7 @@ class WatchDog {
status_ = OEMCrypto_SUCCESS;
gave_up_ = false;
sandbox_id_ = sandbox_id;
uid_ = wvcdm::GetIpcCallingUid();
}
// Deleted by either thread.
@@ -449,6 +450,7 @@ class WatchDog {
// Function called by new worker thread.
static void RunWatchDog(void* watcher) {
WatchDog* dog = reinterpret_cast<WatchDog*>(watcher);
wvcdm::SetLoggingUid(dog->uid_);
dog->DoInit();
dog->SignalDoneAndCleanUp();
}
@@ -610,6 +612,7 @@ class WatchDog {
bool running_;
bool gave_up_;
std::vector<uint8_t> sandbox_id_;
uint32_t uid_;
};
struct LevelSession {