media.metrics changes AString -> std::string

change from AString to std::string for how media.metrics handles
strings.  This severs the dependency on libstagefright_foundation,
where AString is implemented, so we can integrate into places
which do not want to introduce a dependency on libstagefright_foundation.

Bug: 70805723
Test: compilation/linking, CTS subset
Change-Id: I66de971b6ec354444e06112607a2d7614084cef8
diff --git a/services/mediaanalytics/MediaAnalyticsService.cpp b/services/mediaanalytics/MediaAnalyticsService.cpp
index 7f42b1b..2954b3b 100644
--- a/services/mediaanalytics/MediaAnalyticsService.cpp
+++ b/services/mediaanalytics/MediaAnalyticsService.cpp
@@ -389,7 +389,7 @@
     nsecs_t ts_since = 0;
     String16 helpOption("-help");
     String16 onlyOption("-only");
-    AString only;
+    std::string only;
     int n = args.size();
 
     for (int i = 0; i < n; i++) {
@@ -553,7 +553,7 @@
                 if (only != NULL && strcmp(only, (*it)->getKey()) != 0) {
                     ALOGV("Told to omit '%s'", (*it)->getKey());
                 }
-                AString distilled = (*it)->dumpSummary(slot, only);
+                std::string distilled = (*it)->dumpSummary(slot, only);
                 result.append(distilled.c_str());
             }
         }
@@ -605,7 +605,7 @@
                 ALOGV("Omit '%s', it's not '%s'", (*it)->getKey().c_str(), only);
                 continue;
             }
-            AString entry = (*it)->toString(mDumpProto);
+            std::string entry = (*it)->toString(mDumpProto);
             result.appendFormat("%5d: %s\n", slot, entry.c_str());
             slot++;
         }
@@ -746,7 +746,7 @@
     }
 }
 
-static AString allowedKeys[] =
+static std::string allowedKeys[] =
 {
     "codec",
     "extractor"
@@ -760,7 +760,7 @@
     // untrusted uids can only send us a limited set of keys
     if (isTrusted == false) {
         // restrict to a specific set of keys
-        AString key = item->getKey();
+        std::string key = item->getKey();
 
         size_t i;
         for(i = 0; i < nAllowedKeys; i++) {
@@ -854,7 +854,7 @@
             return setPkgInfo(item, uid, setName, setVersion);
         }
     } else {
-        AString pkg;
+        std::string pkg;
         std::string installer = "";
         int64_t versionCode = 0;
 
@@ -896,7 +896,7 @@
             }
 
             // strip any leading "shared:" strings that came back
-            if (pkg.startsWith("shared:")) {
+            if (pkg.compare(0, 7, "shared:") == 0) {
                 pkg.erase(0, 7);
             }