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

Commit d8265783 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Update language to comply with Android's inclusive language guidance"...

Merge "Update language to comply with Android's inclusive language guidance" am: 1d2417fa am: 436fe675 am: 37be2eef

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1383976

Change-Id: I8214acb88567e8818f0730d6c19437c42c351143
parents 5b3f78d3 37be2eef
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ public final class ProtoInputStream extends ProtoStream {
    private byte mState = 0;

    /**
     * Keeps track of the currently read nested Objects, for end object sanity checking and debug
     * Keeps track of the currently read nested Objects, for end object checking and debug
     */
    private ArrayList<Long> mExpectedObjectTokenStack = null;

@@ -513,7 +513,7 @@ public final class ProtoInputStream extends ProtoStream {
                    (int) fieldId, getOffset() + messageSize));
        }

        // Sanity check
        // Validation check
        if (mDepth > 0
                && getOffsetFromToken(mExpectedObjectTokenStack.get(mDepth))
                > getOffsetFromToken(mExpectedObjectTokenStack.get(mDepth - 1))) {
@@ -536,7 +536,7 @@ public final class ProtoInputStream extends ProtoStream {
     * @param token - token
     */
    public void end(long token) {
        // Sanity check to make sure user is keeping track of their embedded messages
        // Make sure user is keeping track of their embedded messages
        if (mExpectedObjectTokenStack.get(mDepth) != token) {
            throw new ProtoParseException(
                    "end token " + token + " does not match current message token "
+4 −4
Original line number Diff line number Diff line
@@ -59,10 +59,10 @@ import java.io.UnsupportedEncodingException;
 * cache the size, and then write the size-prefixed buffers.
 *
 * We are trying to avoid too much generated code here, but this class still
 * needs to have a somewhat sane API.  We can't have the multiple passes be
 * done by the calling code.  In addition, we want to avoid the memory high
 * water mark of duplicating all of the values into the traditional in-memory
 * Message objects. We need to find another way.
 * needs to have API.  We can't have the multiple passes be done by the
 * calling code.  In addition, we want to avoid the memory high water mark
 * of duplicating all of the values into the traditional in-memory Message
 * objects. We need to find another way.
 *
 * So what we do here is to let the calling code write the data into a
 * byte[] (actually a collection of them wrapped in the EncodedBuffer class),