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

Commit 82fecb01 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Add ability for some manifest attributes to reference resources.

This loosens our restriction on many manifest attributes requiring
literal string values, to allow various ones to use values from
resources.  This is only allowed if the resource value does not change
from configuration changes, and the restriction is still in place
for attributes that are core to security (requesting permissions) or
market operation (used libraries and features etc).

Change-Id: I4da02f6a5196cb6a7dbcff9ac25403904c42c2c8
parent 080b8a84
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -631,6 +631,8 @@ public:

    void restart();

    const ResStringPool& getStrings() const;

    event_code_t getEventType() const;
    // Note, unlike XmlPullParser, the first call to next() will return
    // START_TAG of the first element.
@@ -716,8 +718,6 @@ public:

    void uninit();

    const ResStringPool& getStrings() const;

private:
    friend class ResXMLParser;

+4 −5
Original line number Diff line number Diff line
@@ -625,6 +625,10 @@ void ResXMLParser::restart()
    mCurNode = NULL;
    mEventCode = mTree.mError == NO_ERROR ? START_DOCUMENT : BAD_DOCUMENT;
}
const ResStringPool& ResXMLParser::getStrings() const
{
    return mTree.mStrings;
}

ResXMLParser::event_code_t ResXMLParser::getEventType() const
{
@@ -1149,11 +1153,6 @@ void ResXMLTree::uninit()
    restart();
}

const ResStringPool& ResXMLTree::getStrings() const
{
    return mStrings;
}

status_t ResXMLTree::validateNode(const ResXMLTree_node* node) const
{
    const uint16_t eventCode = dtohs(node->header.type);