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: 9ff167f878a15462cb8f12a37652dc91644276af
  1. common/
  2. driver/
  3. runtime/
  4. tools/
  5. Android.bp
  6. OWNERS
  7. README.txt