getAvailableBlocksLong() * getBlockSizeLong() VS getAvailableBytes()

一曲冷凌霜 提交于 2019-12-10 15:36:57

问题


[EDIT] I did make a stupid mistake on my testing. I asked a question here without knowing it.

The answer is, both are the same. But I leave my post here for others.

What is the difference between getAvailableBlocksLong() * getBlockSizeLong() and getAvailableBytes()?

I tested myself and got a really strange result on Genymotion.

The values from getAvailableBlocksLong() * getBlockSizeLong() and getAvailableBytes() are different!

I literally don't get what is happening here.

Does it have something to do only with Genymotion? Should I just use getAvailableBytes() in most cases?


回答1:


The former gets the number of available memory blocks and multiplies it by the memory block size, the latter just straight up returns the available momery in bytes. Same thing



来源:https://stackoverflow.com/questions/35395931/getavailableblockslong-getblocksizelong-vs-getavailablebytes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!