thread-safe call to update disk stats . update occurs if the thread is able to acquire the lock i.e. , no other thread is updating it at the same time , and it has been at least restat_interval_ms since the last update . assumes that initialization has been completed before this method is called . concode_field_sep File mInternalPath concode_elem_sep StatFsHelper sStatsFsHelper concode_elem_sep StatFs mExternalStatFs concode_elem_sep long RESTAT_INTERVAL_MS concode_elem_sep StatFs mInternalStatFs concode_elem_sep Lock lock concode_elem_sep File mExternalPath concode_elem_sep boolean mInitialized concode_elem_sep long mLastRestatTime concode_field_sep void ensureInitialized concode_elem_sep boolean testLowDiskSpace concode_elem_sep long getAvailableStorageSpace concode_elem_sep StatFs updateStatsHelper concode_elem_sep void resetStats concode_elem_sep StatFsHelper getInstance concode_elem_sep void updateStats concode_elem_sep StatFs createStatFs
void function ( ) { if ( lock . tryLock ( ) ) { try { if ( ( SystemClock . elapsedRealtime ( ) - mLastRestatTime ) > RESTAT_INTERVAL_MS ) { updateStats ( ) ; } } finally { lock . unlock ( ) ; } } }