The code above multiplies two ints and casts them to long. If the intermediate result is over 2Gb, you'll get a negative number.
Try multiplying long values instead: long byteCount = blockSize * (long) avlBlocks; -- Kostya Vasilyev -- http://kmansoft.wordpress.com 19.08.2010 0:09 пользователь "Julius Spencer" <[email protected]> написал: Hi, I have this same issue; my check evaluates available space as negative in rare cases. I'm not sure yet whether I can take an absolute value. This must be a problem which has happened before. Anyone else come across this? Regards, Julius. On 16/08/2010, at 7:52 AM, Bob Kerns wrote: > Two possibilities come to mind. > > First, perhaps... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

