VEX-6030-reduce-buffer-size-based-on-heap

This commit is contained in:
Gabriel Rivero 2021-11-03 19:35:27 -04:00
parent 0ab7ff476b
commit 40e450b0b1

View File

@ -413,7 +413,7 @@ class ReactExoplayerView extends FrameLayout implements
prioritizeTimeOverSizeThresholds,
backBufferDurationMs,
retainBackBufferFromKeyframe);
if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.N) {
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.N) {
ActivityManager activityManager = (ActivityManager) themedReactContext.getSystemService(themedReactContext.ACTIVITY_SERVICE);
availableHeapInBytes = activityManager.getMemoryClass() / 2 * 1024 * 1024;
}