media: clean up the usage of max-supported-instances.
Bug: 22089269
Change-Id: I05ab49c8b5aaaa0adb6c1a5a1f7af33e6abc5b91
diff --git a/media/java/android/media/MediaCodecInfo.java b/media/java/android/media/MediaCodecInfo.java
index 28d0713..f42fab7 100644
--- a/media/java/android/media/MediaCodecInfo.java
+++ b/media/java/android/media/MediaCodecInfo.java
@@ -701,13 +701,10 @@
final Map<String, Object> global = MediaCodecList.getGlobalSettings();
mMaxSupportedInstances = Utils.parseIntSafely(
- global.get("max-supported-instances"), DEFAULT_MAX_SUPPORTED_INSTANCES);
+ global.get("max-concurrent-instances"), DEFAULT_MAX_SUPPORTED_INSTANCES);
int maxInstances = Utils.parseIntSafely(
- map.get("max-supported-instances"), mMaxSupportedInstances);
- // TODO: replace all max-supported-instances with max-concurrent-instances.
- maxInstances = Utils.parseIntSafely(
- map.get("max-concurrent-instances"), maxInstances);
+ map.get("max-concurrent-instances"), mMaxSupportedInstances);
mMaxSupportedInstances =
Range.create(1, MAX_SUPPORTED_INSTANCES_LIMIT).clamp(maxInstances);