Remove the access to net.hostname

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
This commit is contained in:
Cong Lin
2020-03-13 14:12:09 -07:00
parent 5a6a2075f5
commit a9889aafd7

View File

@@ -16,10 +16,7 @@ namespace wvoec3 {
const char *getUniqueID(size_t *len) {
static std::string unique_id;
unique_id = android::base::GetProperty("ro.serialno", "");
if (unique_id.empty()) {
unique_id = android::base::GetProperty("net.hostname", "0123456789abc");
}
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