Merge "Remove host simulation of runtime tzdata files" am: 85ab19687e
am: 4b6a5ef84c

Change-Id: I2297c2a743ee0a4dd6a8fea8faa326a1da8538f1
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..a2e98cc
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,7 @@
+{
+  "imports": [
+    {
+      "path": "system/apex/tests"
+    }
+  ]
+}
diff --git a/apex/AndroidManifest.xml b/apex/AndroidManifest.xml
index 980d723..bcd0383 100644
--- a/apex/AndroidManifest.xml
+++ b/apex/AndroidManifest.xml
@@ -23,5 +23,9 @@
     *  the version of ICU being used on the device. Since that typically
     *  updates every dessert release, we lock the module to a single API level.
     -->
-  <uses-sdk android:minSdkVersion="28" android:maxSdkVersion="28" />
+  <uses-sdk
+      android:minSdkVersion="29"
+      android:maxSdkVersion="29"
+      android:targetSdkVersion="29"
+  />
 </manifest>
diff --git a/apex/manifest.json b/apex/manifest.json
index a088815..c93258e 100644
--- a/apex/manifest.json
+++ b/apex/manifest.json
@@ -1,4 +1,4 @@
 {
   "name": "com.android.tzdata",
-  "version": 1
+  "version": 290000000
 }
diff --git a/testing/data/test1/apex/manifest.json b/testing/data/test1/apex/manifest.json
index 05d634a..c1bdf6a 100644
--- a/testing/data/test1/apex/manifest.json
+++ b/testing/data/test1/apex/manifest.json
@@ -1,4 +1,4 @@
 {
   "name": "com.android.tzdata",
-  "version": 2
+  "version": 300000000
 }
diff --git a/tzdatacheck/tzdatacheck.cpp b/tzdatacheck/tzdatacheck.cpp
index 2285219..a72fe13 100644
--- a/tzdatacheck/tzdatacheck.cpp
+++ b/tzdatacheck/tzdatacheck.cpp
@@ -150,8 +150,10 @@
 
 /* Return the parent directory of dirName. */
 static std::string getParentDir(const std::string& dirName) {
-    std::unique_ptr<char> mutable_dirname(strdup(dirName.c_str()));
-    return dirname(mutable_dirname.get());
+    char *cMutableDirName = strdup(dirName.c_str());
+    std::string parentDir = dirname(cMutableDirName);
+    free(cMutableDirName);
+    return parentDir;
 }
 
 /* Deletes a single file, symlink or directory. Called from nftw(). */