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

Commit 11237300 authored by Roozbeh Pournader's avatar Roozbeh Pournader
Browse files

Remove LocaleValue::toDirName() from AAPT2

There was no user, and the code was incorrect too.

Bug: 25599046
Change-Id: I50d14f58995ac611385a6fb17661a357bf473687
parent 42e62608
Loading
Loading
Loading
Loading
+0 −27
Original line number Diff line number Diff line
@@ -223,33 +223,6 @@ ssize_t LocaleValue::initFromParts(std::vector<std::string>::iterator iter,
    return static_cast<ssize_t>(iter - startIter);
}


std::string LocaleValue::toDirName() const {
    std::string dirName;
    if (language[0]) {
        dirName += language;
    } else {
        return dirName;
    }

    if (script[0]) {
        dirName += "-s";
        dirName += script;
    }

    if (region[0]) {
        dirName += "-r";
        dirName += region;
    }

    if (variant[0]) {
        dirName += "-v";
        dirName += variant;
    }

    return dirName;
}

void LocaleValue::initFromResTable(const ResTable_config& config) {
    config.unpackLanguage(language);
    config.unpackRegion(region);
+0 −2
Original line number Diff line number Diff line
@@ -57,8 +57,6 @@ struct LocaleValue {
     */
    void writeTo(android::ResTable_config* out) const;

    std::string toDirName() const;

    inline int compare(const LocaleValue& other) const;

    inline bool operator<(const LocaleValue& o) const;