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

Commit 8d5b48fc authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 3536

* changes:
  Add getRawData() method for AggregationService.
parents d530b3ce 30636876
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -192,17 +192,21 @@ public class EventLog {
            return decodeObject();
        }

        public byte[] getRawData() {
            return mBuffer.array();
        }

        /** @return the loggable item at the current position in mBuffer. */
        private Object decodeObject() {
            if (mBuffer.remaining() < 1) return null;
            switch (mBuffer.get()) {
            case INT:
                if (mBuffer.remaining() < 4) return null;
                return mBuffer.getInt();
                return (Integer) mBuffer.getInt();

            case LONG:
                if (mBuffer.remaining() < 8) return null;
                return mBuffer.getLong();
                return (Long) mBuffer.getLong();

            case STRING:
                try {