Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 336153ed authored by John Wu's avatar John Wu
Browse files

[Ravenwood] Several minor fixes

- Fix typo in RavenwoodTestStats
- Fix incorrect return value in property_set

Bug: 292141694
Flag: EXEMPT host test change only
Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh
Change-Id: Iaac7a804719a6941f0ee18f45274a597a394393c
parent 2f548347
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -84,10 +84,10 @@ public class RavenwoodTestStats {
        try {
            mOutputWriter = new PrintWriter(mOutputFile);
        } catch (IOException e) {
            throw new RuntimeException("Failed to crete logfile. File=" + mOutputFile, e);
            throw new RuntimeException("Failed to create logfile. File=" + mOutputFile, e);
        }

        // Crete the "latest" symlink.
        // Create the "latest" symlink.
        Path symlink = Paths.get(tmpdir, basename + "latest.csv");
        try {
            if (Files.exists(symlink)) {
@@ -96,7 +96,7 @@ public class RavenwoodTestStats {
            Files.createSymbolicLink(symlink, Paths.get(mOutputFile.getName()));

        } catch (IOException e) {
            throw new RuntimeException("Failed to crete logfile. File=" + mOutputFile, e);
            throw new RuntimeException("Failed to create logfile. File=" + mOutputFile, e);
        }

        Log.i(TAG, "Test result stats file: " + mOutputFile);
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ static bool property_set(const char* key, const char* value) {
    if (key == nullptr || *key == '\0') return false;
    if (value == nullptr) value = "";
    bool read_only = !strncmp(key, "ro.", 3);
    if (!read_only && strlen(value) >= PROP_VALUE_MAX) return -1;
    if (!read_only && strlen(value) >= PROP_VALUE_MAX) return false;

    std::lock_guard lock(g_properties_lock);
    auto [it, success] = g_properties.emplace(key, value);