quick fix for android 4.4 problem

This commit is contained in:
Arndt 2014-05-11 17:31:13 +02:00
parent d89790cfd3
commit 012b0645e5
2 changed files with 5 additions and 1 deletions

View file

@ -330,6 +330,8 @@ public class BRouterActivity extends Activity implements OnInitListener {
availableBasedirs = new ArrayList<String>();
ArrayList<Long> dirFreeSizes = new ArrayList<Long>();
for( String d : items )
{
try
{
StatFs stat = new StatFs(d);
long size = (long)stat.getAvailableBlocks()*stat.getBlockSize();
@ -338,6 +340,8 @@ public class BRouterActivity extends Activity implements OnInitListener {
availableBasedirs.add( idx, d );
dirFreeSizes.add( idx, Long.valueOf( size ) );
}
catch( Exception e ) { /* ignore */ }
}
basedirOptions= new String[items.size() + 1];
int bdidx = 0;

View file

@ -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 )