Enforce validations for ANeuralNetworksExecution_setInput/Output

  - Optional output / input must have both nullptr as buffer and 0 as
  length.
  - If newType is NULL, the operand dimensions must be fully specified.
  And ModelArgumentInfo.dimensions will be the same as the operand
  dimensions.
  - For non-optional input / output, user provided length must match the
  operand size.

Bug: 75980924
Test: mm
Test: NeuralNetworksTests
Change-Id: Iaa8f8193c8a6911afd0990fcf0659d0050de833b
2 files changed
tree: 47a93dcb0c8cfac42b666a04a710a48742fb57f5
  1. nn/
  2. OWNERS