Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed6d63d0 authored by Ronghua Wu's avatar Ronghua Wu Committed by Android Git Automerger
Browse files

am d2868b8d: am e0b71b4e: Merge "media: clean up the usage of...

am d2868b8d: am e0b71b4e: Merge "media: clean up the usage of max-supported-instances." into mnc-dev

* commit 'd2868b8d':
  media: clean up the usage of max-supported-instances.
parents 5243632f d2868b8d
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -701,13 +701,10 @@ public final class MediaCodecInfo {

            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);