Add watch dog timer to OEMCrypto L3

Merge from Widevine repo of http://go/wvgerrit/33540

This code adds a watchdog timer to the level 3 initialization.  If
initialization does not finish within 5 seconds, the process will
abort, printing a small amount of debugging information.

arm/libwvlevel3.a Level3 Library 4445 Sep 11 2017 14:05:15

Test: unit tests on bullhead. Video on Play Movies.  
Kyle ran the GTS tests on loop overnight.

bug: 65379279

Change-Id: I0e0e4b158dbce193abbd8ee2cf6b366060c768b8
This commit is contained in:
Fred Gylys-Colwell
2017-09-11 21:05:18 -07:00
parent 8309922a89
commit 7ca2b21363
2 changed files with 3 additions and 0 deletions

View File

@@ -502,6 +502,9 @@ class WatchDog {
gave_up_ = true;
status_ = OEMCrypto_ERROR_INIT_FAILED;
LOGE("XXX WATCH DOG ERROR XXX");
// HACK: this normally just returns an error. However, we are using it
// as a signal to dump debugging information.
Level3_GetOEMPublicCertificate(0, nullptr, nullptr);
SaveFailureInformation();
// This tells the worker thread to clean up after itself. It is not
// really needed since we are going to abort. However, if somebody