quick fix for android 4.4 problem
This commit is contained in:
parent
d89790cfd3
commit
012b0645e5
2 changed files with 5 additions and 1 deletions
|
|
@ -331,12 +331,16 @@ public class BRouterActivity extends Activity implements OnInitListener {
|
|||
ArrayList<Long> dirFreeSizes = new ArrayList<Long>();
|
||||
for( String d : items )
|
||||
{
|
||||
try
|
||||
{
|
||||
StatFs stat = new StatFs(d);
|
||||
long size = (long)stat.getAvailableBlocks()*stat.getBlockSize();
|
||||
int idx = 0;
|
||||
while ( idx < availableBasedirs.size() && dirFreeSizes.get(idx).longValue() > size ) idx++;
|
||||
availableBasedirs.add( idx, d );
|
||||
dirFreeSizes.add( idx, Long.valueOf( size ) );
|
||||
}
|
||||
catch( Exception e ) { /* ignore */ }
|
||||
}
|
||||
|
||||
basedirOptions= new String[items.size() + 1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue