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];
|
||||
|
|
|
@ -794,7 +794,7 @@ private long startTime = 0L;
|
|||
if ( line.contains( "/dev/block/vold" ) )
|
||||
{
|
||||
isExternalDir = true;
|
||||
String[] vetos = new String[] { "/mnt/secure", "/mnt/asec", "/mnt/obb", "/dev/mapper", "tmpfs" };
|
||||
String[] vetos = new String[] { "/mnt/secure", "/mnt/asec", "/mnt/obb", "/dev/mapper", "tmpfs", "/mnt/media_rw" };
|
||||
for( String v: vetos )
|
||||
{
|
||||
if ( d.indexOf( v ) >= 0 )
|
||||
|
|
Loading…
Reference in a new issue