Moved Android-specific plugin code into briar-android project.

This removes the other projects' dependency on the Android API.
This commit is contained in:
akwizgran
2013-06-27 16:26:52 +01:00
parent 473cec8735
commit d02266d827
20 changed files with 19 additions and 32 deletions

View File

@@ -50,8 +50,8 @@ public class AndroidModule extends AbstractModule {
protected void configure() {
bind(AndroidExecutor.class).to(AndroidExecutorImpl.class);
bind(ReferenceManager.class).to(ReferenceManagerImpl.class).in(
Singleton.class);
bind(ReferenceManager.class).to(
ReferenceManagerImpl.class).in(Singleton.class);
}
@Provides @Singleton @DatabaseUiExecutor

View File

@@ -2,7 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="lib" path="libs/android.jar"/>
<classpathentry kind="lib" path="libs/guice-3.0-no_aop.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

Binary file not shown.

View File

@@ -2,15 +2,12 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-api"/>
<classpathentry kind="lib" path="/briar-api/libs/guice-3.0-no_aop.jar"/>
<classpathentry kind="lib" path="libs/commons-io-2.0.1.jar"/>
<classpathentry kind="lib" path="libs/h2small-1.3.170.jar"/>
<classpathentry kind="lib" path="libs/javax.inject.jar"/>
<classpathentry kind="lib" path="libs/sc-light-jdk15on-1.47.0.3-SNAPSHOT.jar" sourcepath="libs/source/sc-light-jdk15on-1.47.0.3-SNAPSHOT-source.jar"/>
<classpathentry kind="lib" path="libs/weupnp-0.1.1.jar"/>
<classpathentry kind="lib" path="libs/javax.inject.jar"/>
<classpathentry kind="lib" path="libs/jsocks.jar" sourcepath="libs/source/jsocks-source.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-api"/>
<classpathentry kind="lib" path="/briar-api/libs/android.jar"/>
<classpathentry kind="lib" path="/briar-api/libs/guice-3.0-no_aop.jar"/>
<classpathentry kind="lib" path="libs/jtorctl-briar.jar"/>
<classpathentry kind="lib" path="libs/h2small-1.3.170.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -9,8 +9,6 @@ import java.security.CodeSource;
import org.apache.commons.io.FileSystemUtils;
import android.os.StatFs;
public class FileUtils {
/**
@@ -87,12 +85,7 @@ public class FileUtils {
}
public static long getFreeSpace(File f) throws IOException {
if(OsUtils.isAndroid()) {
StatFs s = new StatFs(f.getAbsolutePath());
return (long) s.getAvailableBlocks() * s.getBlockSize();
} else {
return FileSystemUtils.freeSpaceKb(f.getAbsolutePath()) * 1024;
}
return FileSystemUtils.freeSpaceKb(f.getAbsolutePath()) * 1024;
}
public interface Callback {

View File

@@ -2,15 +2,14 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="lib" path="libs/jnotify-0.93.jar"/>
<classpathentry kind="lib" path="libs/jssc-0.9-briar.jar" sourcepath="libs/source/jssc-0.9-briar-source.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-api"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-core"/>
<classpathentry kind="lib" path="/briar-api/libs/guice-3.0-no_aop.jar"/>
<classpathentry kind="lib" path="libs/bluecove-2.1.1-SNAPSHOT-briar.jar"/>
<classpathentry kind="lib" path="libs/bluecove-gpl-2.1.1-SNAPSHOT.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-api"/>
<classpathentry kind="lib" path="/briar-api/libs/android.jar"/>
<classpathentry kind="lib" path="/briar-api/libs/guice-3.0-no_aop.jar"/>
<classpathentry kind="lib" path="libs/jna-3.5.2-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="libs/jnotify-0.93.jar"/>
<classpathentry kind="lib" path="libs/jssc-0.9-briar.jar" sourcepath="libs/source/jssc-0.9-briar-source.jar"/>
<classpathentry kind="lib" path="libs/platform-3.5.2-SNAPSHOT.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-core"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -2,17 +2,16 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-api"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-core"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-desktop"/>
<classpathentry kind="lib" path="/briar-api/libs/guice-3.0-no_aop.jar"/>
<classpathentry kind="lib" path="/briar-core/libs/commons-io-2.0.1.jar"/>
<classpathentry kind="lib" path="/briar-desktop/libs/jnotify-0.93.jar"/>
<classpathentry kind="lib" path="/briar-desktop/libs/jssc-0.9-briar.jar" sourcepath="/briar-desktop/libs/source/jssc-0.9-briar-source.jar"/>
<classpathentry kind="lib" path="libs/hamcrest-core-1.1.jar"/>
<classpathentry kind="lib" path="libs/hamcrest-library-1.1.jar"/>
<classpathentry kind="lib" path="libs/jmock-2.5.1.jar"/>
<classpathentry kind="lib" path="libs/junit-4.9b3.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-api"/>
<classpathentry kind="lib" path="/briar-api/libs/android.jar"/>
<classpathentry kind="lib" path="/briar-api/libs/guice-3.0-no_aop.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-core"/>
<classpathentry kind="lib" path="/briar-core/libs/commons-io-2.0.1.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/briar-desktop"/>
<classpathentry kind="lib" path="/briar-desktop/libs/jnotify-0.93.jar"/>
<classpathentry kind="lib" path="/briar-desktop/libs/jssc-0.9-briar.jar" sourcepath="/briar-desktop/libs/source/jssc-0.9-briar-source.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>