Fix / add various ANeuralNetworksModel_* validations

  - Validate dimensions and dimensionCount for scalar types.
  - Validate offset and length for Memory.
  - Make the returned error consistent for modifying a finished model.

Bug: 74831097
Bug: 70942562
Test: mm
Test: ValidationTestModel pass
Change-Id: If8ce91427838950afa6684a014be1221528b8ded
2 files changed
tree: e17b1fcba9de44be151906d86bd93bc27ebca262
  1. nn/
  2. OWNERS