Merge of http://go/wvgerrit/95723 This is to remove the reference to net.hostname in get_unique_id_android.cpp for L3. Keep ro.serialno, and just change the net.hostname call to setting the constant string. Bug: 130028203 Test: Ran unit tests Change-Id: I90d955c117924c16c71f145dea53fe32644d2875
28 lines
676 B
C++
28 lines
676 B
C++
#include "level3.h"
|
|
|
|
#include <string.h>
|
|
|
|
#include <string>
|
|
|
|
// The function property_get is defined differently if it comes from the IN_APP
|
|
// version or from the Android OS.
|
|
#if defined(IN_APP_FASTBALL)
|
|
#include "properties_fastball.h"
|
|
#else
|
|
#include <android-base/properties.h>
|
|
#endif
|
|
|
|
namespace wvoec3 {
|
|
|
|
const char *getUniqueID(size_t *len) {
|
|
static std::string unique_id;
|
|
unique_id = android::base::GetProperty("ro.serialno", "0123456789abc");
|
|
#if defined(IN_APP_FASTBALL) || defined(IN_APP_MOVIES)
|
|
unique_id += android::base::GetProperty("package.name", "com.google.inapp");
|
|
#endif
|
|
*len = unique_id.size();
|
|
return unique_id.c_str();
|
|
}
|
|
|
|
} // namespace wvoec3
|