Add error details when offline license is not found
[ Merge of http://go/wvgerrit/171310 ] Offline license not found errors are identified by CdmResponseEnum 347 (KEYSET_ID_NOT_FOUND_4). No addition file system information is shared. Checks for file existance use the stat command. The stat call can return error codes from errno.h when the command fails. These are now converted into sub error codes and returned along with the offline license file not found error. This also includes a change to log stat errors other than ENOENT (no such file or directory) as a warning rather than verbose. Bug: 276225520 Test: file_store_unittest, file_utils_unittest, GtsMediaTestCases Change-Id: Ic09d036549582cd65783b49fa96ffefc4bf562c7
This commit is contained in:
@@ -68,6 +68,15 @@ class DeviceFiles {
|
||||
kIncorrectFileType = kResponseTypeBase + 14,
|
||||
kIncorrectFileVersion = kResponseTypeBase + 15,
|
||||
kLicenseNotPresent = kResponseTypeBase + 16,
|
||||
kFileNotFoundEAcces = kResponseTypeBase + 17,
|
||||
kFileNotFoundEFault = kResponseTypeBase + 18,
|
||||
kFileNotFoundELoop = kResponseTypeBase + 19,
|
||||
kFileNotFoundENameTooLong = kResponseTypeBase + 20,
|
||||
kFileNotFoundENoEnt = kResponseTypeBase + 21,
|
||||
kFileNotFoundENoMem = kResponseTypeBase + 22,
|
||||
kFileNotFoundENotDir = kResponseTypeBase + 23,
|
||||
kFileNotFoundEOverflow = kResponseTypeBase + 24,
|
||||
kFileNotFoundOther = kResponseTypeBase + 25,
|
||||
};
|
||||
|
||||
// Converts the different enum types to a human readable C-string for
|
||||
@@ -75,6 +84,7 @@ class DeviceFiles {
|
||||
static const char* CertificateStateToString(CertificateState state);
|
||||
static const char* CertificateTypeToString(CertificateType type);
|
||||
static const char* ResponseTypeToString(ResponseType type);
|
||||
static ResponseType ErrnoToResponseType(int errno_value);
|
||||
|
||||
// CdmLicenseData represents all of the data that is stored in CDM
|
||||
// license file. License data is uniquely keyed using |key_set_id|.
|
||||
|
||||
Reference in New Issue
Block a user