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

Commit 073451ae authored by Tianjie Xu's avatar Tianjie Xu
Browse files

Fix a typo of variable name in install.cpp

Change-Id: I42057bc2fb5096ce009fe6e4b787bc9082cd572f
parent c21edd46
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -184,19 +184,19 @@ static int check_newer_ab_build(ZipArchive* zip)
    }

    // Check for downgrade version.
    int64_t build_timestampt = property_get_int64(
    int64_t build_timestamp = property_get_int64(
            "ro.build.date.utc", std::numeric_limits<int64_t>::max());
    int64_t pkg_post_timespampt = 0;
    int64_t pkg_post_timestamp = 0;
    // We allow to full update to the same version we are running, in case there
    // is a problem with the current copy of that version.
    if (metadata["post-timestamp"].empty() ||
        !android::base::ParseInt(metadata["post-timestamp"].c_str(),
                                 &pkg_post_timespampt) ||
        pkg_post_timespampt < build_timestampt) {
                                 &pkg_post_timestamp) ||
        pkg_post_timestamp < build_timestamp) {
        if (metadata["ota-downgrade"] != "yes") {
            LOG(ERROR) << "Update package is older than the current build, expected a build "
                       "newer than timestamp " << build_timestampt << " but package has "
                       "timestamp " << pkg_post_timespampt << " and downgrade not allowed.";
                       "newer than timestamp " << build_timestamp << " but package has "
                       "timestamp " << pkg_post_timestamp << " and downgrade not allowed.";
            return INSTALL_ERROR;
        }
        if (pkg_pre_build_fingerprint.empty()) {