ABuffer: add a newer version of setRange

This new function setRangeWithStatus validates the buffer status
and the arguments. Upon invalid state it returns with the error
instead of asserting/crashing.

Bug: 415812413
Flag: EXEMPT bugfix
Test: sf_foundation_test
Change-Id: I23a3e3a15c707f7f5025dc0805f9d31c51fc74b9
4 files changed