[statsd] Eliminated modification of 'std' namespace

Bug: 191923409
Test: statsd_test
Change-Id: I2544ca0b0c928709e7da3b2107485824a8c1cfdc
diff --git a/statsd/src/HashableDimensionKey.h b/statsd/src/HashableDimensionKey.h
index b5df456..3b7e25a 100644
--- a/statsd/src/HashableDimensionKey.h
+++ b/statsd/src/HashableDimensionKey.h
@@ -269,22 +269,16 @@
 }  // namespace os
 }  // namespace android
 
-namespace std {
-
-using android::os::statsd::AtomDimensionKey;
-using android::os::statsd::HashableDimensionKey;
-using android::os::statsd::MetricDimensionKey;
-
 template <>
-struct hash<HashableDimensionKey> {
-    std::size_t operator()(const HashableDimensionKey& key) const {
+struct std::hash<android::os::statsd::HashableDimensionKey> {
+    std::size_t operator()(const android::os::statsd::HashableDimensionKey& key) const {
         return hashDimension(key);
     }
 };
 
 template <>
-struct hash<MetricDimensionKey> {
-    std::size_t operator()(const MetricDimensionKey& key) const {
+struct std::hash<android::os::statsd::MetricDimensionKey> {
+    std::size_t operator()(const android::os::statsd::MetricDimensionKey& key) const {
         android::hash_t hash = hashDimension(key.getDimensionKeyInWhat());
         hash = android::JenkinsHashMix(hash, hashDimension(key.getStateValuesKey()));
         return android::JenkinsHashWhiten(hash);
@@ -292,11 +286,10 @@
 };
 
 template <>
-struct hash<AtomDimensionKey> {
-    std::size_t operator()(const AtomDimensionKey& key) const {
+struct std::hash<android::os::statsd::AtomDimensionKey> {
+    std::size_t operator()(const android::os::statsd::AtomDimensionKey& key) const {
         android::hash_t hash = hashDimension(key.getAtomFieldValues());
         hash = android::JenkinsHashMix(hash, key.getAtomTag());
         return android::JenkinsHashWhiten(hash);
     }
 };
-}  // namespace std
diff --git a/statsd/src/config/ConfigKey.h b/statsd/src/config/ConfigKey.h
index 0e5a7e3..b0d015f 100644
--- a/statsd/src/config/ConfigKey.h
+++ b/statsd/src/config/ConfigKey.h
@@ -73,17 +73,10 @@
 
 /**
  * A hash function for ConfigKey so it can be used for unordered_map/set.
- * Unfortunately this has to go in std namespace because C++ is fun!
  */
-namespace std {
-
-using android::os::statsd::ConfigKey;
-
 template <>
-struct hash<ConfigKey> {
-    std::size_t operator()(const ConfigKey& key) const {
+struct std::hash<android::os::statsd::ConfigKey> {
+    std::size_t operator()(const android::os::statsd::ConfigKey& key) const {
         return (7 * key.GetUid()) ^ ((hash<long long>()(key.GetId())));
     }
 };
-
-}  // namespace std