Some mandatory device info fields like manufacturer can be empty string when returned from TEE on devices which have not been provisioned with attestation IDs. The extraction tool also needs to check for empty string in the response, and if so, populates the field with Android property values. Test: extracting device info from new Pixel EVT 1.1 and uploading Bug: 276958001 Change-Id: I6e1b3dee8ffcd991335bc50b59a0c80f030cdc79
36 lines
1004 B
C++
36 lines
1004 B
C++
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
|
// source code may only be used and distributed under the Widevine License
|
|
// Agreement.
|
|
|
|
#ifndef WVCDM_CORE_PROPERTIES_H_
|
|
#define WVCDM_CORE_PROPERTIES_H_
|
|
|
|
#include <map>
|
|
#include <memory>
|
|
#include <mutex>
|
|
#include <string>
|
|
|
|
#include "disallow_copy_and_assign.h"
|
|
|
|
namespace wvcdm {
|
|
|
|
// This class gives device information/meta data.
|
|
class Properties {
|
|
public:
|
|
static bool GetBrandName(std::string* brand_name);
|
|
static bool GetCompanyName(std::string* company_name);
|
|
static bool GetModelName(std::string* model_name);
|
|
static bool GetArchitectureName(std::string* arch_name);
|
|
static bool GetDeviceName(std::string* device_name);
|
|
static bool GetProductName(std::string* product_name);
|
|
static bool GetBuildInfo(std::string* build_info);
|
|
static bool GetOEMCryptoPath(std::string* library_name);
|
|
|
|
private:
|
|
CORE_DISALLOW_COPY_AND_ASSIGN(Properties);
|
|
};
|
|
|
|
} // namespace wvcdm
|
|
|
|
#endif // WVCDM_CORE_PROPERTIES_H_
|