Camera: fix getKeys impl for vendor keys

Test: partner testing
Bug: 137856586
Change-Id: Ie36db4f76e8b3d500aeea88d15e4e3295cc3d481
This commit is contained in:
Yin-Chia Yeh
2019-07-18 15:10:12 -07:00
parent d0daec0289
commit 1b1f14ebff

View File

@@ -206,10 +206,16 @@ public abstract class CameraMetadata<TKey> {
continue;
}
if (filterTags == null || Arrays.binarySearch(filterTags,
CameraMetadataNative.getTag(keyName, vendorId)) >= 0) {
if (filterTags != null && Arrays.binarySearch(filterTags,
CameraMetadataNative.getTag(keyName, vendorId)) < 0) {
// ignore vendor keys not in filterTags
continue;
}
if (instance == null || instance.getProtected(k) != null) {
keyList.add(k);
}
}
}