Loading recovery.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -733,11 +733,12 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri ui->SetStage(st_cur, st_max); } // Extract the YYYYMMDD date from the full version string. Assume // the first instance of "-[0-9]{8}-" (if any) has the desired date. // Extract the YYYYMMDD / YYYYMMDD_HHMMSS timestamp from the full version string. // Assume the first instance of "-[0-9]{8}-", or "-[0-9]{8}_[0-9]{6}-" in case // LINEAGE_VERSION_APPEND_TIME_OF_DAY is set to true has the desired date. std::string ver = android::base::GetProperty("ro.lineage.version", ""); std::smatch ver_date_match; std::regex_search(ver, ver_date_match, std::regex("-(\\d{8})-")); std::regex_search(ver, ver_date_match, std::regex("-(\\d{8}(_\\d{6})?)-")); std::string ver_date = ver_date_match.str(1); // Empty if no match. std::vector<std::string> title_lines = { Loading Loading
recovery.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -733,11 +733,12 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri ui->SetStage(st_cur, st_max); } // Extract the YYYYMMDD date from the full version string. Assume // the first instance of "-[0-9]{8}-" (if any) has the desired date. // Extract the YYYYMMDD / YYYYMMDD_HHMMSS timestamp from the full version string. // Assume the first instance of "-[0-9]{8}-", or "-[0-9]{8}_[0-9]{6}-" in case // LINEAGE_VERSION_APPEND_TIME_OF_DAY is set to true has the desired date. std::string ver = android::base::GetProperty("ro.lineage.version", ""); std::smatch ver_date_match; std::regex_search(ver, ver_date_match, std::regex("-(\\d{8})-")); std::regex_search(ver, ver_date_match, std::regex("-(\\d{8}(_\\d{6})?)-")); std::string ver_date = ver_date_match.str(1); // Empty if no match. std::vector<std::string> title_lines = { Loading