MCPcopy Create free account
hub / github.com/google/gapid / decodeXmlTree

Function decodeXmlTree

core/os/android/binaryxml/decode.go:94–108  ·  view source on GitHub ↗
(r io.Reader)

Source from the content-addressed store, hash-verified

92}
93
94func decodeXmlTree(r io.Reader) (*xmlTree, error) {
95 br := endian.Reader(r, device.LittleEndian)
96
97 chunk, err := decodeChunk(br, &xmlTree{})
98 if err != nil {
99 return nil, err
100 }
101
102 tree, ok := chunk.(*xmlTree)
103 if !ok {
104 return nil, fmt.Errorf("Expected XML tree, found chunk type %T", chunk)
105 }
106
107 return tree, nil
108}
109
110func decodeChunk(r binary.Reader, x *xmlTree) (chunk, error) {
111 ty := r.Uint16()

Callers 5

TestDimensionFunction · 0.85
DecodeFunction · 0.85
SetDebuggableFlagFunction · 0.85

Calls 2

decodeChunkFunction · 0.85
ReaderMethod · 0.65

Tested by 3

TestDimensionFunction · 0.68