C2 VTS: Cleanup code around query() calls am: f1c7514ab7

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/15881020

Change-Id: I3302f016db6ea61f264c62d0264c8f1d0c5c09c2