Skip to content
Commit 25546aa3 authored by Mike Schneider's avatar Mike Schneider
Browse files

Extend the INVOKE_VIEW_METHOD of the "Generic View Operation" (VUOP) DDM handler to

1) Return the invoked method's return value
2) In addition to the primitive values, support String and byte[]

This DDM API is used by some development tools (such as go/web-hv), where the ability retrieve values from views and sending strings and byte blobs allows to trigger specific view behavior.

## String support
Allows passing in and returning String objects, using the (non-standard) R type specifier. This implementation is modelled after ViewHierarchyEncoder for consistency (whose result is passed back via the same DdmHandleViewDebug class).

## byte[] support
Allows passing in and returning byte[] objects, using the "[Z" type specifier.
For simplicity, only byte arrays are supported, though other types can be added in a backwards compatible way in the future, if needed.

## testing
Added unit tests for serialization/deserialization. Unable to test `invokeViewMethod`, since it uses the `Chunk` class which is not exposed outside of the framework

Test: Adding unit tests for serialization deserialization
Test: Manually invoked method via go/web-hv
Bug: 245727371

Change-Id: I29d2d6ec3b6eb59a5f2e7d3312dc36c00007672d
parent 1d04b196
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment