@Test public void testByteArrayPoolSize_withLowRamDevice_isHalfTheSpecifiedBytes() { LowRamActivityManager activityManager = Shadow.extract(harness.activityManager); activityManager.setMemoryClass(getLargeEnoughMemoryClass()); activityManager.setIsLowRam(); int byteArrayPoolSize = harness.getCalculator().getArrayPoolSizeInBytes(); assertThat(byteArrayPoolSize).isEqualTo(harness.byteArrayPoolSizeBytes / 2); }
arrayPool = new LruArrayPool(memorySizeCalculator.getArrayPoolSizeInBytes());
arrayPool = new LruArrayPool(memorySizeCalculator.getArrayPoolSizeInBytes());