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

Commit 8ab36d44 authored by Gregory Montoir's avatar Gregory Montoir Committed by Android (Google) Code Review
Browse files

Merge "Restrict fields stripping to TYPE_MESSAGE" into main

parents ea122e50 4574283f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -195,7 +195,9 @@ status_t FieldStripper::strip(const uint8_t privacyPolicy) {
        ProtoOutputStream proto(mEncodedBuffer);

        // Optimization when no strip happens.
        if (mRestrictions == NULL || spec.RequireAll()) {
        if (mRestrictions == NULL || spec.RequireAll()
                // Do not iterate through fields if primitive data
                || !mRestrictions->children /* != FieldDescriptor::TYPE_MESSAGE */) {
            if (spec.CheckPremission(mRestrictions)) {
                mSize = mData->size();
            }